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

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

Upload project files

  • Property mode set to 100644
File size: 9.2 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\ApigeeRegistry\Resource;
19
20use Google\Service\ApigeeRegistry\Api;
21use Google\Service\ApigeeRegistry\ApigeeregistryEmpty;
22use Google\Service\ApigeeRegistry\ListApisResponse;
23use Google\Service\ApigeeRegistry\Policy;
24use Google\Service\ApigeeRegistry\SetIamPolicyRequest;
25use Google\Service\ApigeeRegistry\TestIamPermissionsRequest;
26use Google\Service\ApigeeRegistry\TestIamPermissionsResponse;
27
28/**
29 * The "apis" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $apigeeregistryService = new Google\Service\ApigeeRegistry(...);
33 * $apis = $apigeeregistryService->projects_locations_apis;
34 * </code>
35 */
36class ProjectsLocationsApis extends \Google\Service\Resource
37{
38 /**
39 * Creates a specified API. (apis.create)
40 *
41 * @param string $parent Required. The parent, which owns this collection of
42 * APIs. Format: `projects/locations`
43 * @param Api $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string apiId Required. The ID to use for the API, which will
47 * become the final component of the API's resource name. This value should be
48 * 4-63 characters, and valid characters are /a-z-/. Following AIP-162, IDs must
49 * not have the form of a UUID.
50 * @return Api
51 * @throws \Google\Service\Exception
52 */
53 public function create($parent, Api $postBody, $optParams = [])
54 {
55 $params = ['parent' => $parent, 'postBody' => $postBody];
56 $params = array_merge($params, $optParams);
57 return $this->call('create', [$params], Api::class);
58 }
59 /**
60 * Removes a specified API and all of the resources that it owns. (apis.delete)
61 *
62 * @param string $name Required. The name of the API to delete. Format:
63 * `projects/locations/apis`
64 * @param array $optParams Optional parameters.
65 *
66 * @opt_param bool force If set to true, any child resources will also be
67 * deleted. (Otherwise, the request will only work if there are no child
68 * resources.)
69 * @return ApigeeregistryEmpty
70 * @throws \Google\Service\Exception
71 */
72 public function delete($name, $optParams = [])
73 {
74 $params = ['name' => $name];
75 $params = array_merge($params, $optParams);
76 return $this->call('delete', [$params], ApigeeregistryEmpty::class);
77 }
78 /**
79 * Returns a specified API. (apis.get)
80 *
81 * @param string $name Required. The name of the API to retrieve. Format:
82 * `projects/locations/apis`
83 * @param array $optParams Optional parameters.
84 * @return Api
85 * @throws \Google\Service\Exception
86 */
87 public function get($name, $optParams = [])
88 {
89 $params = ['name' => $name];
90 $params = array_merge($params, $optParams);
91 return $this->call('get', [$params], Api::class);
92 }
93 /**
94 * Gets the access control policy for a resource. Returns an empty policy if the
95 * resource exists and does not have a policy set. (apis.getIamPolicy)
96 *
97 * @param string $resource REQUIRED: The resource for which the policy is being
98 * requested. See [Resource
99 * names](https://cloud.google.com/apis/design/resource_names) for the
100 * appropriate value for this field.
101 * @param array $optParams Optional parameters.
102 *
103 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
104 * version that will be used to format the policy. Valid values are 0, 1, and 3.
105 * Requests specifying an invalid value will be rejected. Requests for policies
106 * with any conditional role bindings must specify version 3. Policies with no
107 * conditional role bindings may specify any valid value or leave the field
108 * unset. The policy in the response might use the policy version that you
109 * specified, or it might use a lower policy version. For example, if you
110 * specify version 3, but the policy has no conditional role bindings, the
111 * response uses version 1. To learn which resources support conditions in their
112 * IAM policies, see the [IAM
113 * documentation](https://cloud.google.com/iam/help/conditions/resource-
114 * policies).
115 * @return Policy
116 * @throws \Google\Service\Exception
117 */
118 public function getIamPolicy($resource, $optParams = [])
119 {
120 $params = ['resource' => $resource];
121 $params = array_merge($params, $optParams);
122 return $this->call('getIamPolicy', [$params], Policy::class);
123 }
124 /**
125 * Returns matching APIs. (apis.listProjectsLocationsApis)
126 *
127 * @param string $parent Required. The parent, which owns this collection of
128 * APIs. Format: `projects/locations`
129 * @param array $optParams Optional parameters.
130 *
131 * @opt_param string filter An expression that can be used to filter the list.
132 * Filters use the Common Expression Language and can refer to all message
133 * fields.
134 * @opt_param string orderBy A comma-separated list of fields, e.g. "foo,bar"
135 * Fields can be sorted in descending order using the "desc" identifier, e.g.
136 * "foo desc,bar"
137 * @opt_param int pageSize The maximum number of APIs to return. The service may
138 * return fewer than this value. If unspecified, at most 50 values will be
139 * returned. The maximum is 1000; values above 1000 will be coerced to 1000.
140 * @opt_param string pageToken A page token, received from a previous `ListApis`
141 * call. Provide this to retrieve the subsequent page. When paginating, all
142 * other parameters provided to `ListApis` must match the call that provided the
143 * page token.
144 * @return ListApisResponse
145 * @throws \Google\Service\Exception
146 */
147 public function listProjectsLocationsApis($parent, $optParams = [])
148 {
149 $params = ['parent' => $parent];
150 $params = array_merge($params, $optParams);
151 return $this->call('list', [$params], ListApisResponse::class);
152 }
153 /**
154 * Used to modify a specified API. (apis.patch)
155 *
156 * @param string $name Resource name.
157 * @param Api $postBody
158 * @param array $optParams Optional parameters.
159 *
160 * @opt_param bool allowMissing If set to true, and the API is not found, a new
161 * API will be created. In this situation, `update_mask` is ignored.
162 * @opt_param string updateMask The list of fields to be updated. If omitted,
163 * all fields are updated that are set in the request message (fields set to
164 * default values are ignored). If an asterisk "*" is specified, all fields are
165 * updated, including fields that are unspecified/default in the request.
166 * @return Api
167 * @throws \Google\Service\Exception
168 */
169 public function patch($name, Api $postBody, $optParams = [])
170 {
171 $params = ['name' => $name, 'postBody' => $postBody];
172 $params = array_merge($params, $optParams);
173 return $this->call('patch', [$params], Api::class);
174 }
175 /**
176 * Sets the access control policy on the specified resource. Replaces any
177 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
178 * `PERMISSION_DENIED` errors. (apis.setIamPolicy)
179 *
180 * @param string $resource REQUIRED: The resource for which the policy is being
181 * specified. See [Resource
182 * names](https://cloud.google.com/apis/design/resource_names) for the
183 * appropriate value for this field.
184 * @param SetIamPolicyRequest $postBody
185 * @param array $optParams Optional parameters.
186 * @return Policy
187 * @throws \Google\Service\Exception
188 */
189 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
190 {
191 $params = ['resource' => $resource, 'postBody' => $postBody];
192 $params = array_merge($params, $optParams);
193 return $this->call('setIamPolicy', [$params], Policy::class);
194 }
195 /**
196 * Returns permissions that a caller has on the specified resource. If the
197 * resource does not exist, this will return an empty set of permissions, not a
198 * `NOT_FOUND` error. Note: This operation is designed to be used for building
199 * permission-aware UIs and command-line tools, not for authorization checking.
200 * This operation may "fail open" without warning. (apis.testIamPermissions)
201 *
202 * @param string $resource REQUIRED: The resource for which the policy detail is
203 * being requested. See [Resource
204 * names](https://cloud.google.com/apis/design/resource_names) for the
205 * appropriate value for this field.
206 * @param TestIamPermissionsRequest $postBody
207 * @param array $optParams Optional parameters.
208 * @return TestIamPermissionsResponse
209 * @throws \Google\Service\Exception
210 */
211 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
212 {
213 $params = ['resource' => $resource, 'postBody' => $postBody];
214 $params = array_merge($params, $optParams);
215 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
216 }
217}
218
219// Adding a class alias for backwards compatibility with the previous class name.
220class_alias(ProjectsLocationsApis::class, 'Google_Service_ApigeeRegistry_Resource_ProjectsLocationsApis');
Note: See TracBrowser for help on using the repository browser.