/* * Copyright (C) Alibaba Cloud Computing * All rights reserved. * * 版权所有 (C)阿里云计算有限公司 */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using Aliyun.Api.LOG.Data; namespace Aliyun.Api.LOG.Request { /// /// The request used to send data to sls server /// Note: if source is not set explicitly, machine's local private ip is used /// public class PutLogsRequest : LogRequest { private String _logstore; private String _topic; private String _source; private List _logItems; /// /// default constructor. /// please set required fileds(project, logstore) initialized by this default constructor before /// using it to send request. Otherwise, request will be failed with exception. /// public PutLogsRequest() { } /// /// constructor with all required fileds /// /// project name /// logstore name public PutLogsRequest(String project, String logstore) : base(project) { _logstore = logstore; } /// /// constructor with all possilbe fileds /// /// project name /// logstore name /// log topic /// log source /// log data public PutLogsRequest(String project, String logstore, String topic, String source, List items) :base(project) { _logstore = logstore; _topic = topic; _source = source; _logItems = items; } /// /// The logstore name /// public String Logstore { get { return _logstore; } set { _logstore = value; } } internal bool IsSetLogstore() { return _logstore != null; } /// /// The log topic /// public String Topic { get { return _topic; } set { _topic = value; } } internal bool IsSetTopic() { return _topic != null; } /// /// The log source /// public String Source { get { return _source; } set { _source = value; } } internal bool IsSetSource() { return _source != null; } /// /// List of logs /// public List LogItems { get { return _logItems; } set { _logItems = value; } } internal bool IsSetLogItems() { return _logItems != null; } } }