google-apis-gkehub_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,686 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module GkehubV1
23
+ # GKE Hub
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/gkehub_v1'
29
+ #
30
+ # Gkehub = Google::Apis::GkehubV1 # Alias the module
31
+ # service = Gkehub::GKEHubService.new
32
+ #
33
+ # @see https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
34
+ class GKEHubService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://gkehub.googleapis.com/', '',
47
+ client_name: 'google-apis-gkehub_v1',
48
+ client_version: Google::Apis::GkehubV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::GkehubV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::GkehubV1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1/{+name}', options)
74
+ command.response_representation = Google::Apis::GkehubV1::Location::Representation
75
+ command.response_class = Google::Apis::GkehubV1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
88
+ # AIP-160](https://google.aip.dev/160).
89
+ # @param [Fixnum] page_size
90
+ # The maximum number of results to return. If not set, the service will select a
91
+ # default.
92
+ # @param [String] page_token
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::GkehubV1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::GkehubV1::ListLocationsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::GkehubV1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::GkehubV1::ListLocationsResponse
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['filter'] = filter unless filter.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['pageToken'] = page_token unless page_token.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Adds a new Membership.
126
+ # @param [String] parent
127
+ # Required. The parent (project and location) where the Memberships will be
128
+ # created. Specified in the format `projects/*/locations/*`.
129
+ # @param [Google::Apis::GkehubV1::Membership] membership_object
130
+ # @param [String] membership_id
131
+ # Required. Client chosen ID for the membership. `membership_id` must be a valid
132
+ # RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must
133
+ # consist of lower case alphanumeric characters or `-` 3. It must start and end
134
+ # with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([
135
+ # -a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
136
+ # @param [String] request_id
137
+ # Optional. A request ID to identify requests. Specify a unique request ID so
138
+ # that if you must retry your request, the server will know to ignore the
139
+ # request if it has already been completed. The server will guarantee that for
140
+ # at least 60 minutes after the first request. For example, consider a situation
141
+ # where you make an initial request and the request times out. If you make the
142
+ # request again with the same request ID, the server can check if original
143
+ # operation with the same request ID was received, and if so, will ignore the
144
+ # second request. This prevents clients from accidentally creating duplicate
145
+ # commitments. The request ID must be a valid UUID with the exception that zero
146
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
147
+ # @param [String] fields
148
+ # Selector specifying which fields to include in a partial response.
149
+ # @param [String] quota_user
150
+ # Available to use for quota purposes for server-side applications. Can be any
151
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
152
+ # @param [Google::Apis::RequestOptions] options
153
+ # Request-specific options
154
+ #
155
+ # @yield [result, err] Result & error if block supplied
156
+ # @yieldparam result [Google::Apis::GkehubV1::Operation] parsed result object
157
+ # @yieldparam err [StandardError] error object if request failed
158
+ #
159
+ # @return [Google::Apis::GkehubV1::Operation]
160
+ #
161
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
162
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
163
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
164
+ def create_project_location_membership(parent, membership_object = nil, membership_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
165
+ command = make_simple_command(:post, 'v1/{+parent}/memberships', options)
166
+ command.request_representation = Google::Apis::GkehubV1::Membership::Representation
167
+ command.request_object = membership_object
168
+ command.response_representation = Google::Apis::GkehubV1::Operation::Representation
169
+ command.response_class = Google::Apis::GkehubV1::Operation
170
+ command.params['parent'] = parent unless parent.nil?
171
+ command.query['membershipId'] = membership_id unless membership_id.nil?
172
+ command.query['requestId'] = request_id unless request_id.nil?
173
+ command.query['fields'] = fields unless fields.nil?
174
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
175
+ execute_or_queue_command(command, &block)
176
+ end
177
+
178
+ # Removes a Membership.
179
+ # @param [String] name
180
+ # Required. The Membership resource name in the format `projects/*/locations/*/
181
+ # memberships/*`.
182
+ # @param [String] request_id
183
+ # Optional. A request ID to identify requests. Specify a unique request ID so
184
+ # that if you must retry your request, the server will know to ignore the
185
+ # request if it has already been completed. The server will guarantee that for
186
+ # at least 60 minutes after the first request. For example, consider a situation
187
+ # where you make an initial request and the request times out. If you make the
188
+ # request again with the same request ID, the server can check if original
189
+ # operation with the same request ID was received, and if so, will ignore the
190
+ # second request. This prevents clients from accidentally creating duplicate
191
+ # commitments. The request ID must be a valid UUID with the exception that zero
192
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
193
+ # @param [String] fields
194
+ # Selector specifying which fields to include in a partial response.
195
+ # @param [String] quota_user
196
+ # Available to use for quota purposes for server-side applications. Can be any
197
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
198
+ # @param [Google::Apis::RequestOptions] options
199
+ # Request-specific options
200
+ #
201
+ # @yield [result, err] Result & error if block supplied
202
+ # @yieldparam result [Google::Apis::GkehubV1::Operation] parsed result object
203
+ # @yieldparam err [StandardError] error object if request failed
204
+ #
205
+ # @return [Google::Apis::GkehubV1::Operation]
206
+ #
207
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
208
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
209
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
210
+ def delete_project_location_membership(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
211
+ command = make_simple_command(:delete, 'v1/{+name}', options)
212
+ command.response_representation = Google::Apis::GkehubV1::Operation::Representation
213
+ command.response_class = Google::Apis::GkehubV1::Operation
214
+ command.params['name'] = name unless name.nil?
215
+ command.query['requestId'] = request_id unless request_id.nil?
216
+ command.query['fields'] = fields unless fields.nil?
217
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
218
+ execute_or_queue_command(command, &block)
219
+ end
220
+
221
+ # Generates the manifest for deployment of the GKE connect agent.
222
+ # @param [String] name
223
+ # Required. The Membership resource name the Agent will associate with, in the
224
+ # format `projects/*/locations/*/memberships/*`.
225
+ # @param [String] image_pull_secret_content
226
+ # Optional. The image pull secret content for the registry, if not public.
227
+ # @param [Boolean] is_upgrade
228
+ # Optional. If true, generate the resources for upgrade only. Some resources
229
+ # generated only for installation (e.g. secrets) will be excluded.
230
+ # @param [String] namespace
231
+ # Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
232
+ # The Connect Agent is authorized automatically when run in the default
233
+ # namespace. Otherwise, explicit authorization must be granted with an
234
+ # additional IAM binding.
235
+ # @param [String] proxy
236
+ # Optional. URI of a proxy if connectivity from the agent to gkeconnect.
237
+ # googleapis.com requires the use of a proxy. Format must be in the form `http(s)
238
+ # ://`proxy_address``, depending on the HTTP/HTTPS protocol supported by the
239
+ # proxy. This will direct the connect agent's outbound traffic through a HTTP(S)
240
+ # proxy.
241
+ # @param [String] registry
242
+ # Optional. The registry to fetch the connect agent image from. Defaults to gcr.
243
+ # io/gkeconnect.
244
+ # @param [String] version
245
+ # Optional. The Connect agent version to use. Defaults to the most current
246
+ # version.
247
+ # @param [String] fields
248
+ # Selector specifying which fields to include in a partial response.
249
+ # @param [String] quota_user
250
+ # Available to use for quota purposes for server-side applications. Can be any
251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
252
+ # @param [Google::Apis::RequestOptions] options
253
+ # Request-specific options
254
+ #
255
+ # @yield [result, err] Result & error if block supplied
256
+ # @yieldparam result [Google::Apis::GkehubV1::GenerateConnectManifestResponse] parsed result object
257
+ # @yieldparam err [StandardError] error object if request failed
258
+ #
259
+ # @return [Google::Apis::GkehubV1::GenerateConnectManifestResponse]
260
+ #
261
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
264
+ def generate_project_location_membership_connect_manifest(name, image_pull_secret_content: nil, is_upgrade: nil, namespace: nil, proxy: nil, registry: nil, version: nil, fields: nil, quota_user: nil, options: nil, &block)
265
+ command = make_simple_command(:get, 'v1/{+name}:generateConnectManifest', options)
266
+ command.response_representation = Google::Apis::GkehubV1::GenerateConnectManifestResponse::Representation
267
+ command.response_class = Google::Apis::GkehubV1::GenerateConnectManifestResponse
268
+ command.params['name'] = name unless name.nil?
269
+ command.query['imagePullSecretContent'] = image_pull_secret_content unless image_pull_secret_content.nil?
270
+ command.query['isUpgrade'] = is_upgrade unless is_upgrade.nil?
271
+ command.query['namespace'] = namespace unless namespace.nil?
272
+ command.query['proxy'] = proxy unless proxy.nil?
273
+ command.query['registry'] = registry unless registry.nil?
274
+ command.query['version'] = version unless version.nil?
275
+ command.query['fields'] = fields unless fields.nil?
276
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
277
+ execute_or_queue_command(command, &block)
278
+ end
279
+
280
+ # Gets the details of a Membership.
281
+ # @param [String] name
282
+ # Required. The Membership resource name in the format `projects/*/locations/*/
283
+ # memberships/*`.
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # @param [Google::Apis::RequestOptions] options
290
+ # Request-specific options
291
+ #
292
+ # @yield [result, err] Result & error if block supplied
293
+ # @yieldparam result [Google::Apis::GkehubV1::Membership] parsed result object
294
+ # @yieldparam err [StandardError] error object if request failed
295
+ #
296
+ # @return [Google::Apis::GkehubV1::Membership]
297
+ #
298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
301
+ def get_project_location_membership(name, fields: nil, quota_user: nil, options: nil, &block)
302
+ command = make_simple_command(:get, 'v1/{+name}', options)
303
+ command.response_representation = Google::Apis::GkehubV1::Membership::Representation
304
+ command.response_class = Google::Apis::GkehubV1::Membership
305
+ command.params['name'] = name unless name.nil?
306
+ command.query['fields'] = fields unless fields.nil?
307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
308
+ execute_or_queue_command(command, &block)
309
+ end
310
+
311
+ # Gets the access control policy for a resource. Returns an empty policy if the
312
+ # resource exists and does not have a policy set.
313
+ # @param [String] resource
314
+ # REQUIRED: The resource for which the policy is being requested. See the
315
+ # operation documentation for the appropriate value for this field.
316
+ # @param [Fixnum] options_requested_policy_version
317
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
318
+ # 3. Requests specifying an invalid value will be rejected. Requests for
319
+ # policies with any conditional bindings must specify version 3. Policies
320
+ # without any conditional bindings may specify any valid value or leave the
321
+ # field unset. To learn which resources support conditions in their IAM policies,
322
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
323
+ # resource-policies).
324
+ # @param [String] fields
325
+ # Selector specifying which fields to include in a partial response.
326
+ # @param [String] quota_user
327
+ # Available to use for quota purposes for server-side applications. Can be any
328
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
329
+ # @param [Google::Apis::RequestOptions] options
330
+ # Request-specific options
331
+ #
332
+ # @yield [result, err] Result & error if block supplied
333
+ # @yieldparam result [Google::Apis::GkehubV1::Policy] parsed result object
334
+ # @yieldparam err [StandardError] error object if request failed
335
+ #
336
+ # @return [Google::Apis::GkehubV1::Policy]
337
+ #
338
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
339
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
340
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
341
+ def get_project_location_membership_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
342
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
343
+ command.response_representation = Google::Apis::GkehubV1::Policy::Representation
344
+ command.response_class = Google::Apis::GkehubV1::Policy
345
+ command.params['resource'] = resource unless resource.nil?
346
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
347
+ command.query['fields'] = fields unless fields.nil?
348
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
349
+ execute_or_queue_command(command, &block)
350
+ end
351
+
352
+ # Lists Memberships in a given project and location.
353
+ # @param [String] parent
354
+ # Required. The parent (project and location) where the Memberships will be
355
+ # listed. Specified in the format `projects/*/locations/*`.
356
+ # @param [String] filter
357
+ # Optional. Lists Memberships that match the filter expression, following the
358
+ # syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in
359
+ # project `foo-proj` and location `global`: name = "projects/foo-proj/locations/
360
+ # global/membership/bar" - Memberships that have a label called `foo`: labels.
361
+ # foo:* - Memberships that have a label called `foo` whose value is `bar`:
362
+ # labels.foo = bar - Memberships in the CREATING state: state = CREATING
363
+ # @param [String] order_by
364
+ # Optional. One or more fields to compare and use to sort the output. See https:/
365
+ # /google.aip.dev/132#ordering.
366
+ # @param [Fixnum] page_size
367
+ # Optional. When requesting a 'page' of resources, `page_size` specifies number
368
+ # of resources to return. If unspecified or set to 0, all resources will be
369
+ # returned.
370
+ # @param [String] page_token
371
+ # Optional. Token returned by previous call to `ListMemberships` which specifies
372
+ # the position in the list from where to continue listing the resources.
373
+ # @param [String] fields
374
+ # Selector specifying which fields to include in a partial response.
375
+ # @param [String] quota_user
376
+ # Available to use for quota purposes for server-side applications. Can be any
377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::GkehubV1::ListMembershipsResponse] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::GkehubV1::ListMembershipsResponse]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def list_project_location_memberships(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
391
+ command = make_simple_command(:get, 'v1/{+parent}/memberships', options)
392
+ command.response_representation = Google::Apis::GkehubV1::ListMembershipsResponse::Representation
393
+ command.response_class = Google::Apis::GkehubV1::ListMembershipsResponse
394
+ command.params['parent'] = parent unless parent.nil?
395
+ command.query['filter'] = filter unless filter.nil?
396
+ command.query['orderBy'] = order_by unless order_by.nil?
397
+ command.query['pageSize'] = page_size unless page_size.nil?
398
+ command.query['pageToken'] = page_token unless page_token.nil?
399
+ command.query['fields'] = fields unless fields.nil?
400
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
401
+ execute_or_queue_command(command, &block)
402
+ end
403
+
404
+ # Updates an existing Membership.
405
+ # @param [String] name
406
+ # Required. The Membership resource name in the format `projects/*/locations/*/
407
+ # memberships/*`.
408
+ # @param [Google::Apis::GkehubV1::Membership] membership_object
409
+ # @param [String] request_id
410
+ # Optional. A request ID to identify requests. Specify a unique request ID so
411
+ # that if you must retry your request, the server will know to ignore the
412
+ # request if it has already been completed. The server will guarantee that for
413
+ # at least 60 minutes after the first request. For example, consider a situation
414
+ # where you make an initial request and the request times out. If you make the
415
+ # request again with the same request ID, the server can check if original
416
+ # operation with the same request ID was received, and if so, will ignore the
417
+ # second request. This prevents clients from accidentally creating duplicate
418
+ # commitments. The request ID must be a valid UUID with the exception that zero
419
+ # UUID is not supported (00000000-0000-0000-0000-000000000000).
420
+ # @param [String] update_mask
421
+ # Required. Mask of fields to update.
422
+ # @param [String] fields
423
+ # Selector specifying which fields to include in a partial response.
424
+ # @param [String] quota_user
425
+ # Available to use for quota purposes for server-side applications. Can be any
426
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
427
+ # @param [Google::Apis::RequestOptions] options
428
+ # Request-specific options
429
+ #
430
+ # @yield [result, err] Result & error if block supplied
431
+ # @yieldparam result [Google::Apis::GkehubV1::Operation] parsed result object
432
+ # @yieldparam err [StandardError] error object if request failed
433
+ #
434
+ # @return [Google::Apis::GkehubV1::Operation]
435
+ #
436
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
437
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
438
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
439
+ def patch_project_location_membership(name, membership_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
440
+ command = make_simple_command(:patch, 'v1/{+name}', options)
441
+ command.request_representation = Google::Apis::GkehubV1::Membership::Representation
442
+ command.request_object = membership_object
443
+ command.response_representation = Google::Apis::GkehubV1::Operation::Representation
444
+ command.response_class = Google::Apis::GkehubV1::Operation
445
+ command.params['name'] = name unless name.nil?
446
+ command.query['requestId'] = request_id unless request_id.nil?
447
+ command.query['updateMask'] = update_mask unless update_mask.nil?
448
+ command.query['fields'] = fields unless fields.nil?
449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
450
+ execute_or_queue_command(command, &block)
451
+ end
452
+
453
+ # Sets the access control policy on the specified resource. Replaces any
454
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
455
+ # PERMISSION_DENIED` errors.
456
+ # @param [String] resource
457
+ # REQUIRED: The resource for which the policy is being specified. See the
458
+ # operation documentation for the appropriate value for this field.
459
+ # @param [Google::Apis::GkehubV1::SetIamPolicyRequest] set_iam_policy_request_object
460
+ # @param [String] fields
461
+ # Selector specifying which fields to include in a partial response.
462
+ # @param [String] quota_user
463
+ # Available to use for quota purposes for server-side applications. Can be any
464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
465
+ # @param [Google::Apis::RequestOptions] options
466
+ # Request-specific options
467
+ #
468
+ # @yield [result, err] Result & error if block supplied
469
+ # @yieldparam result [Google::Apis::GkehubV1::Policy] parsed result object
470
+ # @yieldparam err [StandardError] error object if request failed
471
+ #
472
+ # @return [Google::Apis::GkehubV1::Policy]
473
+ #
474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
477
+ def set_membership_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
478
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
479
+ command.request_representation = Google::Apis::GkehubV1::SetIamPolicyRequest::Representation
480
+ command.request_object = set_iam_policy_request_object
481
+ command.response_representation = Google::Apis::GkehubV1::Policy::Representation
482
+ command.response_class = Google::Apis::GkehubV1::Policy
483
+ command.params['resource'] = resource unless resource.nil?
484
+ command.query['fields'] = fields unless fields.nil?
485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
486
+ execute_or_queue_command(command, &block)
487
+ end
488
+
489
+ # Returns permissions that a caller has on the specified resource. If the
490
+ # resource does not exist, this will return an empty set of permissions, not a `
491
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
492
+ # permission-aware UIs and command-line tools, not for authorization checking.
493
+ # This operation may "fail open" without warning.
494
+ # @param [String] resource
495
+ # REQUIRED: The resource for which the policy detail is being requested. See the
496
+ # operation documentation for the appropriate value for this field.
497
+ # @param [Google::Apis::GkehubV1::TestIamPermissionsRequest] test_iam_permissions_request_object
498
+ # @param [String] fields
499
+ # Selector specifying which fields to include in a partial response.
500
+ # @param [String] quota_user
501
+ # Available to use for quota purposes for server-side applications. Can be any
502
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
503
+ # @param [Google::Apis::RequestOptions] options
504
+ # Request-specific options
505
+ #
506
+ # @yield [result, err] Result & error if block supplied
507
+ # @yieldparam result [Google::Apis::GkehubV1::TestIamPermissionsResponse] parsed result object
508
+ # @yieldparam err [StandardError] error object if request failed
509
+ #
510
+ # @return [Google::Apis::GkehubV1::TestIamPermissionsResponse]
511
+ #
512
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
515
+ def test_membership_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
516
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
517
+ command.request_representation = Google::Apis::GkehubV1::TestIamPermissionsRequest::Representation
518
+ command.request_object = test_iam_permissions_request_object
519
+ command.response_representation = Google::Apis::GkehubV1::TestIamPermissionsResponse::Representation
520
+ command.response_class = Google::Apis::GkehubV1::TestIamPermissionsResponse
521
+ command.params['resource'] = resource unless resource.nil?
522
+ command.query['fields'] = fields unless fields.nil?
523
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
524
+ execute_or_queue_command(command, &block)
525
+ end
526
+
527
+ # Starts asynchronous cancellation on a long-running operation. The server makes
528
+ # a best effort to cancel the operation, but success is not guaranteed. If the
529
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
530
+ # Clients can use Operations.GetOperation or other methods to check whether the
531
+ # cancellation succeeded or whether the operation completed despite cancellation.
532
+ # On successful cancellation, the operation is not deleted; instead, it becomes
533
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
534
+ # corresponding to `Code.CANCELLED`.
535
+ # @param [String] name
536
+ # The name of the operation resource to be cancelled.
537
+ # @param [Google::Apis::GkehubV1::CancelOperationRequest] cancel_operation_request_object
538
+ # @param [String] fields
539
+ # Selector specifying which fields to include in a partial response.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
543
+ # @param [Google::Apis::RequestOptions] options
544
+ # Request-specific options
545
+ #
546
+ # @yield [result, err] Result & error if block supplied
547
+ # @yieldparam result [Google::Apis::GkehubV1::Empty] parsed result object
548
+ # @yieldparam err [StandardError] error object if request failed
549
+ #
550
+ # @return [Google::Apis::GkehubV1::Empty]
551
+ #
552
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
553
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
554
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
555
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
556
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
557
+ command.request_representation = Google::Apis::GkehubV1::CancelOperationRequest::Representation
558
+ command.request_object = cancel_operation_request_object
559
+ command.response_representation = Google::Apis::GkehubV1::Empty::Representation
560
+ command.response_class = Google::Apis::GkehubV1::Empty
561
+ command.params['name'] = name unless name.nil?
562
+ command.query['fields'] = fields unless fields.nil?
563
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
564
+ execute_or_queue_command(command, &block)
565
+ end
566
+
567
+ # Deletes a long-running operation. This method indicates that the client is no
568
+ # longer interested in the operation result. It does not cancel the operation.
569
+ # If the server doesn't support this method, it returns `google.rpc.Code.
570
+ # UNIMPLEMENTED`.
571
+ # @param [String] name
572
+ # The name of the operation resource to be deleted.
573
+ # @param [String] fields
574
+ # Selector specifying which fields to include in a partial response.
575
+ # @param [String] quota_user
576
+ # Available to use for quota purposes for server-side applications. Can be any
577
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
578
+ # @param [Google::Apis::RequestOptions] options
579
+ # Request-specific options
580
+ #
581
+ # @yield [result, err] Result & error if block supplied
582
+ # @yieldparam result [Google::Apis::GkehubV1::Empty] parsed result object
583
+ # @yieldparam err [StandardError] error object if request failed
584
+ #
585
+ # @return [Google::Apis::GkehubV1::Empty]
586
+ #
587
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
588
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
589
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
590
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
591
+ command = make_simple_command(:delete, 'v1/{+name}', options)
592
+ command.response_representation = Google::Apis::GkehubV1::Empty::Representation
593
+ command.response_class = Google::Apis::GkehubV1::Empty
594
+ command.params['name'] = name unless name.nil?
595
+ command.query['fields'] = fields unless fields.nil?
596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ execute_or_queue_command(command, &block)
598
+ end
599
+
600
+ # Gets the latest state of a long-running operation. Clients can use this method
601
+ # to poll the operation result at intervals as recommended by the API service.
602
+ # @param [String] name
603
+ # The name of the operation resource.
604
+ # @param [String] fields
605
+ # Selector specifying which fields to include in a partial response.
606
+ # @param [String] quota_user
607
+ # Available to use for quota purposes for server-side applications. Can be any
608
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
609
+ # @param [Google::Apis::RequestOptions] options
610
+ # Request-specific options
611
+ #
612
+ # @yield [result, err] Result & error if block supplied
613
+ # @yieldparam result [Google::Apis::GkehubV1::Operation] parsed result object
614
+ # @yieldparam err [StandardError] error object if request failed
615
+ #
616
+ # @return [Google::Apis::GkehubV1::Operation]
617
+ #
618
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
619
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
620
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
621
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
622
+ command = make_simple_command(:get, 'v1/{+name}', options)
623
+ command.response_representation = Google::Apis::GkehubV1::Operation::Representation
624
+ command.response_class = Google::Apis::GkehubV1::Operation
625
+ command.params['name'] = name unless name.nil?
626
+ command.query['fields'] = fields unless fields.nil?
627
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
628
+ execute_or_queue_command(command, &block)
629
+ end
630
+
631
+ # Lists operations that match the specified filter in the request. If the server
632
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
633
+ # binding allows API services to override the binding to use different resource
634
+ # name schemes, such as `users/*/operations`. To override the binding, API
635
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
636
+ # service configuration. For backwards compatibility, the default name includes
637
+ # the operations collection id, however overriding users must ensure the name
638
+ # binding is the parent resource, without the operations collection id.
639
+ # @param [String] name
640
+ # The name of the operation's parent resource.
641
+ # @param [String] filter
642
+ # The standard list filter.
643
+ # @param [Fixnum] page_size
644
+ # The standard list page size.
645
+ # @param [String] page_token
646
+ # The standard list page token.
647
+ # @param [String] fields
648
+ # Selector specifying which fields to include in a partial response.
649
+ # @param [String] quota_user
650
+ # Available to use for quota purposes for server-side applications. Can be any
651
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
652
+ # @param [Google::Apis::RequestOptions] options
653
+ # Request-specific options
654
+ #
655
+ # @yield [result, err] Result & error if block supplied
656
+ # @yieldparam result [Google::Apis::GkehubV1::ListOperationsResponse] parsed result object
657
+ # @yieldparam err [StandardError] error object if request failed
658
+ #
659
+ # @return [Google::Apis::GkehubV1::ListOperationsResponse]
660
+ #
661
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
662
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
663
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
664
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
665
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
666
+ command.response_representation = Google::Apis::GkehubV1::ListOperationsResponse::Representation
667
+ command.response_class = Google::Apis::GkehubV1::ListOperationsResponse
668
+ command.params['name'] = name unless name.nil?
669
+ command.query['filter'] = filter unless filter.nil?
670
+ command.query['pageSize'] = page_size unless page_size.nil?
671
+ command.query['pageToken'] = page_token unless page_token.nil?
672
+ command.query['fields'] = fields unless fields.nil?
673
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
674
+ execute_or_queue_command(command, &block)
675
+ end
676
+
677
+ protected
678
+
679
+ def apply_command_defaults(command)
680
+ command.query['key'] = key unless key.nil?
681
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
682
+ end
683
+ end
684
+ end
685
+ end
686
+ end