google-apis-gkehub_v2alpha 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,602 @@
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 GkehubV2alpha
23
+ # GKE Hub API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/gkehub_v2alpha'
29
+ #
30
+ # Gkehub = Google::Apis::GkehubV2alpha # 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_v2alpha',
48
+ client_version: Google::Apis::GkehubV2alpha::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::GkehubV2alpha::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::GkehubV2alpha::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, 'v2alpha/{+name}', options)
74
+ command.response_representation = Google::Apis::GkehubV2alpha::Location::Representation
75
+ command.response_class = Google::Apis::GkehubV2alpha::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 selects 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::GkehubV2alpha::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::GkehubV2alpha::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, 'v2alpha/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::GkehubV2alpha::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::GkehubV2alpha::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
+ # Creates FeatureConfig under a given parent.
126
+ # @param [String] parent
127
+ # Required. The name of parent where the FeatureConfig will be created.
128
+ # Specified in the format `projects/`project`/locations/global/featureConfigs/`
129
+ # feature_type`/`feature_config`/`.
130
+ # @param [Google::Apis::GkehubV2alpha::FeatureConfig] feature_config_object
131
+ # @param [String] feature_config_id
132
+ # The ID of the feature config to create.
133
+ # @param [String] request_id
134
+ # Idempotent request UUID.
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # @param [Google::Apis::RequestOptions] options
141
+ # Request-specific options
142
+ #
143
+ # @yield [result, err] Result & error if block supplied
144
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
145
+ # @yieldparam err [StandardError] error object if request failed
146
+ #
147
+ # @return [Google::Apis::GkehubV2alpha::Operation]
148
+ #
149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
152
+ def create_project_location_feature_config(parent, feature_config_object = nil, feature_config_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
153
+ command = make_simple_command(:post, 'v2alpha/{+parent}/featureConfigs', options)
154
+ command.request_representation = Google::Apis::GkehubV2alpha::FeatureConfig::Representation
155
+ command.request_object = feature_config_object
156
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
157
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
158
+ command.params['parent'] = parent unless parent.nil?
159
+ command.query['featureConfigId'] = feature_config_id unless feature_config_id.nil?
160
+ command.query['requestId'] = request_id unless request_id.nil?
161
+ command.query['fields'] = fields unless fields.nil?
162
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
163
+ execute_or_queue_command(command, &block)
164
+ end
165
+
166
+ # Removes a FeatureConfig.
167
+ # @param [String] name
168
+ # Required. The name of the membershipFeature to be deleted. Specified in the
169
+ # format `projects/*/locations/*/featureConfigs/**`.
170
+ # @param [String] request_id
171
+ # Idempotent request UUID.
172
+ # @param [String] fields
173
+ # Selector specifying which fields to include in a partial response.
174
+ # @param [String] quota_user
175
+ # Available to use for quota purposes for server-side applications. Can be any
176
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
177
+ # @param [Google::Apis::RequestOptions] options
178
+ # Request-specific options
179
+ #
180
+ # @yield [result, err] Result & error if block supplied
181
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
182
+ # @yieldparam err [StandardError] error object if request failed
183
+ #
184
+ # @return [Google::Apis::GkehubV2alpha::Operation]
185
+ #
186
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
187
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
188
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
189
+ def delete_project_location_feature_config(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
190
+ command = make_simple_command(:delete, 'v2alpha/{+name}', options)
191
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
192
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
193
+ command.params['name'] = name unless name.nil?
194
+ command.query['requestId'] = request_id unless request_id.nil?
195
+ command.query['fields'] = fields unless fields.nil?
196
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
197
+ execute_or_queue_command(command, &block)
198
+ end
199
+
200
+ # ========= FeatureConfig Services ========= Gets details of a featureConfig.
201
+ # @param [String] name
202
+ # Required. The FeatureConfig resource name in the format `projects/*/locations/*
203
+ # /featureConfigs/**`.
204
+ # @param [String] fields
205
+ # Selector specifying which fields to include in a partial response.
206
+ # @param [String] quota_user
207
+ # Available to use for quota purposes for server-side applications. Can be any
208
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
209
+ # @param [Google::Apis::RequestOptions] options
210
+ # Request-specific options
211
+ #
212
+ # @yield [result, err] Result & error if block supplied
213
+ # @yieldparam result [Google::Apis::GkehubV2alpha::FeatureConfig] parsed result object
214
+ # @yieldparam err [StandardError] error object if request failed
215
+ #
216
+ # @return [Google::Apis::GkehubV2alpha::FeatureConfig]
217
+ #
218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
221
+ def get_project_location_feature_config(name, fields: nil, quota_user: nil, options: nil, &block)
222
+ command = make_simple_command(:get, 'v2alpha/{+name}', options)
223
+ command.response_representation = Google::Apis::GkehubV2alpha::FeatureConfig::Representation
224
+ command.response_class = Google::Apis::GkehubV2alpha::FeatureConfig
225
+ command.params['name'] = name unless name.nil?
226
+ command.query['fields'] = fields unless fields.nil?
227
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
228
+ execute_or_queue_command(command, &block)
229
+ end
230
+
231
+ # Lists all FeatureConfigs in a given project and location.
232
+ # @param [String] parent
233
+ # Required. The parent where the FeatureConfigs will be listed. In the format: `
234
+ # projects/*/locations/*`.
235
+ # @param [String] filter
236
+ # Lists FeatureConfigs that match the filter expression, following the syntax
237
+ # outlined in https://google.aip.dev/160.
238
+ # @param [String] order_by
239
+ # One or more fields to compare and use to sort the output. See https://google.
240
+ # aip.dev/132#ordering.
241
+ # @param [Fixnum] page_size
242
+ # When requesting a 'page' of resources, `page_size` specifies number of
243
+ # resources to return. If unspecified or set to 0, all resources will be
244
+ # returned.
245
+ # @param [String] page_token
246
+ # Token returned by previous call to `ListFeatures` which specifies the position
247
+ # in the list from where to continue listing the resources.
248
+ # @param [String] fields
249
+ # Selector specifying which fields to include in a partial response.
250
+ # @param [String] quota_user
251
+ # Available to use for quota purposes for server-side applications. Can be any
252
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
253
+ # @param [Google::Apis::RequestOptions] options
254
+ # Request-specific options
255
+ #
256
+ # @yield [result, err] Result & error if block supplied
257
+ # @yieldparam result [Google::Apis::GkehubV2alpha::ListFeatureConfigsResponse] parsed result object
258
+ # @yieldparam err [StandardError] error object if request failed
259
+ #
260
+ # @return [Google::Apis::GkehubV2alpha::ListFeatureConfigsResponse]
261
+ #
262
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
263
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
264
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
265
+ def list_project_location_feature_configs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
266
+ command = make_simple_command(:get, 'v2alpha/{+parent}/featureConfigs', options)
267
+ command.response_representation = Google::Apis::GkehubV2alpha::ListFeatureConfigsResponse::Representation
268
+ command.response_class = Google::Apis::GkehubV2alpha::ListFeatureConfigsResponse
269
+ command.params['parent'] = parent unless parent.nil?
270
+ command.query['filter'] = filter unless filter.nil?
271
+ command.query['orderBy'] = order_by unless order_by.nil?
272
+ command.query['pageSize'] = page_size unless page_size.nil?
273
+ command.query['pageToken'] = page_token unless page_token.nil?
274
+ command.query['fields'] = fields unless fields.nil?
275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
276
+ execute_or_queue_command(command, &block)
277
+ end
278
+
279
+ # Creates membershipFeature under a given parent.
280
+ # @param [String] parent
281
+ # Required. The name of parent where the MembershipFeature will be created.
282
+ # Specified in the format `projects/*/locations/*/memberships/*/features/*`.
283
+ # @param [Google::Apis::GkehubV2alpha::MembershipFeature] membership_feature_object
284
+ # @param [String] request_id
285
+ # Idempotent request UUID.
286
+ # @param [String] fields
287
+ # Selector specifying which fields to include in a partial response.
288
+ # @param [String] quota_user
289
+ # Available to use for quota purposes for server-side applications. Can be any
290
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
291
+ # @param [Google::Apis::RequestOptions] options
292
+ # Request-specific options
293
+ #
294
+ # @yield [result, err] Result & error if block supplied
295
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
296
+ # @yieldparam err [StandardError] error object if request failed
297
+ #
298
+ # @return [Google::Apis::GkehubV2alpha::Operation]
299
+ #
300
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
301
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
302
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
303
+ def create_project_location_membership_feature(parent, membership_feature_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
304
+ command = make_simple_command(:post, 'v2alpha/{+parent}/features', options)
305
+ command.request_representation = Google::Apis::GkehubV2alpha::MembershipFeature::Representation
306
+ command.request_object = membership_feature_object
307
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
308
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
309
+ command.params['parent'] = parent unless parent.nil?
310
+ command.query['requestId'] = request_id unless request_id.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ execute_or_queue_command(command, &block)
314
+ end
315
+
316
+ # Removes a membershipFeature.
317
+ # @param [String] name
318
+ # Required. The name of the membershipFeature to be deleted. Specified in the
319
+ # format `projects/*/locations/*/memberships/*/features/*`.
320
+ # @param [String] request_id
321
+ # Idempotent request UUID.
322
+ # @param [String] fields
323
+ # Selector specifying which fields to include in a partial response.
324
+ # @param [String] quota_user
325
+ # Available to use for quota purposes for server-side applications. Can be any
326
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
327
+ # @param [Google::Apis::RequestOptions] options
328
+ # Request-specific options
329
+ #
330
+ # @yield [result, err] Result & error if block supplied
331
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
332
+ # @yieldparam err [StandardError] error object if request failed
333
+ #
334
+ # @return [Google::Apis::GkehubV2alpha::Operation]
335
+ #
336
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
337
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
338
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
339
+ def delete_project_location_membership_feature(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
340
+ command = make_simple_command(:delete, 'v2alpha/{+name}', options)
341
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
342
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
343
+ command.params['name'] = name unless name.nil?
344
+ command.query['requestId'] = request_id unless request_id.nil?
345
+ command.query['fields'] = fields unless fields.nil?
346
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
347
+ execute_or_queue_command(command, &block)
348
+ end
349
+
350
+ # ========= MembershipFeature Services ========= Gets details of a
351
+ # membershipFeature.
352
+ # @param [String] name
353
+ # Required. The MembershipFeature resource name in the format `projects/*/
354
+ # locations/*/memberships/*/features/*`.
355
+ # @param [String] fields
356
+ # Selector specifying which fields to include in a partial response.
357
+ # @param [String] quota_user
358
+ # Available to use for quota purposes for server-side applications. Can be any
359
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
360
+ # @param [Google::Apis::RequestOptions] options
361
+ # Request-specific options
362
+ #
363
+ # @yield [result, err] Result & error if block supplied
364
+ # @yieldparam result [Google::Apis::GkehubV2alpha::MembershipFeature] parsed result object
365
+ # @yieldparam err [StandardError] error object if request failed
366
+ #
367
+ # @return [Google::Apis::GkehubV2alpha::MembershipFeature]
368
+ #
369
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
370
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
371
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
372
+ def get_project_location_membership_feature(name, fields: nil, quota_user: nil, options: nil, &block)
373
+ command = make_simple_command(:get, 'v2alpha/{+name}', options)
374
+ command.response_representation = Google::Apis::GkehubV2alpha::MembershipFeature::Representation
375
+ command.response_class = Google::Apis::GkehubV2alpha::MembershipFeature
376
+ command.params['name'] = name unless name.nil?
377
+ command.query['fields'] = fields unless fields.nil?
378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ execute_or_queue_command(command, &block)
380
+ end
381
+
382
+ # Lists MembershipFeatures in a given project and location.
383
+ # @param [String] parent
384
+ # Required. The parent where the MembershipFeature will be listed. In the format:
385
+ # `projects/*/locations/*/memberships/*`.
386
+ # @param [String] filter
387
+ # Lists MembershipFeatures that match the filter expression, following the
388
+ # syntax outlined in https://google.aip.dev/160. Examples: - Feature with the
389
+ # name "helloworld" in project "foo-proj" and membership "member-bar": name = "
390
+ # projects/foo-proj/locations/global/memberships/member-bar/features/helloworld"
391
+ # - Features that have a label called `foo`: labels.foo:* - Features that have a
392
+ # label called `foo` whose value is `bar`: labels.foo = bar
393
+ # @param [String] order_by
394
+ # One or more fields to compare and use to sort the output. See https://google.
395
+ # aip.dev/132#ordering.
396
+ # @param [Fixnum] page_size
397
+ # When requesting a 'page' of resources, `page_size` specifies number of
398
+ # resources to return. If unspecified or set to 0, all resources will be
399
+ # returned.
400
+ # @param [String] page_token
401
+ # Token returned by previous call to `ListFeatures` which specifies the position
402
+ # in the list from where to continue listing the resources.
403
+ # @param [String] fields
404
+ # Selector specifying which fields to include in a partial response.
405
+ # @param [String] quota_user
406
+ # Available to use for quota purposes for server-side applications. Can be any
407
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
408
+ # @param [Google::Apis::RequestOptions] options
409
+ # Request-specific options
410
+ #
411
+ # @yield [result, err] Result & error if block supplied
412
+ # @yieldparam result [Google::Apis::GkehubV2alpha::ListMembershipFeaturesResponse] parsed result object
413
+ # @yieldparam err [StandardError] error object if request failed
414
+ #
415
+ # @return [Google::Apis::GkehubV2alpha::ListMembershipFeaturesResponse]
416
+ #
417
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
418
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
419
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
420
+ def list_project_location_membership_features(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
421
+ command = make_simple_command(:get, 'v2alpha/{+parent}/features', options)
422
+ command.response_representation = Google::Apis::GkehubV2alpha::ListMembershipFeaturesResponse::Representation
423
+ command.response_class = Google::Apis::GkehubV2alpha::ListMembershipFeaturesResponse
424
+ command.params['parent'] = parent unless parent.nil?
425
+ command.query['filter'] = filter unless filter.nil?
426
+ command.query['orderBy'] = order_by unless order_by.nil?
427
+ command.query['pageSize'] = page_size unless page_size.nil?
428
+ command.query['pageToken'] = page_token unless page_token.nil?
429
+ command.query['fields'] = fields unless fields.nil?
430
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
431
+ execute_or_queue_command(command, &block)
432
+ end
433
+
434
+ # Updates an existing MembershipFeature.
435
+ # @param [String] name
436
+ # Output only. The resource name of the membershipFeature, in the format: `
437
+ # projects/`project`/locations/`location`/memberships/`membership`/features/`
438
+ # feature``. Note that `membershipFeatures` is shortened to `features` in the
439
+ # resource name. (see http://go/aip/122#collection-identifiers)
440
+ # @param [Google::Apis::GkehubV2alpha::MembershipFeature] membership_feature_object
441
+ # @param [String] request_id
442
+ # Idempotent request UUID.
443
+ # @param [String] update_mask
444
+ # Required. Mask of fields to update.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::GkehubV2alpha::Operation]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def patch_project_location_membership_feature(name, membership_feature_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:patch, 'v2alpha/{+name}', options)
464
+ command.request_representation = Google::Apis::GkehubV2alpha::MembershipFeature::Representation
465
+ command.request_object = membership_feature_object
466
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
467
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
468
+ command.params['name'] = name unless name.nil?
469
+ command.query['requestId'] = request_id unless request_id.nil?
470
+ command.query['updateMask'] = update_mask unless update_mask.nil?
471
+ command.query['fields'] = fields unless fields.nil?
472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
473
+ execute_or_queue_command(command, &block)
474
+ end
475
+
476
+ # Starts asynchronous cancellation on a long-running operation. The server makes
477
+ # a best effort to cancel the operation, but success is not guaranteed. If the
478
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
479
+ # Clients can use Operations.GetOperation or other methods to check whether the
480
+ # cancellation succeeded or whether the operation completed despite cancellation.
481
+ # On successful cancellation, the operation is not deleted; instead, it becomes
482
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
483
+ # corresponding to `Code.CANCELLED`.
484
+ # @param [String] name
485
+ # The name of the operation resource to be cancelled.
486
+ # @param [Google::Apis::GkehubV2alpha::CancelOperationRequest] cancel_operation_request_object
487
+ # @param [String] fields
488
+ # Selector specifying which fields to include in a partial response.
489
+ # @param [String] quota_user
490
+ # Available to use for quota purposes for server-side applications. Can be any
491
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
492
+ # @param [Google::Apis::RequestOptions] options
493
+ # Request-specific options
494
+ #
495
+ # @yield [result, err] Result & error if block supplied
496
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Empty] parsed result object
497
+ # @yieldparam err [StandardError] error object if request failed
498
+ #
499
+ # @return [Google::Apis::GkehubV2alpha::Empty]
500
+ #
501
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
502
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
503
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
504
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
505
+ command = make_simple_command(:post, 'v2alpha/{+name}:cancel', options)
506
+ command.request_representation = Google::Apis::GkehubV2alpha::CancelOperationRequest::Representation
507
+ command.request_object = cancel_operation_request_object
508
+ command.response_representation = Google::Apis::GkehubV2alpha::Empty::Representation
509
+ command.response_class = Google::Apis::GkehubV2alpha::Empty
510
+ command.params['name'] = name unless name.nil?
511
+ command.query['fields'] = fields unless fields.nil?
512
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
513
+ execute_or_queue_command(command, &block)
514
+ end
515
+
516
+ # Gets the latest state of a long-running operation. Clients can use this method
517
+ # to poll the operation result at intervals as recommended by the API service.
518
+ # @param [String] name
519
+ # The name of the operation resource.
520
+ # @param [String] fields
521
+ # Selector specifying which fields to include in a partial response.
522
+ # @param [String] quota_user
523
+ # Available to use for quota purposes for server-side applications. Can be any
524
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
525
+ # @param [Google::Apis::RequestOptions] options
526
+ # Request-specific options
527
+ #
528
+ # @yield [result, err] Result & error if block supplied
529
+ # @yieldparam result [Google::Apis::GkehubV2alpha::Operation] parsed result object
530
+ # @yieldparam err [StandardError] error object if request failed
531
+ #
532
+ # @return [Google::Apis::GkehubV2alpha::Operation]
533
+ #
534
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
535
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
536
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
537
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
538
+ command = make_simple_command(:get, 'v2alpha/{+name}', options)
539
+ command.response_representation = Google::Apis::GkehubV2alpha::Operation::Representation
540
+ command.response_class = Google::Apis::GkehubV2alpha::Operation
541
+ command.params['name'] = name unless name.nil?
542
+ command.query['fields'] = fields unless fields.nil?
543
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
544
+ execute_or_queue_command(command, &block)
545
+ end
546
+
547
+ # Lists operations that match the specified filter in the request. If the server
548
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
549
+ # binding allows API services to override the binding to use different resource
550
+ # name schemes, such as `users/*/operations`. To override the binding, API
551
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
552
+ # service configuration. For backwards compatibility, the default name includes
553
+ # the operations collection id, however overriding users must ensure the name
554
+ # binding is the parent resource, without the operations collection id.
555
+ # @param [String] name
556
+ # The name of the operation's parent resource.
557
+ # @param [String] filter
558
+ # The standard list filter.
559
+ # @param [Fixnum] page_size
560
+ # The standard list page size.
561
+ # @param [String] page_token
562
+ # The standard list page token.
563
+ # @param [String] fields
564
+ # Selector specifying which fields to include in a partial response.
565
+ # @param [String] quota_user
566
+ # Available to use for quota purposes for server-side applications. Can be any
567
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
568
+ # @param [Google::Apis::RequestOptions] options
569
+ # Request-specific options
570
+ #
571
+ # @yield [result, err] Result & error if block supplied
572
+ # @yieldparam result [Google::Apis::GkehubV2alpha::ListOperationsResponse] parsed result object
573
+ # @yieldparam err [StandardError] error object if request failed
574
+ #
575
+ # @return [Google::Apis::GkehubV2alpha::ListOperationsResponse]
576
+ #
577
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
578
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
579
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
580
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
581
+ command = make_simple_command(:get, 'v2alpha/{+name}/operations', options)
582
+ command.response_representation = Google::Apis::GkehubV2alpha::ListOperationsResponse::Representation
583
+ command.response_class = Google::Apis::GkehubV2alpha::ListOperationsResponse
584
+ command.params['name'] = name unless name.nil?
585
+ command.query['filter'] = filter unless filter.nil?
586
+ command.query['pageSize'] = page_size unless page_size.nil?
587
+ command.query['pageToken'] = page_token unless page_token.nil?
588
+ command.query['fields'] = fields unless fields.nil?
589
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
590
+ execute_or_queue_command(command, &block)
591
+ end
592
+
593
+ protected
594
+
595
+ def apply_command_defaults(command)
596
+ command.query['key'] = key unless key.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ end
599
+ end
600
+ end
601
+ end
602
+ end
@@ -0,0 +1,36 @@
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/gkehub_v2alpha/service.rb'
16
+ require 'google/apis/gkehub_v2alpha/classes.rb'
17
+ require 'google/apis/gkehub_v2alpha/representations.rb'
18
+ require 'google/apis/gkehub_v2alpha/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # GKE Hub API
23
+ #
24
+ #
25
+ #
26
+ # @see https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster
27
+ module GkehubV2alpha
28
+ # Version of the GKE Hub API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V2alpha'
31
+
32
+ # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,15 @@
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/gkehub_v2alpha"