Config.php
6.48 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
/**
* Copyright (C) Alibaba Cloud Computing
* All rights reserved
*/
class Aliyun_Log_Models_Config_InputDetail {
public $filePattern;
public $key;
public $localStorage;
public $logBeginRegex;
public $logPath;
public $logType;
public $regex;
public $timeFormat;
public $filterRegex;
public $filterKey;
public $topicFormat;
public function __construct($filePattern='',$key=array(),$localStorage=true,
$logBeginRegex='',$logPath='',$logType='',$regex='',
$timeFormat='',$filterRegex=array(),$filterKey=array(),$topicFormat='none'){
$this->filePattern=$filePattern;
$this->key=$key;
$this->localStorage=$localStorage;
$this->logBeginRegex=$logBeginRegex;
$this->logPath=$logPath;
$this->logType=$logType;
$this->regex=$regex;
$this->timeFormat=$timeFormat;
$this->filterRegex=$filterRegex;
$this->filterKey=$filterKey;
$this->topicFormat=$topicFormat;
}
public function toArray(){
$resArray = array();
if($this->filePattern!==null)
$resArray['filePattern'] = $this->filePattern;
if($this->key!==null)
$resArray['key'] = $this->key;
if($this->localStorage!==null)
$resArray['localStorage'] = $this->localStorage;
if($this->logBeginRegex!==null)
$resArray['logBeginRegex'] = $this->logBeginRegex;
if($this->logPath!==null)
$resArray['logPath'] = $this->logPath;
if($this->logType!==null)
$resArray['logType'] = $this->logType;
if($this->regex!==null)
$resArray['regex'] = $this->regex;
if($this->timeFormat!==null)
$resArray['timeFormat'] = $this->timeFormat;
if($this->filterRegex!==null)
$resArray['filterRegex'] = $this->filterRegex;
if($this->filterKey!==null)
$resArray['filterKey'] = $this->filterKey;
if($this->topicFormat!==null)
$resArray['topicFormat'] = $this->topicFormat;
return $resArray;
}
}
class Aliyun_Log_Models_Config_OutputDetail {
public $projectName;
public $logstoreName;
public function __construct($projectName='',$logstoreName=''){
$this->projectName = $projectName;
$this->logstoreName = $logstoreName;
}
public function toArray(){
$resArray = array();
if($this->projectName!==null)
$resArray['projectName'] = $this->projectName;
if($this->logstoreName!==null)
$resArray['logstoreName'] = $this->logstoreName;
return $resArray;
}
}
class Aliyun_Log_Models_Config {
private $configName;
private $inputType;
private $inputDetail;
private $outputType;
private $outputDetail;
private $createTime;
private $lastModifyTime;
public function __construct($configName='',$inputType='',$inputDetail=null,
$outputType='',$outputDetail=null,$createTime=null,$lastModifyTime=null) {
$this->configName = $configName;
$this->inputType = $inputType;
$this->inputDetail = $inputDetail;
$this->outputType = $outputType;
$this->outputDetail = $outputDetail;
$this->createTime = $createTime;
$this->lastModifyTime = $lastModifyTime;
}
public function getConfigName(){
return $this->configName;
}
public function setConfigName($configName){
$this->configName = $configName;
}
public function getInputType(){
return $this->inputType;
}
public function setInputType($inputType){
$this->inputType = $inputType;
}
public function getInputDetail(){
return $this->inputDetail;
}
public function setInputDetail($inputDetail){
$this->inputDetail = $inputDetail;
}
public function getOutputType(){
return $this->outputType;
}
public function setOutputType($outputType){
$this->outputType = $outputType;
}
public function getOutputDetail(){
return $this->outputDetail;
}
public function setOutputDetail($outputDetail){
$this->outputDetail = $outputDetail;
}
public function getCreateTime(){
return $this->createTime;
}
public function setCreateTime($createTime){
$this->createTime = $createTime;
}
public function getLastModifyTime(){
return $this->lastModifyTime;
}
public function setLastModifyTime($lastModifyTime){
$this->lastModifyTime = $lastModifyTime;
}
public function toArray(){
$format_array = array();
if($this->configName!==null)
$format_array['configName'] = $this->configName;
if($this->inputType!==null)
$format_array['inputType'] = $this->inputType;
if($this->inputDetail!==null)
$format_array['inputDetail'] = $this->inputDetail->toArray();
if($this->outputType!==null)
$format_array['outputType'] = $this->outputType;
if($this->outputDetail!==null)
$format_array['outputDetail'] = $this->outputDetail->toArray();
if($this->createTime!==null)
$format_array['createTime'] = $this->createTime;
if($this->lastModifyTime!==null)
$format_array['lastModifyTime'] = $this->lastModifyTime;
return $format_array;
}
public function setFromArray($resp){
$inputDetail = new Aliyun_Log_Models_Config_InputDetail();
$inputDetail->filePattern = $resp['inputDetail']['filePattern'];
$inputDetail->key = $resp['inputDetail']['key'];
$inputDetail->localStorage = $resp['inputDetail']['localStorage'];
$inputDetail->logBeginRegex = $resp['inputDetail']['logBeginRegex'];
$inputDetail->logPath = $resp['inputDetail']['logPath'];
$inputDetail->logType = $resp['inputDetail']['logType'];
$inputDetail->regex = $resp['inputDetail']['regex'];
$inputDetail->timeFormat = $resp['inputDetail']['timeFormat'];
$inputDetail->filterRegex = $resp['inputDetail']['filterRegex'];
$inputDetail->filterKey = $resp['inputDetail']['filterKey'];
$inputDetail->topicFormat = $resp['inputDetail']['topicFormat'];
$outputDetail = new Aliyun_Log_Models_Config_OutputDetail();
$outputDetail->projectName = $resp['outputDetail']['projectName'];
$outputDetail->logstoreName = $resp['outputDetail']['logstoreName'];
$configName=$resp['configName'];
$inputType=$resp['inputType'];
$outputType=$resp['outputType'];
$this->setConfigName($configName);
$this->setInputType($inputType);
$this->setInputDetail($inputDetail);
$this->setOutputType($outputType);
$this->setOutputDetail($outputDetail);
}
}