| 1 |
efrain |
1 |
<?php
|
|
|
2 |
/*
|
|
|
3 |
* Copyright 2010 Google Inc.
|
|
|
4 |
*
|
|
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
6 |
* use this file except in compliance with the License. You may obtain a copy of
|
|
|
7 |
* the License at
|
|
|
8 |
*
|
|
|
9 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
10 |
*
|
|
|
11 |
* Unless required by applicable law or agreed to in writing, software
|
|
|
12 |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
13 |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
14 |
* License for the specific language governing permissions and limitations under
|
|
|
15 |
* the License.
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
/**
|
|
|
19 |
* Service definition for Cloudtrace (v1).
|
|
|
20 |
*
|
|
|
21 |
* <p>
|
|
|
22 |
* The Google Cloud Trace API provides services for reading and writing runtime
|
|
|
23 |
* trace data for Cloud applications.</p>
|
|
|
24 |
*
|
|
|
25 |
* <p>
|
|
|
26 |
* For more information about this service, see the API
|
|
|
27 |
* <a href="https://cloud.google.com/tools/cloud-trace" target="_blank">Documentation</a>
|
|
|
28 |
* </p>
|
|
|
29 |
*
|
|
|
30 |
* @author Google, Inc.
|
|
|
31 |
*/
|
|
|
32 |
#[AllowDynamicProperties]
|
|
|
33 |
class Google_Service_Cloudtrace extends Google_Service
|
|
|
34 |
{
|
|
|
35 |
/** View and manage your data across Google Cloud Platform services. */
|
|
|
36 |
const CLOUD_PLATFORM =
|
|
|
37 |
"https://www.googleapis.com/auth/cloud-platform";
|
|
|
38 |
|
|
|
39 |
public $projects;
|
|
|
40 |
public $projects_traces;
|
|
|
41 |
public $v1;
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
/**
|
|
|
45 |
* Constructs the internal representation of the Cloudtrace service.
|
|
|
46 |
*
|
|
|
47 |
* @param Google_Client $client
|
|
|
48 |
*/
|
|
|
49 |
public function __construct(Google_Client $client)
|
|
|
50 |
{
|
|
|
51 |
parent::__construct($client);
|
|
|
52 |
$this->rootUrl = 'https://cloudtrace.googleapis.com/';
|
|
|
53 |
$this->servicePath = '';
|
|
|
54 |
$this->version = 'v1';
|
|
|
55 |
$this->serviceName = 'cloudtrace';
|
|
|
56 |
|
|
|
57 |
$this->projects = new Google_Service_Cloudtrace_Projects_Resource(
|
|
|
58 |
$this,
|
|
|
59 |
$this->serviceName,
|
|
|
60 |
'projects',
|
|
|
61 |
array(
|
|
|
62 |
'methods' => array(
|
|
|
63 |
'patchTraces' => array(
|
|
|
64 |
'path' => 'v1/projects/{projectId}/traces',
|
|
|
65 |
'httpMethod' => 'PATCH',
|
|
|
66 |
'parameters' => array(
|
|
|
67 |
'projectId' => array(
|
|
|
68 |
'location' => 'path',
|
|
|
69 |
'type' => 'string',
|
|
|
70 |
'required' => true,
|
|
|
71 |
),
|
|
|
72 |
),
|
|
|
73 |
),
|
|
|
74 |
)
|
|
|
75 |
)
|
|
|
76 |
);
|
|
|
77 |
$this->projects_traces = new Google_Service_Cloudtrace_ProjectsTraces_Resource(
|
|
|
78 |
$this,
|
|
|
79 |
$this->serviceName,
|
|
|
80 |
'traces',
|
|
|
81 |
array(
|
|
|
82 |
'methods' => array(
|
|
|
83 |
'get' => array(
|
|
|
84 |
'path' => 'v1/projects/{projectId}/traces/{traceId}',
|
|
|
85 |
'httpMethod' => 'GET',
|
|
|
86 |
'parameters' => array(
|
|
|
87 |
'projectId' => array(
|
|
|
88 |
'location' => 'path',
|
|
|
89 |
'type' => 'string',
|
|
|
90 |
'required' => true,
|
|
|
91 |
),
|
|
|
92 |
'traceId' => array(
|
|
|
93 |
'location' => 'path',
|
|
|
94 |
'type' => 'string',
|
|
|
95 |
'required' => true,
|
|
|
96 |
),
|
|
|
97 |
),
|
|
|
98 |
),'list' => array(
|
|
|
99 |
'path' => 'v1/projects/{projectId}/traces',
|
|
|
100 |
'httpMethod' => 'GET',
|
|
|
101 |
'parameters' => array(
|
|
|
102 |
'projectId' => array(
|
|
|
103 |
'location' => 'path',
|
|
|
104 |
'type' => 'string',
|
|
|
105 |
'required' => true,
|
|
|
106 |
),
|
|
|
107 |
'orderBy' => array(
|
|
|
108 |
'location' => 'query',
|
|
|
109 |
'type' => 'string',
|
|
|
110 |
),
|
|
|
111 |
'pageSize' => array(
|
|
|
112 |
'location' => 'query',
|
|
|
113 |
'type' => 'integer',
|
|
|
114 |
),
|
|
|
115 |
'filter' => array(
|
|
|
116 |
'location' => 'query',
|
|
|
117 |
'type' => 'string',
|
|
|
118 |
),
|
|
|
119 |
'pageToken' => array(
|
|
|
120 |
'location' => 'query',
|
|
|
121 |
'type' => 'string',
|
|
|
122 |
),
|
|
|
123 |
'startTime' => array(
|
|
|
124 |
'location' => 'query',
|
|
|
125 |
'type' => 'string',
|
|
|
126 |
),
|
|
|
127 |
'endTime' => array(
|
|
|
128 |
'location' => 'query',
|
|
|
129 |
'type' => 'string',
|
|
|
130 |
),
|
|
|
131 |
'view' => array(
|
|
|
132 |
'location' => 'query',
|
|
|
133 |
'type' => 'string',
|
|
|
134 |
),
|
|
|
135 |
),
|
|
|
136 |
),
|
|
|
137 |
)
|
|
|
138 |
)
|
|
|
139 |
);
|
|
|
140 |
$this->v1 = new Google_Service_Cloudtrace_V1_Resource(
|
|
|
141 |
$this,
|
|
|
142 |
$this->serviceName,
|
|
|
143 |
'v1',
|
|
|
144 |
array(
|
|
|
145 |
'methods' => array(
|
|
|
146 |
'getDiscovery' => array(
|
|
|
147 |
'path' => 'v1/discovery',
|
|
|
148 |
'httpMethod' => 'GET',
|
|
|
149 |
'parameters' => array(
|
|
|
150 |
'labels' => array(
|
|
|
151 |
'location' => 'query',
|
|
|
152 |
'type' => 'string',
|
|
|
153 |
'repeated' => true,
|
|
|
154 |
),
|
|
|
155 |
'version' => array(
|
|
|
156 |
'location' => 'query',
|
|
|
157 |
'type' => 'string',
|
|
|
158 |
),
|
|
|
159 |
'args' => array(
|
|
|
160 |
'location' => 'query',
|
|
|
161 |
'type' => 'string',
|
|
|
162 |
'repeated' => true,
|
|
|
163 |
),
|
|
|
164 |
'format' => array(
|
|
|
165 |
'location' => 'query',
|
|
|
166 |
'type' => 'string',
|
|
|
167 |
),
|
|
|
168 |
),
|
|
|
169 |
),
|
|
|
170 |
)
|
|
|
171 |
)
|
|
|
172 |
);
|
|
|
173 |
}
|
|
|
174 |
}
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
/**
|
|
|
178 |
* The "projects" collection of methods.
|
|
|
179 |
* Typical usage is:
|
|
|
180 |
* <code>
|
|
|
181 |
* $cloudtraceService = new Google_Service_Cloudtrace(...);
|
|
|
182 |
* $projects = $cloudtraceService->projects;
|
|
|
183 |
* </code>
|
|
|
184 |
*/
|
|
|
185 |
#[AllowDynamicProperties]
|
|
|
186 |
class Google_Service_Cloudtrace_Projects_Resource extends Google_Service_Resource
|
|
|
187 |
{
|
|
|
188 |
|
|
|
189 |
/**
|
|
|
190 |
* Updates the existing traces specified by PatchTracesRequest and inserts the
|
|
|
191 |
* new traces. Any existing trace or span fields included in an update are
|
|
|
192 |
* overwritten by the update, and any additional fields in an update are merged
|
|
|
193 |
* with the existing trace data. (projects.patchTraces)
|
|
|
194 |
*
|
|
|
195 |
* @param string $projectId The project id of the trace to patch.
|
|
|
196 |
* @param Google_Traces $postBody
|
|
|
197 |
* @param array $optParams Optional parameters.
|
|
|
198 |
* @return Google_Service_Cloudtrace_Empty
|
|
|
199 |
*/
|
|
|
200 |
public function patchTraces($projectId, Google_Service_Cloudtrace_Traces $postBody, $optParams = array())
|
|
|
201 |
{
|
|
|
202 |
$params = array('projectId' => $projectId, 'postBody' => $postBody);
|
|
|
203 |
$params = array_merge($params, $optParams);
|
|
|
204 |
return $this->call('patchTraces', array($params), "Google_Service_Cloudtrace_Empty");
|
|
|
205 |
}
|
|
|
206 |
}
|
|
|
207 |
|
|
|
208 |
/**
|
|
|
209 |
* The "traces" collection of methods.
|
|
|
210 |
* Typical usage is:
|
|
|
211 |
* <code>
|
|
|
212 |
* $cloudtraceService = new Google_Service_Cloudtrace(...);
|
|
|
213 |
* $traces = $cloudtraceService->traces;
|
|
|
214 |
* </code>
|
|
|
215 |
*/
|
|
|
216 |
#[AllowDynamicProperties]
|
|
|
217 |
class Google_Service_Cloudtrace_ProjectsTraces_Resource extends Google_Service_Resource
|
|
|
218 |
{
|
|
|
219 |
|
|
|
220 |
/**
|
|
|
221 |
* Gets one trace by id. (traces.get)
|
|
|
222 |
*
|
|
|
223 |
* @param string $projectId The project id of the trace to return.
|
|
|
224 |
* @param string $traceId The trace id of the trace to return.
|
|
|
225 |
* @param array $optParams Optional parameters.
|
|
|
226 |
* @return Google_Service_Cloudtrace_Trace
|
|
|
227 |
*/
|
|
|
228 |
public function get($projectId, $traceId, $optParams = array())
|
|
|
229 |
{
|
|
|
230 |
$params = array('projectId' => $projectId, 'traceId' => $traceId);
|
|
|
231 |
$params = array_merge($params, $optParams);
|
|
|
232 |
return $this->call('get', array($params), "Google_Service_Cloudtrace_Trace");
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
/**
|
|
|
236 |
* List traces matching the filter expression. (traces.listProjectsTraces)
|
|
|
237 |
*
|
|
|
238 |
* @param string $projectId The stringified-version of the project id.
|
|
|
239 |
* @param array $optParams Optional parameters.
|
|
|
240 |
*
|
|
|
241 |
* @opt_param string orderBy The trace field used to establish the order of
|
|
|
242 |
* traces returned by the ListTraces method. Possible options are: trace_id name
|
|
|
243 |
* (name field of root span) duration (different between end_time and start_time
|
|
|
244 |
* fields of root span) start (start_time field of root span) Descending order
|
|
|
245 |
* can be specified by appending "desc" to the sort field: name desc Only one
|
|
|
246 |
* sort field is permitted, though this may change in the future.
|
|
|
247 |
* @opt_param int pageSize Maximum number of topics to return. If not specified
|
|
|
248 |
* or <= 0, the implementation will select a reasonable value. The implemenation
|
|
|
249 |
* may always return fewer than the requested page_size.
|
|
|
250 |
* @opt_param string filter An optional filter for the request.
|
|
|
251 |
* @opt_param string pageToken The token identifying the page of results to
|
|
|
252 |
* return from the ListTraces method. If present, this value is should be taken
|
|
|
253 |
* from the next_page_token field of a previous ListTracesResponse.
|
|
|
254 |
* @opt_param string startTime End of the time interval (inclusive).
|
|
|
255 |
* @opt_param string endTime Start of the time interval (exclusive).
|
|
|
256 |
* @opt_param string view ViewType specifies the projection of the result.
|
|
|
257 |
* @return Google_Service_Cloudtrace_ListTracesResponse
|
|
|
258 |
*/
|
|
|
259 |
public function listProjectsTraces($projectId, $optParams = array())
|
|
|
260 |
{
|
|
|
261 |
$params = array('projectId' => $projectId);
|
|
|
262 |
$params = array_merge($params, $optParams);
|
|
|
263 |
return $this->call('list', array($params), "Google_Service_Cloudtrace_ListTracesResponse");
|
|
|
264 |
}
|
|
|
265 |
}
|
|
|
266 |
|
|
|
267 |
/**
|
|
|
268 |
* The "v1" collection of methods.
|
|
|
269 |
* Typical usage is:
|
|
|
270 |
* <code>
|
|
|
271 |
* $cloudtraceService = new Google_Service_Cloudtrace(...);
|
|
|
272 |
* $v1 = $cloudtraceService->v1;
|
|
|
273 |
* </code>
|
|
|
274 |
*/
|
|
|
275 |
#[AllowDynamicProperties]
|
|
|
276 |
class Google_Service_Cloudtrace_V1_Resource extends Google_Service_Resource
|
|
|
277 |
{
|
|
|
278 |
|
|
|
279 |
/**
|
|
|
280 |
* Returns a discovery document in the specified `format`. The typeurl in the
|
|
|
281 |
* returned google.protobuf.Any value depends on the requested format.
|
|
|
282 |
* (v1.getDiscovery)
|
|
|
283 |
*
|
|
|
284 |
* @param array $optParams Optional parameters.
|
|
|
285 |
*
|
|
|
286 |
* @opt_param string labels A list of labels (like visibility) influencing the
|
|
|
287 |
* scope of the requested doc.
|
|
|
288 |
* @opt_param string version The API version of the requested discovery doc.
|
|
|
289 |
* @opt_param string args Any additional arguments.
|
|
|
290 |
* @opt_param string format The format requested for discovery.
|
|
|
291 |
*/
|
|
|
292 |
public function getDiscovery($optParams = array())
|
|
|
293 |
{
|
|
|
294 |
$params = array();
|
|
|
295 |
$params = array_merge($params, $optParams);
|
|
|
296 |
return $this->call('getDiscovery', array($params));
|
|
|
297 |
}
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
#[AllowDynamicProperties]
|
|
|
304 |
class Google_Service_Cloudtrace_Empty extends Google_Model
|
|
|
305 |
{
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
#[AllowDynamicProperties]
|
|
|
309 |
class Google_Service_Cloudtrace_ListTracesResponse extends Google_Collection
|
|
|
310 |
{
|
|
|
311 |
protected $collection_key = 'traces';
|
|
|
312 |
protected $internal_gapi_mappings = array(
|
|
|
313 |
);
|
|
|
314 |
public $nextPageToken;
|
|
|
315 |
protected $tracesType = 'Google_Service_Cloudtrace_Trace';
|
|
|
316 |
protected $tracesDataType = 'array';
|
|
|
317 |
|
|
|
318 |
|
|
|
319 |
public function setNextPageToken($nextPageToken)
|
|
|
320 |
{
|
|
|
321 |
$this->nextPageToken = $nextPageToken;
|
|
|
322 |
}
|
|
|
323 |
public function getNextPageToken()
|
|
|
324 |
{
|
|
|
325 |
return $this->nextPageToken;
|
|
|
326 |
}
|
|
|
327 |
public function setTraces($traces)
|
|
|
328 |
{
|
|
|
329 |
$this->traces = $traces;
|
|
|
330 |
}
|
|
|
331 |
public function getTraces()
|
|
|
332 |
{
|
|
|
333 |
return $this->traces;
|
|
|
334 |
}
|
|
|
335 |
}
|
|
|
336 |
|
|
|
337 |
#[AllowDynamicProperties]
|
|
|
338 |
class Google_Service_Cloudtrace_Trace extends Google_Collection
|
|
|
339 |
{
|
|
|
340 |
protected $collection_key = 'spans';
|
|
|
341 |
protected $internal_gapi_mappings = array(
|
|
|
342 |
);
|
|
|
343 |
public $projectId;
|
|
|
344 |
protected $spansType = 'Google_Service_Cloudtrace_TraceSpan';
|
|
|
345 |
protected $spansDataType = 'array';
|
|
|
346 |
public $traceId;
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
public function setProjectId($projectId)
|
|
|
350 |
{
|
|
|
351 |
$this->projectId = $projectId;
|
|
|
352 |
}
|
|
|
353 |
public function getProjectId()
|
|
|
354 |
{
|
|
|
355 |
return $this->projectId;
|
|
|
356 |
}
|
|
|
357 |
public function setSpans($spans)
|
|
|
358 |
{
|
|
|
359 |
$this->spans = $spans;
|
|
|
360 |
}
|
|
|
361 |
public function getSpans()
|
|
|
362 |
{
|
|
|
363 |
return $this->spans;
|
|
|
364 |
}
|
|
|
365 |
public function setTraceId($traceId)
|
|
|
366 |
{
|
|
|
367 |
$this->traceId = $traceId;
|
|
|
368 |
}
|
|
|
369 |
public function getTraceId()
|
|
|
370 |
{
|
|
|
371 |
return $this->traceId;
|
|
|
372 |
}
|
|
|
373 |
}
|
|
|
374 |
|
|
|
375 |
#[AllowDynamicProperties]
|
|
|
376 |
class Google_Service_Cloudtrace_TraceSpan extends Google_Model
|
|
|
377 |
{
|
|
|
378 |
protected $internal_gapi_mappings = array(
|
|
|
379 |
);
|
|
|
380 |
public $endTime;
|
|
|
381 |
public $kind;
|
|
|
382 |
public $labels;
|
|
|
383 |
public $name;
|
|
|
384 |
public $parentSpanId;
|
|
|
385 |
public $spanId;
|
|
|
386 |
public $startTime;
|
|
|
387 |
|
|
|
388 |
|
|
|
389 |
public function setEndTime($endTime)
|
|
|
390 |
{
|
|
|
391 |
$this->endTime = $endTime;
|
|
|
392 |
}
|
|
|
393 |
public function getEndTime()
|
|
|
394 |
{
|
|
|
395 |
return $this->endTime;
|
|
|
396 |
}
|
|
|
397 |
public function setKind($kind)
|
|
|
398 |
{
|
|
|
399 |
$this->kind = $kind;
|
|
|
400 |
}
|
|
|
401 |
public function getKind()
|
|
|
402 |
{
|
|
|
403 |
return $this->kind;
|
|
|
404 |
}
|
|
|
405 |
public function setLabels($labels)
|
|
|
406 |
{
|
|
|
407 |
$this->labels = $labels;
|
|
|
408 |
}
|
|
|
409 |
public function getLabels()
|
|
|
410 |
{
|
|
|
411 |
return $this->labels;
|
|
|
412 |
}
|
|
|
413 |
public function setName($name)
|
|
|
414 |
{
|
|
|
415 |
$this->name = $name;
|
|
|
416 |
}
|
|
|
417 |
public function getName()
|
|
|
418 |
{
|
|
|
419 |
return $this->name;
|
|
|
420 |
}
|
|
|
421 |
public function setParentSpanId($parentSpanId)
|
|
|
422 |
{
|
|
|
423 |
$this->parentSpanId = $parentSpanId;
|
|
|
424 |
}
|
|
|
425 |
public function getParentSpanId()
|
|
|
426 |
{
|
|
|
427 |
return $this->parentSpanId;
|
|
|
428 |
}
|
|
|
429 |
public function setSpanId($spanId)
|
|
|
430 |
{
|
|
|
431 |
$this->spanId = $spanId;
|
|
|
432 |
}
|
|
|
433 |
public function getSpanId()
|
|
|
434 |
{
|
|
|
435 |
return $this->spanId;
|
|
|
436 |
}
|
|
|
437 |
public function setStartTime($startTime)
|
|
|
438 |
{
|
|
|
439 |
$this->startTime = $startTime;
|
|
|
440 |
}
|
|
|
441 |
public function getStartTime()
|
|
|
442 |
{
|
|
|
443 |
return $this->startTime;
|
|
|
444 |
}
|
|
|
445 |
}
|
|
|
446 |
|
|
|
447 |
#[AllowDynamicProperties]
|
|
|
448 |
class Google_Service_Cloudtrace_TraceSpanLabels extends Google_Model
|
|
|
449 |
{
|
|
|
450 |
}
|
|
|
451 |
|
|
|
452 |
#[AllowDynamicProperties]
|
|
|
453 |
class Google_Service_Cloudtrace_Traces extends Google_Collection
|
|
|
454 |
{
|
|
|
455 |
protected $collection_key = 'traces';
|
|
|
456 |
protected $internal_gapi_mappings = array(
|
|
|
457 |
);
|
|
|
458 |
protected $tracesType = 'Google_Service_Cloudtrace_Trace';
|
|
|
459 |
protected $tracesDataType = 'array';
|
|
|
460 |
|
|
|
461 |
|
|
|
462 |
public function setTraces($traces)
|
|
|
463 |
{
|
|
|
464 |
$this->traces = $traces;
|
|
|
465 |
}
|
|
|
466 |
public function getTraces()
|
|
|
467 |
{
|
|
|
468 |
return $this->traces;
|
|
|
469 |
}
|
|
|
470 |
}
|