source: vendor/google/apiclient-services/src/Eventarc/Resource/ProjectsLocationsGoogleApiSources.php

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

Upload project files

  • Property mode set to 100644
File size: 10.0 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\Eventarc\Resource;
19
20use Google\Service\Eventarc\GoogleApiSource;
21use Google\Service\Eventarc\GoogleLongrunningOperation;
22use Google\Service\Eventarc\ListGoogleApiSourcesResponse;
23use Google\Service\Eventarc\Policy;
24use Google\Service\Eventarc\SetIamPolicyRequest;
25use Google\Service\Eventarc\TestIamPermissionsRequest;
26use Google\Service\Eventarc\TestIamPermissionsResponse;
27
28/**
29 * The "googleApiSources" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $eventarcService = new Google\Service\Eventarc(...);
33 * $googleApiSources = $eventarcService->projects_locations_googleApiSources;
34 * </code>
35 */
36class ProjectsLocationsGoogleApiSources extends \Google\Service\Resource
37{
38 /**
39 * Create a new GoogleApiSource in a particular project and location.
40 * (googleApiSources.create)
41 *
42 * @param string $parent Required. The parent collection in which to add this
43 * google api source.
44 * @param GoogleApiSource $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string googleApiSourceId Required. The user-provided ID to be
48 * assigned to the GoogleApiSource. It should match the format
49 * (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
50 * @opt_param bool validateOnly Optional. If set, validate the request and
51 * preview the review, but do not post it.
52 * @return GoogleLongrunningOperation
53 * @throws \Google\Service\Exception
54 */
55 public function create($parent, GoogleApiSource $postBody, $optParams = [])
56 {
57 $params = ['parent' => $parent, 'postBody' => $postBody];
58 $params = array_merge($params, $optParams);
59 return $this->call('create', [$params], GoogleLongrunningOperation::class);
60 }
61 /**
62 * Delete a single GoogleApiSource. (googleApiSources.delete)
63 *
64 * @param string $name Required. The name of the GoogleApiSource to be deleted.
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param bool allowMissing Optional. If set to true, and the MessageBus is
68 * not found, the request will succeed but no action will be taken on the
69 * server.
70 * @opt_param string etag Optional. If provided, the MessageBus will only be
71 * deleted if the etag matches the current etag on the resource.
72 * @opt_param bool validateOnly Optional. If set, validate the request and
73 * preview the review, but do not post it.
74 * @return GoogleLongrunningOperation
75 * @throws \Google\Service\Exception
76 */
77 public function delete($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
82 }
83 /**
84 * Get a single GoogleApiSource. (googleApiSources.get)
85 *
86 * @param string $name Required. The name of the google api source to get.
87 * @param array $optParams Optional parameters.
88 * @return GoogleApiSource
89 * @throws \Google\Service\Exception
90 */
91 public function get($name, $optParams = [])
92 {
93 $params = ['name' => $name];
94 $params = array_merge($params, $optParams);
95 return $this->call('get', [$params], GoogleApiSource::class);
96 }
97 /**
98 * Gets the access control policy for a resource. Returns an empty policy if the
99 * resource exists and does not have a policy set.
100 * (googleApiSources.getIamPolicy)
101 *
102 * @param string $resource REQUIRED: The resource for which the policy is being
103 * requested. See [Resource
104 * names](https://cloud.google.com/apis/design/resource_names) for the
105 * appropriate value for this field.
106 * @param array $optParams Optional parameters.
107 *
108 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
109 * version that will be used to format the policy. Valid values are 0, 1, and 3.
110 * Requests specifying an invalid value will be rejected. Requests for policies
111 * with any conditional role bindings must specify version 3. Policies with no
112 * conditional role bindings may specify any valid value or leave the field
113 * unset. The policy in the response might use the policy version that you
114 * specified, or it might use a lower policy version. For example, if you
115 * specify version 3, but the policy has no conditional role bindings, the
116 * response uses version 1. To learn which resources support conditions in their
117 * IAM policies, see the [IAM
118 * documentation](https://cloud.google.com/iam/help/conditions/resource-
119 * policies).
120 * @return Policy
121 * @throws \Google\Service\Exception
122 */
123 public function getIamPolicy($resource, $optParams = [])
124 {
125 $params = ['resource' => $resource];
126 $params = array_merge($params, $optParams);
127 return $this->call('getIamPolicy', [$params], Policy::class);
128 }
129 /**
130 * List GoogleApiSources.
131 * (googleApiSources.listProjectsLocationsGoogleApiSources)
132 *
133 * @param string $parent Required. The parent collection to list
134 * GoogleApiSources on.
135 * @param array $optParams Optional parameters.
136 *
137 * @opt_param string filter Optional. The filter field that the list request
138 * will filter on. Possible filtersare described in https://google.aip.dev/160.
139 * @opt_param string orderBy Optional. The sorting order of the resources
140 * returned. Value should be a comma-separated list of fields. The default
141 * sorting order is ascending. To specify descending order for a field, append a
142 * `desc` suffix; for example: `name desc, update_time`.
143 * @opt_param int pageSize Optional. The maximum number of results to return on
144 * each page. Note: The service may send fewer.
145 * @opt_param string pageToken Optional. The page token; provide the value from
146 * the `next_page_token` field in a previous call to retrieve the subsequent
147 * page. When paginating, all other parameters provided must match the previous
148 * call that provided the page token.
149 * @return ListGoogleApiSourcesResponse
150 * @throws \Google\Service\Exception
151 */
152 public function listProjectsLocationsGoogleApiSources($parent, $optParams = [])
153 {
154 $params = ['parent' => $parent];
155 $params = array_merge($params, $optParams);
156 return $this->call('list', [$params], ListGoogleApiSourcesResponse::class);
157 }
158 /**
159 * Update a single GoogleApiSource. (googleApiSources.patch)
160 *
161 * @param string $name Identifier. Resource name of the form
162 * projects/{project}/locations/{location}/googleApiSources/{google_api_source}
163 * @param GoogleApiSource $postBody
164 * @param array $optParams Optional parameters.
165 *
166 * @opt_param bool allowMissing Optional. If set to true, and the
167 * GoogleApiSource is not found, a new GoogleApiSource will be created. In this
168 * situation, `update_mask` is ignored.
169 * @opt_param string updateMask Optional. The fields to be updated; only fields
170 * explicitly provided are updated. If no field mask is provided, all provided
171 * fields in the request are updated. To update all fields, provide a field mask
172 * of "*".
173 * @opt_param bool validateOnly Optional. If set, validate the request and
174 * preview the review, but do not post it.
175 * @return GoogleLongrunningOperation
176 * @throws \Google\Service\Exception
177 */
178 public function patch($name, GoogleApiSource $postBody, $optParams = [])
179 {
180 $params = ['name' => $name, 'postBody' => $postBody];
181 $params = array_merge($params, $optParams);
182 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
183 }
184 /**
185 * Sets the access control policy on the specified resource. Replaces any
186 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
187 * `PERMISSION_DENIED` errors. (googleApiSources.setIamPolicy)
188 *
189 * @param string $resource REQUIRED: The resource for which the policy is being
190 * specified. See [Resource
191 * names](https://cloud.google.com/apis/design/resource_names) for the
192 * appropriate value for this field.
193 * @param SetIamPolicyRequest $postBody
194 * @param array $optParams Optional parameters.
195 * @return Policy
196 * @throws \Google\Service\Exception
197 */
198 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
199 {
200 $params = ['resource' => $resource, 'postBody' => $postBody];
201 $params = array_merge($params, $optParams);
202 return $this->call('setIamPolicy', [$params], Policy::class);
203 }
204 /**
205 * Returns permissions that a caller has on the specified resource. If the
206 * resource does not exist, this will return an empty set of permissions, not a
207 * `NOT_FOUND` error. Note: This operation is designed to be used for building
208 * permission-aware UIs and command-line tools, not for authorization checking.
209 * This operation may "fail open" without warning.
210 * (googleApiSources.testIamPermissions)
211 *
212 * @param string $resource REQUIRED: The resource for which the policy detail is
213 * being requested. See [Resource
214 * names](https://cloud.google.com/apis/design/resource_names) for the
215 * appropriate value for this field.
216 * @param TestIamPermissionsRequest $postBody
217 * @param array $optParams Optional parameters.
218 * @return TestIamPermissionsResponse
219 * @throws \Google\Service\Exception
220 */
221 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
222 {
223 $params = ['resource' => $resource, 'postBody' => $postBody];
224 $params = array_merge($params, $optParams);
225 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
226 }
227}
228
229// Adding a class alias for backwards compatibility with the previous class name.
230class_alias(ProjectsLocationsGoogleApiSources::class, 'Google_Service_Eventarc_Resource_ProjectsLocationsGoogleApiSources');
Note: See TracBrowser for help on using the repository browser.