source: vendor/google/apiclient-services/src/Networkconnectivity/Resource/ProjectsLocationsServiceClasses.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 9.9 KB
Line 
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\Networkconnectivity\Resource;
19
20use Google\Service\Networkconnectivity\GoogleLongrunningOperation;
21use Google\Service\Networkconnectivity\ListServiceClassesResponse;
22use Google\Service\Networkconnectivity\Policy;
23use Google\Service\Networkconnectivity\ServiceClass;
24use Google\Service\Networkconnectivity\SetIamPolicyRequest;
25use Google\Service\Networkconnectivity\TestIamPermissionsRequest;
26use Google\Service\Networkconnectivity\TestIamPermissionsResponse;
27
28/**
29 * The "serviceClasses" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $networkconnectivityService = new Google\Service\Networkconnectivity(...);
33 * $serviceClasses = $networkconnectivityService->projects_locations_serviceClasses;
34 * </code>
35 */
36class ProjectsLocationsServiceClasses extends \Google\Service\Resource
37{
38 /**
39 * Deletes a single ServiceClass. (serviceClasses.delete)
40 *
41 * @param string $name Required. The name of the ServiceClass to delete.
42 * @param array $optParams Optional parameters.
43 *
44 * @opt_param string etag Optional. The etag is computed by the server, and may
45 * be sent on update and delete requests to ensure the client has an up-to-date
46 * value before proceeding.
47 * @opt_param string requestId Optional. An optional request ID to identify
48 * requests. Specify a unique request ID so that if you must retry your request,
49 * the server will know to ignore the request if it has already been completed.
50 * The server will guarantee that for at least 60 minutes after the first
51 * request. For example, consider a situation where you make an initial request
52 * and the request times out. If you make the request again with the same
53 * request ID, the server can check if original operation with the same request
54 * ID was received, and if so, will ignore the second request. This prevents
55 * clients from accidentally creating duplicate commitments. The request ID must
56 * be a valid UUID with the exception that zero UUID is not supported
57 * (00000000-0000-0000-0000-000000000000).
58 * @return GoogleLongrunningOperation
59 * @throws \Google\Service\Exception
60 */
61 public function delete($name, $optParams = [])
62 {
63 $params = ['name' => $name];
64 $params = array_merge($params, $optParams);
65 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
66 }
67 /**
68 * Gets details of a single ServiceClass. (serviceClasses.get)
69 *
70 * @param string $name Required. Name of the ServiceClass to get.
71 * @param array $optParams Optional parameters.
72 * @return ServiceClass
73 * @throws \Google\Service\Exception
74 */
75 public function get($name, $optParams = [])
76 {
77 $params = ['name' => $name];
78 $params = array_merge($params, $optParams);
79 return $this->call('get', [$params], ServiceClass::class);
80 }
81 /**
82 * Gets the access control policy for a resource. Returns an empty policy if the
83 * resource exists and does not have a policy set. (serviceClasses.getIamPolicy)
84 *
85 * @param string $resource REQUIRED: The resource for which the policy is being
86 * requested. See [Resource
87 * names](https://cloud.google.com/apis/design/resource_names) for the
88 * appropriate value for this field.
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
92 * version that will be used to format the policy. Valid values are 0, 1, and 3.
93 * Requests specifying an invalid value will be rejected. Requests for policies
94 * with any conditional role bindings must specify version 3. Policies with no
95 * conditional role bindings may specify any valid value or leave the field
96 * unset. The policy in the response might use the policy version that you
97 * specified, or it might use a lower policy version. For example, if you
98 * specify version 3, but the policy has no conditional role bindings, the
99 * response uses version 1. To learn which resources support conditions in their
100 * IAM policies, see the [IAM
101 * documentation](https://cloud.google.com/iam/help/conditions/resource-
102 * policies).
103 * @return Policy
104 * @throws \Google\Service\Exception
105 */
106 public function getIamPolicy($resource, $optParams = [])
107 {
108 $params = ['resource' => $resource];
109 $params = array_merge($params, $optParams);
110 return $this->call('getIamPolicy', [$params], Policy::class);
111 }
112 /**
113 * Lists ServiceClasses in a given project and location.
114 * (serviceClasses.listProjectsLocationsServiceClasses)
115 *
116 * @param string $parent Required. The parent resource's name. ex.
117 * projects/123/locations/us-east1
118 * @param array $optParams Optional parameters.
119 *
120 * @opt_param string filter A filter expression that filters the results listed
121 * in the response.
122 * @opt_param string orderBy Sort the results by a certain order.
123 * @opt_param int pageSize The maximum number of results per page that should be
124 * returned.
125 * @opt_param string pageToken The page token.
126 * @return ListServiceClassesResponse
127 * @throws \Google\Service\Exception
128 */
129 public function listProjectsLocationsServiceClasses($parent, $optParams = [])
130 {
131 $params = ['parent' => $parent];
132 $params = array_merge($params, $optParams);
133 return $this->call('list', [$params], ListServiceClassesResponse::class);
134 }
135 /**
136 * Updates the parameters of a single ServiceClass. (serviceClasses.patch)
137 *
138 * @param string $name Immutable. The name of a ServiceClass resource. Format:
139 * projects/{project}/locations/{location}/serviceClasses/{service_class} See:
140 * https://google.aip.dev/122#fields-representing-resource-names
141 * @param ServiceClass $postBody
142 * @param array $optParams Optional parameters.
143 *
144 * @opt_param string requestId Optional. An optional request ID to identify
145 * requests. Specify a unique request ID so that if you must retry your request,
146 * the server will know to ignore the request if it has already been completed.
147 * The server will guarantee that for at least 60 minutes since the first
148 * request. For example, consider a situation where you make an initial request
149 * and the request times out. If you make the request again with the same
150 * request ID, the server can check if original operation with the same request
151 * ID was received, and if so, will ignore the second request. This prevents
152 * clients from accidentally creating duplicate commitments. The request ID must
153 * be a valid UUID with the exception that zero UUID is not supported
154 * (00000000-0000-0000-0000-000000000000).
155 * @opt_param string updateMask Optional. Field mask is used to specify the
156 * fields to be overwritten in the ServiceClass resource by the update. The
157 * fields specified in the update_mask are relative to the resource, not the
158 * full request. A field will be overwritten if it is in the mask. If the user
159 * does not provide a mask then all fields will be overwritten.
160 * @return GoogleLongrunningOperation
161 * @throws \Google\Service\Exception
162 */
163 public function patch($name, ServiceClass $postBody, $optParams = [])
164 {
165 $params = ['name' => $name, 'postBody' => $postBody];
166 $params = array_merge($params, $optParams);
167 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
168 }
169 /**
170 * Sets the access control policy on the specified resource. Replaces any
171 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
172 * `PERMISSION_DENIED` errors. (serviceClasses.setIamPolicy)
173 *
174 * @param string $resource REQUIRED: The resource for which the policy is being
175 * specified. See [Resource
176 * names](https://cloud.google.com/apis/design/resource_names) for the
177 * appropriate value for this field.
178 * @param SetIamPolicyRequest $postBody
179 * @param array $optParams Optional parameters.
180 * @return Policy
181 * @throws \Google\Service\Exception
182 */
183 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
184 {
185 $params = ['resource' => $resource, 'postBody' => $postBody];
186 $params = array_merge($params, $optParams);
187 return $this->call('setIamPolicy', [$params], Policy::class);
188 }
189 /**
190 * Returns permissions that a caller has on the specified resource. If the
191 * resource does not exist, this will return an empty set of permissions, not a
192 * `NOT_FOUND` error. Note: This operation is designed to be used for building
193 * permission-aware UIs and command-line tools, not for authorization checking.
194 * This operation may "fail open" without warning.
195 * (serviceClasses.testIamPermissions)
196 *
197 * @param string $resource REQUIRED: The resource for which the policy detail is
198 * being requested. See [Resource
199 * names](https://cloud.google.com/apis/design/resource_names) for the
200 * appropriate value for this field.
201 * @param TestIamPermissionsRequest $postBody
202 * @param array $optParams Optional parameters.
203 * @return TestIamPermissionsResponse
204 * @throws \Google\Service\Exception
205 */
206 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
207 {
208 $params = ['resource' => $resource, 'postBody' => $postBody];
209 $params = array_merge($params, $optParams);
210 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
211 }
212}
213
214// Adding a class alias for backwards compatibility with the previous class name.
215class_alias(ProjectsLocationsServiceClasses::class, 'Google_Service_Networkconnectivity_Resource_ProjectsLocationsServiceClasses');
Note: See TracBrowser for help on using the repository browser.