[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 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 | namespace Google\Service;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for CloudTrace (v2).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * Sends application trace data to Cloud Trace for viewing. Trace data is
|
---|
| 27 | * collected for all App Engine applications by default. Trace data from other
|
---|
| 28 | * applications can be provided using this API. This library is used to interact
|
---|
| 29 | * with the Cloud Trace API directly. If you are looking to instrument your
|
---|
| 30 | * application for Cloud Trace, we recommend using OpenTelemetry.</p>
|
---|
| 31 | *
|
---|
| 32 | * <p>
|
---|
| 33 | * For more information about this service, see the API
|
---|
| 34 | * <a href="https://cloud.google.com/trace" target="_blank">Documentation</a>
|
---|
| 35 | * </p>
|
---|
| 36 | *
|
---|
| 37 | * @author Google, Inc.
|
---|
| 38 | */
|
---|
| 39 | class CloudTrace extends \Google\Service
|
---|
| 40 | {
|
---|
| 41 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
| 42 | const CLOUD_PLATFORM =
|
---|
| 43 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
| 44 | /** Write Trace data for a project or application. */
|
---|
| 45 | const TRACE_APPEND =
|
---|
| 46 | "https://www.googleapis.com/auth/trace.append";
|
---|
| 47 |
|
---|
| 48 | public $projects_traces;
|
---|
| 49 | public $projects_traces_spans;
|
---|
| 50 | public $rootUrlTemplate;
|
---|
| 51 |
|
---|
| 52 | /**
|
---|
| 53 | * Constructs the internal representation of the CloudTrace service.
|
---|
| 54 | *
|
---|
| 55 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 56 | * config array to pass to a new Client instance.
|
---|
| 57 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 58 | */
|
---|
| 59 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 60 | {
|
---|
| 61 | parent::__construct($clientOrConfig);
|
---|
| 62 | $this->rootUrl = $rootUrl ?: 'https://cloudtrace.googleapis.com/';
|
---|
| 63 | $this->rootUrlTemplate = $rootUrl ?: 'https://cloudtrace.UNIVERSE_DOMAIN/';
|
---|
| 64 | $this->servicePath = '';
|
---|
| 65 | $this->batchPath = 'batch';
|
---|
| 66 | $this->version = 'v2';
|
---|
| 67 | $this->serviceName = 'cloudtrace';
|
---|
| 68 |
|
---|
| 69 | $this->projects_traces = new CloudTrace\Resource\ProjectsTraces(
|
---|
| 70 | $this,
|
---|
| 71 | $this->serviceName,
|
---|
| 72 | 'traces',
|
---|
| 73 | [
|
---|
| 74 | 'methods' => [
|
---|
| 75 | 'batchWrite' => [
|
---|
| 76 | 'path' => 'v2/{+name}/traces:batchWrite',
|
---|
| 77 | 'httpMethod' => 'POST',
|
---|
| 78 | 'parameters' => [
|
---|
| 79 | 'name' => [
|
---|
| 80 | 'location' => 'path',
|
---|
| 81 | 'type' => 'string',
|
---|
| 82 | 'required' => true,
|
---|
| 83 | ],
|
---|
| 84 | ],
|
---|
| 85 | ],
|
---|
| 86 | ]
|
---|
| 87 | ]
|
---|
| 88 | );
|
---|
| 89 | $this->projects_traces_spans = new CloudTrace\Resource\ProjectsTracesSpans(
|
---|
| 90 | $this,
|
---|
| 91 | $this->serviceName,
|
---|
| 92 | 'spans',
|
---|
| 93 | [
|
---|
| 94 | 'methods' => [
|
---|
| 95 | 'createSpan' => [
|
---|
| 96 | 'path' => 'v2/{+name}',
|
---|
| 97 | 'httpMethod' => 'POST',
|
---|
| 98 | 'parameters' => [
|
---|
| 99 | 'name' => [
|
---|
| 100 | 'location' => 'path',
|
---|
| 101 | 'type' => 'string',
|
---|
| 102 | 'required' => true,
|
---|
| 103 | ],
|
---|
| 104 | ],
|
---|
| 105 | ],
|
---|
| 106 | ]
|
---|
| 107 | ]
|
---|
| 108 | );
|
---|
| 109 | }
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 113 | class_alias(CloudTrace::class, 'Google_Service_CloudTrace');
|
---|