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\NetworkServices\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\NetworkServices\LbRouteExtension;
|
---|
21 | use Google\Service\NetworkServices\ListLbRouteExtensionsResponse;
|
---|
22 | use Google\Service\NetworkServices\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "lbRouteExtensions" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $networkservicesService = new Google\Service\NetworkServices(...);
|
---|
29 | * $lbRouteExtensions = $networkservicesService->projects_locations_lbRouteExtensions;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsLbRouteExtensions extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new `LbRouteExtension` resource in a given project and location.
|
---|
36 | * (lbRouteExtensions.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent resource of the `LbRouteExtension`
|
---|
39 | * resource. Must be in the format `projects/{project}/locations/{location}`.
|
---|
40 | * @param LbRouteExtension $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string lbRouteExtensionId Required. User-provided ID of the
|
---|
44 | * `LbRouteExtension` resource to be created.
|
---|
45 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
46 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
47 | * the server can ignore the request if it has already been completed. The
|
---|
48 | * server guarantees that for at least 60 minutes since the first request. For
|
---|
49 | * example, consider a situation where you make an initial request and the
|
---|
50 | * request times out. If you make the request again with the same request ID,
|
---|
51 | * the server can check if original operation with the same request ID was
|
---|
52 | * received, and if so, ignores the second request. This prevents clients from
|
---|
53 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
54 | * UUID with the exception that zero UUID is not supported
|
---|
55 | * (00000000-0000-0000-0000-000000000000).
|
---|
56 | * @return Operation
|
---|
57 | * @throws \Google\Service\Exception
|
---|
58 | */
|
---|
59 | public function create($parent, LbRouteExtension $postBody, $optParams = [])
|
---|
60 | {
|
---|
61 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
62 | $params = array_merge($params, $optParams);
|
---|
63 | return $this->call('create', [$params], Operation::class);
|
---|
64 | }
|
---|
65 | /**
|
---|
66 | * Deletes the specified `LbRouteExtension` resource. (lbRouteExtensions.delete)
|
---|
67 | *
|
---|
68 | * @param string $name Required. The name of the `LbRouteExtension` resource to
|
---|
69 | * delete. Must be in the format `projects/{project}/locations/{location}/lbRout
|
---|
70 | * eExtensions/{lb_route_extension}`.
|
---|
71 | * @param array $optParams Optional parameters.
|
---|
72 | *
|
---|
73 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
74 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
75 | * the server can ignore the request if it has already been completed. The
|
---|
76 | * server guarantees that for at least 60 minutes after the first request. For
|
---|
77 | * example, consider a situation where you make an initial request and the
|
---|
78 | * request times out. If you make the request again with the same request ID,
|
---|
79 | * the server can check if original operation with the same request ID was
|
---|
80 | * received, and if so, ignores the second request. This prevents clients from
|
---|
81 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
82 | * UUID with the exception that zero UUID is not supported
|
---|
83 | * (00000000-0000-0000-0000-000000000000).
|
---|
84 | * @return Operation
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function delete($name, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['name' => $name];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('delete', [$params], Operation::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Gets details of the specified `LbRouteExtension` resource.
|
---|
95 | * (lbRouteExtensions.get)
|
---|
96 | *
|
---|
97 | * @param string $name Required. A name of the `LbRouteExtension` resource to
|
---|
98 | * get. Must be in the format `projects/{project}/locations/{location}/lbRouteEx
|
---|
99 | * tensions/{lb_route_extension}`.
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | * @return LbRouteExtension
|
---|
102 | * @throws \Google\Service\Exception
|
---|
103 | */
|
---|
104 | public function get($name, $optParams = [])
|
---|
105 | {
|
---|
106 | $params = ['name' => $name];
|
---|
107 | $params = array_merge($params, $optParams);
|
---|
108 | return $this->call('get', [$params], LbRouteExtension::class);
|
---|
109 | }
|
---|
110 | /**
|
---|
111 | * Lists `LbRouteExtension` resources in a given project and location.
|
---|
112 | * (lbRouteExtensions.listProjectsLocationsLbRouteExtensions)
|
---|
113 | *
|
---|
114 | * @param string $parent Required. The project and location from which the
|
---|
115 | * `LbRouteExtension` resources are listed, specified in the following format:
|
---|
116 | * `projects/{project}/locations/{location}`.
|
---|
117 | * @param array $optParams Optional parameters.
|
---|
118 | *
|
---|
119 | * @opt_param string filter Optional. Filtering results.
|
---|
120 | * @opt_param string orderBy Optional. Hint for how to order the results.
|
---|
121 | * @opt_param int pageSize Optional. Requested page size. The server might
|
---|
122 | * return fewer items than requested. If unspecified, the server picks an
|
---|
123 | * appropriate default.
|
---|
124 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
125 | * that the server returns.
|
---|
126 | * @return ListLbRouteExtensionsResponse
|
---|
127 | * @throws \Google\Service\Exception
|
---|
128 | */
|
---|
129 | public function listProjectsLocationsLbRouteExtensions($parent, $optParams = [])
|
---|
130 | {
|
---|
131 | $params = ['parent' => $parent];
|
---|
132 | $params = array_merge($params, $optParams);
|
---|
133 | return $this->call('list', [$params], ListLbRouteExtensionsResponse::class);
|
---|
134 | }
|
---|
135 | /**
|
---|
136 | * Updates the parameters of the specified `LbRouteExtension` resource.
|
---|
137 | * (lbRouteExtensions.patch)
|
---|
138 | *
|
---|
139 | * @param string $name Required. Identifier. Name of the `LbRouteExtension`
|
---|
140 | * resource in the following format: `projects/{project}/locations/{location}/lb
|
---|
141 | * RouteExtensions/{lb_route_extension}`.
|
---|
142 | * @param LbRouteExtension $postBody
|
---|
143 | * @param array $optParams Optional parameters.
|
---|
144 | *
|
---|
145 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
146 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
147 | * the server can ignore the request if it has already been completed. The
|
---|
148 | * server guarantees that for at least 60 minutes since the first request. For
|
---|
149 | * example, consider a situation where you make an initial request and the
|
---|
150 | * request times out. If you make the request again with the same request ID,
|
---|
151 | * the server can check if original operation with the same request ID was
|
---|
152 | * received, and if so, ignores the second request. This prevents clients from
|
---|
153 | * accidentally creating duplicate commitments. The request ID must be a valid
|
---|
154 | * UUID with the exception that zero UUID is not supported
|
---|
155 | * (00000000-0000-0000-0000-000000000000).
|
---|
156 | * @opt_param string updateMask Optional. Used to specify the fields to be
|
---|
157 | * overwritten in the `LbRouteExtension` resource by the update. The fields
|
---|
158 | * specified in the `update_mask` are relative to the resource, not the full
|
---|
159 | * request. A field is overwritten if it is in the mask. If the user does not
|
---|
160 | * specify a mask, then all fields are overwritten.
|
---|
161 | * @return Operation
|
---|
162 | * @throws \Google\Service\Exception
|
---|
163 | */
|
---|
164 | public function patch($name, LbRouteExtension $postBody, $optParams = [])
|
---|
165 | {
|
---|
166 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
167 | $params = array_merge($params, $optParams);
|
---|
168 | return $this->call('patch', [$params], Operation::class);
|
---|
169 | }
|
---|
170 | }
|
---|
171 |
|
---|
172 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
173 | class_alias(ProjectsLocationsLbRouteExtensions::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsLbRouteExtensions');
|
---|