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
18namespace Google\Service\Apigee\Resource;
19
20use Google\Service\Apigee\GoogleCloudApigeeV1ListTraceConfigOverridesResponse;
21use Google\Service\Apigee\GoogleCloudApigeeV1TraceConfigOverride;
22use Google\Service\Apigee\GoogleProtobufEmpty;
23
24/**
25 * The "overrides" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $apigeeService = new Google\Service\Apigee(...);
29 *   $overrides = $apigeeService->overrides;
30 *  </code>
31 */
32class OrganizationsEnvironmentsTraceConfigOverrides extends \Google\Service\Resource
33{
34  /**
35   * Creates a trace configuration override. The response contains a system-
36   * generated UUID, that can be used to view, update, or delete the configuration
37   * override. Use the List API to view the existing trace configuration
38   * overrides. (overrides.create)
39   *
40   * @param string $parent Required. Parent resource of the trace configuration
41   * override. Use the following structure in your request.
42   * "organizations/environments/traceConfig".
43   * @param GoogleCloudApigeeV1TraceConfigOverride $postBody
44   * @param array $optParams Optional parameters.
45   * @return GoogleCloudApigeeV1TraceConfigOverride
46   */
47  public function create($parent, GoogleCloudApigeeV1TraceConfigOverride $postBody, $optParams = [])
48  {
49    $params = ['parent' => $parent, 'postBody' => $postBody];
50    $params = array_merge($params, $optParams);
51    return $this->call('create', [$params], GoogleCloudApigeeV1TraceConfigOverride::class);
52  }
53  /**
54   * Deletes a distributed trace configuration override. (overrides.delete)
55   *
56   * @param string $name Required. Name of the trace configuration override. Use
57   * the following structure in your request:
58   * "organizations/environments/traceConfig/overrides".
59   * @param array $optParams Optional parameters.
60   * @return GoogleProtobufEmpty
61   */
62  public function delete($name, $optParams = [])
63  {
64    $params = ['name' => $name];
65    $params = array_merge($params, $optParams);
66    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
67  }
68  /**
69   * Gets a trace configuration override. (overrides.get)
70   *
71   * @param string $name Required. Name of the trace configuration override. Use
72   * the following structure in your request:
73   * "organizations/environments/traceConfig/overrides".
74   * @param array $optParams Optional parameters.
75   * @return GoogleCloudApigeeV1TraceConfigOverride
76   */
77  public function get($name, $optParams = [])
78  {
79    $params = ['name' => $name];
80    $params = array_merge($params, $optParams);
81    return $this->call('get', [$params], GoogleCloudApigeeV1TraceConfigOverride::class);
82  }
83  /**
84   * Lists all of the distributed trace configuration overrides in an environment.
85   * (overrides.listOrganizationsEnvironmentsTraceConfigOverrides)
86   *
87   * @param string $parent Required. Parent resource of the trace configuration
88   * override. Use the following structure in your request:
89   * "organizations/environments/traceConfig".
90   * @param array $optParams Optional parameters.
91   *
92   * @opt_param int pageSize Maximum number of trace configuration overrides to
93   * return. If not specified, the maximum number returned is 25. The maximum
94   * number cannot exceed 100.
95   * @opt_param string pageToken A page token, returned from a previous
96   * `ListTraceConfigOverrides` call. Token value that can be used to retrieve the
97   * subsequent page. When paginating, all other parameters provided to
98   * `ListTraceConfigOverrides` must match those specified in the call to obtain
99   * the page token.
100   * @return GoogleCloudApigeeV1ListTraceConfigOverridesResponse
101   */
102  public function listOrganizationsEnvironmentsTraceConfigOverrides($parent, $optParams = [])
103  {
104    $params = ['parent' => $parent];
105    $params = array_merge($params, $optParams);
106    return $this->call('list', [$params], GoogleCloudApigeeV1ListTraceConfigOverridesResponse::class);
107  }
108  /**
109   * Updates a distributed trace configuration override. Note that the repeated
110   * fields have replace semantics when included in the field mask and that they
111   * will be overwritten by the value of the fields in the request body.
112   * (overrides.patch)
113   *
114   * @param string $name Required. Name of the trace configuration override. Use
115   * the following structure in your request:
116   * "organizations/environments/traceConfig/overrides".
117   * @param GoogleCloudApigeeV1TraceConfigOverride $postBody
118   * @param array $optParams Optional parameters.
119   *
120   * @opt_param string updateMask List of fields to be updated.
121   * @return GoogleCloudApigeeV1TraceConfigOverride
122   */
123  public function patch($name, GoogleCloudApigeeV1TraceConfigOverride $postBody, $optParams = [])
124  {
125    $params = ['name' => $name, 'postBody' => $postBody];
126    $params = array_merge($params, $optParams);
127    return $this->call('patch', [$params], GoogleCloudApigeeV1TraceConfigOverride::class);
128  }
129}
130
131// Adding a class alias for backwards compatibility with the previous class name.
132class_alias(OrganizationsEnvironmentsTraceConfigOverrides::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsTraceConfigOverrides');
133