/*
* Copyright (C) Alibaba Cloud Computing
* All rights reserved.
*
* 版权所有 (C)阿里云计算有限公司
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Aliyun.Api.LOG.Data
{
///
/// This class presents one log event item that will put into SLS
///
public class LogItem
{
private UInt32 _time;
private List _contents;
///
/// the log's timestamp
///
public UInt32 Time
{
get { return _time; }
set { _time = value; }
}
///
/// logcontents in logs
///
public List Contents
{
get { return _contents; }
set { _contents = value; }
}
///
/// default constructor
///
public LogItem()
{
_contents = new List();
}
///
/// method to append log content by key/value pair
///
/// user define field to name the value
/// the value of field key
public void PushBack(String key, String value)
{
_contents.Add(new LogContent(key, value));
}
///
/// method to append log content by key/value pair
///
/// log content
public void PushBack(LogContent content)
{
_contents.Add(content);
}
}
}