source: vendor/google/apiclient-services/src/Apigateway/Resource/ProjectsLocationsApis.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 8.5 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\Apigateway\Resource;
19
20use Google\Service\Apigateway\ApigatewayApi;
21use Google\Service\Apigateway\ApigatewayListApisResponse;
22use Google\Service\Apigateway\ApigatewayOperation;
23use Google\Service\Apigateway\ApigatewayPolicy;
24use Google\Service\Apigateway\ApigatewaySetIamPolicyRequest;
25use Google\Service\Apigateway\ApigatewayTestIamPermissionsRequest;
26use Google\Service\Apigateway\ApigatewayTestIamPermissionsResponse;
27
28/**
29 * The "apis" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $apigatewayService = new Google\Service\Apigateway(...);
33 * $apis = $apigatewayService->projects_locations_apis;
34 * </code>
35 */
36class ProjectsLocationsApis extends \Google\Service\Resource
37{
38 /**
39 * Creates a new Api in a given project and location. (apis.create)
40 *
41 * @param string $parent Required. Parent resource of the API, of the form:
42 * `projects/locations/global`
43 * @param ApigatewayApi $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string apiId Required. Identifier to assign to the API. Must be
47 * unique within scope of the parent resource.
48 * @return ApigatewayOperation
49 * @throws \Google\Service\Exception
50 */
51 public function create($parent, ApigatewayApi $postBody, $optParams = [])
52 {
53 $params = ['parent' => $parent, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('create', [$params], ApigatewayOperation::class);
56 }
57 /**
58 * Deletes a single Api. (apis.delete)
59 *
60 * @param string $name Required. Resource name of the form:
61 * `projects/locations/global/apis`
62 * @param array $optParams Optional parameters.
63 * @return ApigatewayOperation
64 * @throws \Google\Service\Exception
65 */
66 public function delete($name, $optParams = [])
67 {
68 $params = ['name' => $name];
69 $params = array_merge($params, $optParams);
70 return $this->call('delete', [$params], ApigatewayOperation::class);
71 }
72 /**
73 * Gets details of a single Api. (apis.get)
74 *
75 * @param string $name Required. Resource name of the form:
76 * `projects/locations/global/apis`
77 * @param array $optParams Optional parameters.
78 * @return ApigatewayApi
79 * @throws \Google\Service\Exception
80 */
81 public function get($name, $optParams = [])
82 {
83 $params = ['name' => $name];
84 $params = array_merge($params, $optParams);
85 return $this->call('get', [$params], ApigatewayApi::class);
86 }
87 /**
88 * Gets the access control policy for a resource. Returns an empty policy if the
89 * resource exists and does not have a policy set. (apis.getIamPolicy)
90 *
91 * @param string $resource REQUIRED: The resource for which the policy is being
92 * requested. See [Resource
93 * names](https://cloud.google.com/apis/design/resource_names) for the
94 * appropriate value for this field.
95 * @param array $optParams Optional parameters.
96 *
97 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
98 * version that will be used to format the policy. Valid values are 0, 1, and 3.
99 * Requests specifying an invalid value will be rejected. Requests for policies
100 * with any conditional role bindings must specify version 3. Policies with no
101 * conditional role bindings may specify any valid value or leave the field
102 * unset. The policy in the response might use the policy version that you
103 * specified, or it might use a lower policy version. For example, if you
104 * specify version 3, but the policy has no conditional role bindings, the
105 * response uses version 1. To learn which resources support conditions in their
106 * IAM policies, see the [IAM
107 * documentation](https://cloud.google.com/iam/help/conditions/resource-
108 * policies).
109 * @return ApigatewayPolicy
110 * @throws \Google\Service\Exception
111 */
112 public function getIamPolicy($resource, $optParams = [])
113 {
114 $params = ['resource' => $resource];
115 $params = array_merge($params, $optParams);
116 return $this->call('getIamPolicy', [$params], ApigatewayPolicy::class);
117 }
118 /**
119 * Lists Apis in a given project and location. (apis.listProjectsLocationsApis)
120 *
121 * @param string $parent Required. Parent resource of the API, of the form:
122 * `projects/locations/global`
123 * @param array $optParams Optional parameters.
124 *
125 * @opt_param string filter Filter.
126 * @opt_param string orderBy Order by parameters.
127 * @opt_param int pageSize Page size.
128 * @opt_param string pageToken Page token.
129 * @return ApigatewayListApisResponse
130 * @throws \Google\Service\Exception
131 */
132 public function listProjectsLocationsApis($parent, $optParams = [])
133 {
134 $params = ['parent' => $parent];
135 $params = array_merge($params, $optParams);
136 return $this->call('list', [$params], ApigatewayListApisResponse::class);
137 }
138 /**
139 * Updates the parameters of a single Api. (apis.patch)
140 *
141 * @param string $name Output only. Resource name of the API. Format:
142 * projects/{project}/locations/global/apis/{api}
143 * @param ApigatewayApi $postBody
144 * @param array $optParams Optional parameters.
145 *
146 * @opt_param string updateMask Field mask is used to specify the fields to be
147 * overwritten in the Api resource by the update. The fields specified in the
148 * update_mask are relative to the resource, not the full request. A field will
149 * be overwritten if it is in the mask. If the user does not provide a mask then
150 * all fields will be overwritten.
151 * @return ApigatewayOperation
152 * @throws \Google\Service\Exception
153 */
154 public function patch($name, ApigatewayApi $postBody, $optParams = [])
155 {
156 $params = ['name' => $name, 'postBody' => $postBody];
157 $params = array_merge($params, $optParams);
158 return $this->call('patch', [$params], ApigatewayOperation::class);
159 }
160 /**
161 * Sets the access control policy on the specified resource. Replaces any
162 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
163 * `PERMISSION_DENIED` errors. (apis.setIamPolicy)
164 *
165 * @param string $resource REQUIRED: The resource for which the policy is being
166 * specified. See [Resource
167 * names](https://cloud.google.com/apis/design/resource_names) for the
168 * appropriate value for this field.
169 * @param ApigatewaySetIamPolicyRequest $postBody
170 * @param array $optParams Optional parameters.
171 * @return ApigatewayPolicy
172 * @throws \Google\Service\Exception
173 */
174 public function setIamPolicy($resource, ApigatewaySetIamPolicyRequest $postBody, $optParams = [])
175 {
176 $params = ['resource' => $resource, 'postBody' => $postBody];
177 $params = array_merge($params, $optParams);
178 return $this->call('setIamPolicy', [$params], ApigatewayPolicy::class);
179 }
180 /**
181 * Returns permissions that a caller has on the specified resource. If the
182 * resource does not exist, this will return an empty set of permissions, not a
183 * `NOT_FOUND` error. Note: This operation is designed to be used for building
184 * permission-aware UIs and command-line tools, not for authorization checking.
185 * This operation may "fail open" without warning. (apis.testIamPermissions)
186 *
187 * @param string $resource REQUIRED: The resource for which the policy detail is
188 * being requested. See [Resource
189 * names](https://cloud.google.com/apis/design/resource_names) for the
190 * appropriate value for this field.
191 * @param ApigatewayTestIamPermissionsRequest $postBody
192 * @param array $optParams Optional parameters.
193 * @return ApigatewayTestIamPermissionsResponse
194 * @throws \Google\Service\Exception
195 */
196 public function testIamPermissions($resource, ApigatewayTestIamPermissionsRequest $postBody, $optParams = [])
197 {
198 $params = ['resource' => $resource, 'postBody' => $postBody];
199 $params = array_merge($params, $optParams);
200 return $this->call('testIamPermissions', [$params], ApigatewayTestIamPermissionsResponse::class);
201 }
202}
203
204// Adding a class alias for backwards compatibility with the previous class name.
205class_alias(ProjectsLocationsApis::class, 'Google_Service_Apigateway_Resource_ProjectsLocationsApis');
Note: See TracBrowser for help on using the repository browser.