PutLogsRequest.php
3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
/**
* Copyright (C) Alibaba Cloud Computing
* All rights reserved
*/
require_once realpath(dirname(__FILE__) . '/Request.php');
/**
* The request used to send data to log server.
*
* @author log service dev
*/
class Aliyun_Log_Models_PutLogsRequest extends Aliyun_Log_Models_Request {
/**
* @var string logstore name
*/
private $logstore;
/**
* @var string topic name
*/
private $topic;
/**
* @var string source of the logs
*/
private $source;
/**
* @var array LogItem array, log data
*/
private $logitems;
/**
* @var string shardKey putlogs shard hash key
*/
private $shardKey;
/**
* Aliyun_Log_Models_PutLogsRequest cnstructor
*
* @param string $project
* project name
* @param string $logstore
* logstore name
* @param string $topic
* topic name
* @param string $source
* source of the log
* @param array $logitems
* LogItem array,log data
*/
public function __construct($project = null, $logstore = null, $topic = null, $source = null, $logitems = null,$shardKey=null) {
parent::__construct ( $project );
$this->logstore = $logstore;
$this->topic = $topic;
$this->source = $source;
$this->logitems = $logitems;
$this->shardKey = $shardKey;
}
/**
* Get logstroe name
*
* @return string logstore name
*/
public function getLogstore() {
return $this->logstore;
}
/**
* Set logstore name
*
* @param string $logstore
* logstore name
*/
public function setLogstore($logstore) {
$this->logstore = $logstore;
}
/**
* Get topic name
*
* @return string topic name
*/
public function getTopic() {
return $this->topic;
}
/**
* Set topic name
*
* @param string $topic
* topic name
*/
public function setTopic($topic) {
$this->topic = $topic;
}
/**
* Get all the log data
*
* @return array LogItem array, log data
*/
public function getLogItems() {
return $this->logitems;
}
/**
* Set the log data
*
* @param array $logitems
* LogItem array, log data
*/
public function setLogItems($logitems) {
$this->logitems = $logitems;
}
/**
* Get log source
*
* @return string log source
*/
public function getSource() {
return $this->source;
}
/**
* set log source
*
* @param string $source
* log source
*/
public function setSource($source) {
$this->source = $source;
}
/**
* set shard key
*
* @param string shardkey
*/
public function setShardKey($key){
$this -> shardKey=$key;
}
/**
* get shard key
*
* @return string shardKey
*/
public function getShardKey(){
return $this ->shardKey;
}
}