source: vendor/google/apiclient-services/src/Eventarc/Resource/ProjectsLocationsMessageBuses.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 10.8 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\GoogleLongrunningOperation;
21use Google\Service\Eventarc\ListMessageBusEnrollmentsResponse;
22use Google\Service\Eventarc\ListMessageBusesResponse;
23use Google\Service\Eventarc\MessageBus;
24use Google\Service\Eventarc\Policy;
25use Google\Service\Eventarc\SetIamPolicyRequest;
26use Google\Service\Eventarc\TestIamPermissionsRequest;
27use Google\Service\Eventarc\TestIamPermissionsResponse;
28
29/**
30 * The "messageBuses" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $eventarcService = new Google\Service\Eventarc(...);
34 * $messageBuses = $eventarcService->projects_locations_messageBuses;
35 * </code>
36 */
37class ProjectsLocationsMessageBuses extends \Google\Service\Resource
38{
39 /**
40 * Create a new MessageBus in a particular project and location.
41 * (messageBuses.create)
42 *
43 * @param string $parent Required. The parent collection in which to add this
44 * message bus.
45 * @param MessageBus $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string messageBusId Required. The user-provided ID to be assigned
49 * to the MessageBus. It should match the format
50 * (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
51 * @opt_param bool validateOnly Optional. If set, validate the request and
52 * preview the review, but do not post it.
53 * @return GoogleLongrunningOperation
54 * @throws \Google\Service\Exception
55 */
56 public function create($parent, MessageBus $postBody, $optParams = [])
57 {
58 $params = ['parent' => $parent, 'postBody' => $postBody];
59 $params = array_merge($params, $optParams);
60 return $this->call('create', [$params], GoogleLongrunningOperation::class);
61 }
62 /**
63 * Delete a single message bus. (messageBuses.delete)
64 *
65 * @param string $name Required. The name of the MessageBus to be deleted.
66 * @param array $optParams Optional parameters.
67 *
68 * @opt_param bool allowMissing Optional. If set to true, and the MessageBus is
69 * not found, the request will succeed but no action will be taken on the
70 * server.
71 * @opt_param string etag Optional. If provided, the MessageBus will only be
72 * deleted if the etag matches the current etag on the resource.
73 * @opt_param bool validateOnly Optional. If set, validate the request and
74 * preview the review, but do not post it.
75 * @return GoogleLongrunningOperation
76 * @throws \Google\Service\Exception
77 */
78 public function delete($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('delete', [$params], GoogleLongrunningOperation::class);
83 }
84 /**
85 * Get a single MessageBus. (messageBuses.get)
86 *
87 * @param string $name Required. The name of the message bus to get.
88 * @param array $optParams Optional parameters.
89 * @return MessageBus
90 * @throws \Google\Service\Exception
91 */
92 public function get($name, $optParams = [])
93 {
94 $params = ['name' => $name];
95 $params = array_merge($params, $optParams);
96 return $this->call('get', [$params], MessageBus::class);
97 }
98 /**
99 * Gets the access control policy for a resource. Returns an empty policy if the
100 * resource exists and does not have a policy set. (messageBuses.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 message buses. (messageBuses.listProjectsLocationsMessageBuses)
131 *
132 * @param string $parent Required. The parent collection to list triggers on.
133 * @param array $optParams Optional parameters.
134 *
135 * @opt_param string filter Optional. The filter field that the list request
136 * will filter on. Possible filtersare described in https://google.aip.dev/160.
137 * @opt_param string orderBy Optional. The sorting order of the resources
138 * returned. Value should be a comma-separated list of fields. The default
139 * sorting order is ascending. To specify descending order for a field, append a
140 * `desc` suffix; for example: `name desc, update_time`.
141 * @opt_param int pageSize Optional. The maximum number of results to return on
142 * each page. Note: The service may send fewer.
143 * @opt_param string pageToken Optional. The page token; provide the value from
144 * the `next_page_token` field in a previous call to retrieve the subsequent
145 * page. When paginating, all other parameters provided must match the previous
146 * call that provided the page token.
147 * @return ListMessageBusesResponse
148 * @throws \Google\Service\Exception
149 */
150 public function listProjectsLocationsMessageBuses($parent, $optParams = [])
151 {
152 $params = ['parent' => $parent];
153 $params = array_merge($params, $optParams);
154 return $this->call('list', [$params], ListMessageBusesResponse::class);
155 }
156 /**
157 * List message bus enrollments. (messageBuses.listEnrollments)
158 *
159 * @param string $parent Required. The parent message bus to list enrollments
160 * on.
161 * @param array $optParams Optional parameters.
162 *
163 * @opt_param int pageSize Optional. The maximum number of results to return on
164 * each page. Note: The service may send fewer.
165 * @opt_param string pageToken Optional. The page token; provide the value from
166 * the `next_page_token` field in a previous call to retrieve the subsequent
167 * page. When paginating, all other parameters provided must match the previous
168 * call that provided the page token.
169 * @return ListMessageBusEnrollmentsResponse
170 * @throws \Google\Service\Exception
171 */
172 public function listEnrollments($parent, $optParams = [])
173 {
174 $params = ['parent' => $parent];
175 $params = array_merge($params, $optParams);
176 return $this->call('listEnrollments', [$params], ListMessageBusEnrollmentsResponse::class);
177 }
178 /**
179 * Update a single message bus. (messageBuses.patch)
180 *
181 * @param string $name Identifier. Resource name of the form
182 * projects/{project}/locations/{location}/messageBuses/{message_bus}
183 * @param MessageBus $postBody
184 * @param array $optParams Optional parameters.
185 *
186 * @opt_param bool allowMissing Optional. If set to true, and the MessageBus is
187 * not found, a new MessageBus will be created. In this situation, `update_mask`
188 * is ignored.
189 * @opt_param string updateMask Optional. The fields to be updated; only fields
190 * explicitly provided are updated. If no field mask is provided, all provided
191 * fields in the request are updated. To update all fields, provide a field mask
192 * of "*".
193 * @opt_param bool validateOnly Optional. If set, validate the request and
194 * preview the review, but do not post it.
195 * @return GoogleLongrunningOperation
196 * @throws \Google\Service\Exception
197 */
198 public function patch($name, MessageBus $postBody, $optParams = [])
199 {
200 $params = ['name' => $name, 'postBody' => $postBody];
201 $params = array_merge($params, $optParams);
202 return $this->call('patch', [$params], GoogleLongrunningOperation::class);
203 }
204 /**
205 * Sets the access control policy on the specified resource. Replaces any
206 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
207 * `PERMISSION_DENIED` errors. (messageBuses.setIamPolicy)
208 *
209 * @param string $resource REQUIRED: The resource for which the policy is being
210 * specified. See [Resource
211 * names](https://cloud.google.com/apis/design/resource_names) for the
212 * appropriate value for this field.
213 * @param SetIamPolicyRequest $postBody
214 * @param array $optParams Optional parameters.
215 * @return Policy
216 * @throws \Google\Service\Exception
217 */
218 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
219 {
220 $params = ['resource' => $resource, 'postBody' => $postBody];
221 $params = array_merge($params, $optParams);
222 return $this->call('setIamPolicy', [$params], Policy::class);
223 }
224 /**
225 * Returns permissions that a caller has on the specified resource. If the
226 * resource does not exist, this will return an empty set of permissions, not a
227 * `NOT_FOUND` error. Note: This operation is designed to be used for building
228 * permission-aware UIs and command-line tools, not for authorization checking.
229 * This operation may "fail open" without warning.
230 * (messageBuses.testIamPermissions)
231 *
232 * @param string $resource REQUIRED: The resource for which the policy detail is
233 * being requested. See [Resource
234 * names](https://cloud.google.com/apis/design/resource_names) for the
235 * appropriate value for this field.
236 * @param TestIamPermissionsRequest $postBody
237 * @param array $optParams Optional parameters.
238 * @return TestIamPermissionsResponse
239 * @throws \Google\Service\Exception
240 */
241 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
242 {
243 $params = ['resource' => $resource, 'postBody' => $postBody];
244 $params = array_merge($params, $optParams);
245 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
246 }
247}
248
249// Adding a class alias for backwards compatibility with the previous class name.
250class_alias(ProjectsLocationsMessageBuses::class, 'Google_Service_Eventarc_Resource_ProjectsLocationsMessageBuses');
Note: See TracBrowser for help on using the repository browser.