/* * Copyright (C) Alibaba Cloud Computing * All rights reserved. * * 版权所有 (C)阿里云计算有限公司 */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Aliyun.Api.LOG.Request { /// /// The Request used to get histograms of a query from sls server /// public class GetHistogramsRequest : LogRequest { private String _logstore; private String _topic; private uint? _from; private uint? _to; private String _query; /// /// default constructor. /// please set required fileds(project, logstore, from, to) initialized by this default constructor before /// using it to send request. Otherwise, request will be failed with exception. /// public GetHistogramsRequest() { } /// /// constructor with all required fileds /// /// project name /// logstore name /// begin timestamp of time range to query /// end timestamp of time range to query public GetHistogramsRequest(String project, String logstore, uint from, uint to) :base(project) { _logstore = logstore; _from = from; _to = to; } /// /// constructor with all possible fileds /// /// project name /// logstore name /// begin timestamp of time range to query /// end timestamp of time range to query /// log topic to query /// query string to run public GetHistogramsRequest(String project, String logstore, uint from, uint to, String topic, String query) :base(project) { _logstore = logstore; _from = from; _to = to; _topic = topic; _query = query; } /// /// The logstore name /// public String Logstore { get { return _logstore; } set { _logstore = value; } } internal bool IsSetLogstore() { return _logstore != null; } /// /// The log topic to query /// public String Topic { get { return _topic; } set { _topic = value; } } internal bool IsSetTopic() { return _topic != null; } /// /// The begin timestamp of time range to query /// public uint From { get { return _from ?? default(uint); } set { _from = value; } } internal bool IsSetFrom() { return _from.HasValue; } /// /// The end timestamp of time range to query /// public uint To { get { return _to ?? default(uint); } set { _to = value; } } internal bool IsSetTo() { return _to.HasValue; } /// /// The query string to run /// public String Query { get { return _query; } set { _query = value; } } internal bool IsSetQuery() { return _query != null; } } }