google-cloud-workstations-v1beta 0.a → 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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/workstations/v1beta/bindings_override.rb +137 -0
  6. data/lib/google/cloud/workstations/v1beta/rest.rb +38 -0
  7. data/lib/google/cloud/workstations/v1beta/version.rb +7 -2
  8. data/lib/google/cloud/workstations/v1beta/workstations/client.rb +2543 -0
  9. data/lib/google/cloud/workstations/v1beta/workstations/credentials.rb +47 -0
  10. data/lib/google/cloud/workstations/v1beta/workstations/operations.rb +809 -0
  11. data/lib/google/cloud/workstations/v1beta/workstations/paths.rb +113 -0
  12. data/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +2380 -0
  13. data/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +902 -0
  14. data/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +1258 -0
  15. data/lib/google/cloud/workstations/v1beta/workstations/rest.rb +54 -0
  16. data/lib/google/cloud/workstations/v1beta/workstations.rb +56 -0
  17. data/lib/google/cloud/workstations/v1beta/workstations_pb.rb +100 -0
  18. data/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +86 -0
  19. data/lib/google/cloud/workstations/v1beta.rb +45 -0
  20. data/lib/google-cloud-workstations-v1beta.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +399 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +222 -0
  26. data/proto_docs/google/cloud/workstations/v1beta/workstations.rb +1261 -0
  27. data/proto_docs/google/longrunning/operations.rb +164 -0
  28. data/proto_docs/google/protobuf/any.rb +145 -0
  29. data/proto_docs/google/protobuf/duration.rb +98 -0
  30. data/proto_docs/google/protobuf/empty.rb +34 -0
  31. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  32. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  33. data/proto_docs/google/rpc/status.rb +48 -0
  34. data/proto_docs/google/type/expr.rb +75 -0
  35. metadata +114 -10
@@ -0,0 +1,2543 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://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,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/workstations/v1beta/workstations_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Workstations
27
+ module V1beta
28
+ module Workstations
29
+ ##
30
+ # Client for the Workstations service.
31
+ #
32
+ # Service for interacting with Cloud Workstations.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :workstations_stub
45
+
46
+ ##
47
+ # Configure the Workstations Client class.
48
+ #
49
+ # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all Workstations clients
55
+ # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Workstations", "V1beta"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.get_workstation_cluster.timeout = 60.0
76
+ default_config.rpcs.get_workstation_cluster.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.list_workstation_clusters.timeout = 60.0
81
+ default_config.rpcs.list_workstation_clusters.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.create_workstation_cluster.timeout = 60.0
86
+
87
+ default_config.rpcs.update_workstation_cluster.timeout = 60.0
88
+
89
+ default_config.rpcs.delete_workstation_cluster.timeout = 60.0
90
+
91
+ default_config.rpcs.get_workstation_config.timeout = 60.0
92
+ default_config.rpcs.get_workstation_config.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.list_workstation_configs.timeout = 60.0
97
+ default_config.rpcs.list_workstation_configs.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.list_usable_workstation_configs.timeout = 60.0
102
+ default_config.rpcs.list_usable_workstation_configs.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.create_workstation_config.timeout = 60.0
107
+
108
+ default_config.rpcs.update_workstation_config.timeout = 60.0
109
+
110
+ default_config.rpcs.delete_workstation_config.timeout = 60.0
111
+
112
+ default_config.rpcs.get_workstation.timeout = 60.0
113
+ default_config.rpcs.get_workstation.retry_policy = {
114
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
115
+ }
116
+
117
+ default_config.rpcs.list_workstations.timeout = 60.0
118
+ default_config.rpcs.list_workstations.retry_policy = {
119
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
120
+ }
121
+
122
+ default_config.rpcs.list_usable_workstations.timeout = 60.0
123
+ default_config.rpcs.list_usable_workstations.retry_policy = {
124
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
125
+ }
126
+
127
+ default_config.rpcs.create_workstation.timeout = 60.0
128
+
129
+ default_config.rpcs.update_workstation.timeout = 60.0
130
+
131
+ default_config.rpcs.delete_workstation.timeout = 60.0
132
+
133
+ default_config.rpcs.start_workstation.timeout = 60.0
134
+
135
+ default_config.rpcs.stop_workstation.timeout = 60.0
136
+
137
+ default_config.rpcs.generate_access_token.timeout = 60.0
138
+ default_config.rpcs.generate_access_token.retry_policy = {
139
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
140
+ }
141
+
142
+ default_config
143
+ end
144
+ yield @configure if block_given?
145
+ @configure
146
+ end
147
+
148
+ ##
149
+ # Configure the Workstations Client instance.
150
+ #
151
+ # The configuration is set to the derived mode, meaning that values can be changed,
152
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
153
+ # should be made on {Client.configure}.
154
+ #
155
+ # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration}
156
+ # for a description of the configuration fields.
157
+ #
158
+ # @yield [config] Configure the Client client.
159
+ # @yieldparam config [Client::Configuration]
160
+ #
161
+ # @return [Client::Configuration]
162
+ #
163
+ def configure
164
+ yield @config if block_given?
165
+ @config
166
+ end
167
+
168
+ ##
169
+ # The effective universe domain
170
+ #
171
+ # @return [String]
172
+ #
173
+ def universe_domain
174
+ @workstations_stub.universe_domain
175
+ end
176
+
177
+ ##
178
+ # Create a new Workstations client object.
179
+ #
180
+ # @example
181
+ #
182
+ # # Create a client using the default configuration
183
+ # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new
184
+ #
185
+ # # Create a client using a custom configuration
186
+ # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config|
187
+ # config.timeout = 10.0
188
+ # end
189
+ #
190
+ # @yield [config] Configure the Workstations client.
191
+ # @yieldparam config [Client::Configuration]
192
+ #
193
+ def initialize
194
+ # These require statements are intentionally placed here to initialize
195
+ # the gRPC module only when it's required.
196
+ # See https://github.com/googleapis/toolkit/issues/446
197
+ require "gapic/grpc"
198
+ require "google/cloud/workstations/v1beta/workstations_services_pb"
199
+
200
+ # Create the configuration object
201
+ @config = Configuration.new Client.configure
202
+
203
+ # Yield the configuration if needed
204
+ yield @config if block_given?
205
+
206
+ # Create credentials
207
+ credentials = @config.credentials
208
+ # Use self-signed JWT if the endpoint is unchanged from default,
209
+ # but only if the default endpoint does not have a region prefix.
210
+ enable_self_signed_jwt = @config.endpoint.nil? ||
211
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
212
+ !@config.endpoint.split(".").first.include?("-"))
213
+ credentials ||= Credentials.default scope: @config.scope,
214
+ enable_self_signed_jwt: enable_self_signed_jwt
215
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
216
+ credentials = Credentials.new credentials, scope: @config.scope
217
+ end
218
+ @quota_project_id = @config.quota_project
219
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
220
+
221
+ @operations_client = Operations.new do |config|
222
+ config.credentials = credentials
223
+ config.quota_project = @quota_project_id
224
+ config.endpoint = @config.endpoint
225
+ config.universe_domain = @config.universe_domain
226
+ end
227
+
228
+ @workstations_stub = ::Gapic::ServiceStub.new(
229
+ ::Google::Cloud::Workstations::V1beta::Workstations::Stub,
230
+ credentials: credentials,
231
+ endpoint: @config.endpoint,
232
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
233
+ universe_domain: @config.universe_domain,
234
+ channel_args: @config.channel_args,
235
+ interceptors: @config.interceptors,
236
+ channel_pool_config: @config.channel_pool
237
+ )
238
+
239
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
240
+ config.credentials = credentials
241
+ config.quota_project = @quota_project_id
242
+ config.endpoint = @workstations_stub.endpoint
243
+ config.universe_domain = @workstations_stub.universe_domain
244
+ end
245
+
246
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
247
+ config.credentials = credentials
248
+ config.quota_project = @quota_project_id
249
+ config.endpoint = @workstations_stub.endpoint
250
+ config.universe_domain = @workstations_stub.universe_domain
251
+ end
252
+ end
253
+
254
+ ##
255
+ # Get the associated client for long-running operations.
256
+ #
257
+ # @return [::Google::Cloud::Workstations::V1beta::Workstations::Operations]
258
+ #
259
+ attr_reader :operations_client
260
+
261
+ ##
262
+ # Get the associated client for mix-in of the Locations.
263
+ #
264
+ # @return [Google::Cloud::Location::Locations::Client]
265
+ #
266
+ attr_reader :location_client
267
+
268
+ ##
269
+ # Get the associated client for mix-in of the IAMPolicy.
270
+ #
271
+ # @return [Google::Iam::V1::IAMPolicy::Client]
272
+ #
273
+ attr_reader :iam_policy_client
274
+
275
+ # Service calls
276
+
277
+ ##
278
+ # Returns the requested workstation cluster.
279
+ #
280
+ # @overload get_workstation_cluster(request, options = nil)
281
+ # Pass arguments to `get_workstation_cluster` via a request object, either of type
282
+ # {::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest} or an equivalent Hash.
283
+ #
284
+ # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Hash]
285
+ # A request object representing the call parameters. Required. To specify no
286
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
287
+ # @param options [::Gapic::CallOptions, ::Hash]
288
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
289
+ #
290
+ # @overload get_workstation_cluster(name: nil)
291
+ # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at
292
+ # least one keyword argument is required. To specify no parameters, or to keep all
293
+ # the default parameter values, pass an empty Hash as a request object (see above).
294
+ #
295
+ # @param name [::String]
296
+ # Required. Name of the requested resource.
297
+ #
298
+ # @yield [response, operation] Access the result along with the RPC operation
299
+ # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationCluster]
300
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
301
+ #
302
+ # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster]
303
+ #
304
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
305
+ #
306
+ # @example Basic example
307
+ # require "google/cloud/workstations/v1beta"
308
+ #
309
+ # # Create a client object. The client can be reused for multiple calls.
310
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
311
+ #
312
+ # # Create a request. To set request fields, pass in keyword arguments.
313
+ # request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new
314
+ #
315
+ # # Call the get_workstation_cluster method.
316
+ # result = client.get_workstation_cluster request
317
+ #
318
+ # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster.
319
+ # p result
320
+ #
321
+ def get_workstation_cluster request, options = nil
322
+ raise ::ArgumentError, "request must be provided" if request.nil?
323
+
324
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest
325
+
326
+ # Converts hash and nil to an options object
327
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
328
+
329
+ # Customize the options with defaults
330
+ metadata = @config.rpcs.get_workstation_cluster.metadata.to_h
331
+
332
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
333
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
334
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
335
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
336
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
337
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
338
+
339
+ header_params = {}
340
+ if request.name
341
+ header_params["name"] = request.name
342
+ end
343
+
344
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
+ metadata[:"x-goog-request-params"] ||= request_params_header
346
+
347
+ options.apply_defaults timeout: @config.rpcs.get_workstation_cluster.timeout,
348
+ metadata: metadata,
349
+ retry_policy: @config.rpcs.get_workstation_cluster.retry_policy
350
+
351
+ options.apply_defaults timeout: @config.timeout,
352
+ metadata: @config.metadata,
353
+ retry_policy: @config.retry_policy
354
+
355
+ @workstations_stub.call_rpc :get_workstation_cluster, request, options: options do |response, operation|
356
+ yield response, operation if block_given?
357
+ return response
358
+ end
359
+ rescue ::GRPC::BadStatus => e
360
+ raise ::Google::Cloud::Error.from_error(e)
361
+ end
362
+
363
+ ##
364
+ # Returns all workstation clusters in the specified location.
365
+ #
366
+ # @overload list_workstation_clusters(request, options = nil)
367
+ # Pass arguments to `list_workstation_clusters` via a request object, either of type
368
+ # {::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
375
+ #
376
+ # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil)
377
+ # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param parent [::String]
382
+ # Required. Parent resource name.
383
+ # @param page_size [::Integer]
384
+ # Optional. Maximum number of items to return.
385
+ # @param page_token [::String]
386
+ # Optional. next_page_token value returned from a previous List request, if
387
+ # any.
388
+ #
389
+ # @yield [response, operation] Access the result along with the RPC operation
390
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>]
391
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
392
+ #
393
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>]
394
+ #
395
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
396
+ #
397
+ # @example Basic example
398
+ # require "google/cloud/workstations/v1beta"
399
+ #
400
+ # # Create a client object. The client can be reused for multiple calls.
401
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
402
+ #
403
+ # # Create a request. To set request fields, pass in keyword arguments.
404
+ # request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new
405
+ #
406
+ # # Call the list_workstation_clusters method.
407
+ # result = client.list_workstation_clusters request
408
+ #
409
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
410
+ # # over elements, and API calls will be issued to fetch pages as needed.
411
+ # result.each do |item|
412
+ # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster.
413
+ # p item
414
+ # end
415
+ #
416
+ def list_workstation_clusters request, options = nil
417
+ raise ::ArgumentError, "request must be provided" if request.nil?
418
+
419
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest
420
+
421
+ # Converts hash and nil to an options object
422
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
423
+
424
+ # Customize the options with defaults
425
+ metadata = @config.rpcs.list_workstation_clusters.metadata.to_h
426
+
427
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
428
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
429
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
430
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
431
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
432
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
433
+
434
+ header_params = {}
435
+ if request.parent
436
+ header_params["parent"] = request.parent
437
+ end
438
+
439
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
440
+ metadata[:"x-goog-request-params"] ||= request_params_header
441
+
442
+ options.apply_defaults timeout: @config.rpcs.list_workstation_clusters.timeout,
443
+ metadata: metadata,
444
+ retry_policy: @config.rpcs.list_workstation_clusters.retry_policy
445
+
446
+ options.apply_defaults timeout: @config.timeout,
447
+ metadata: @config.metadata,
448
+ retry_policy: @config.retry_policy
449
+
450
+ @workstations_stub.call_rpc :list_workstation_clusters, request, options: options do |response, operation|
451
+ response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, request, response, operation, options
452
+ yield response, operation if block_given?
453
+ return response
454
+ end
455
+ rescue ::GRPC::BadStatus => e
456
+ raise ::Google::Cloud::Error.from_error(e)
457
+ end
458
+
459
+ ##
460
+ # Creates a new workstation cluster.
461
+ #
462
+ # @overload create_workstation_cluster(request, options = nil)
463
+ # Pass arguments to `create_workstation_cluster` via a request object, either of type
464
+ # {::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest} or an equivalent Hash.
465
+ #
466
+ # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Hash]
467
+ # A request object representing the call parameters. Required. To specify no
468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
469
+ # @param options [::Gapic::CallOptions, ::Hash]
470
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
471
+ #
472
+ # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil)
473
+ # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at
474
+ # least one keyword argument is required. To specify no parameters, or to keep all
475
+ # the default parameter values, pass an empty Hash as a request object (see above).
476
+ #
477
+ # @param parent [::String]
478
+ # Required. Parent resource name.
479
+ # @param workstation_cluster_id [::String]
480
+ # Required. ID to use for the workstation cluster.
481
+ # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash]
482
+ # Required. Workstation cluster to create.
483
+ # @param validate_only [::Boolean]
484
+ # Optional. If set, validate the request and preview the review, but do not
485
+ # actually apply it.
486
+ #
487
+ # @yield [response, operation] Access the result along with the RPC operation
488
+ # @yieldparam response [::Gapic::Operation]
489
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
490
+ #
491
+ # @return [::Gapic::Operation]
492
+ #
493
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
494
+ #
495
+ # @example Basic example
496
+ # require "google/cloud/workstations/v1beta"
497
+ #
498
+ # # Create a client object. The client can be reused for multiple calls.
499
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
500
+ #
501
+ # # Create a request. To set request fields, pass in keyword arguments.
502
+ # request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new
503
+ #
504
+ # # Call the create_workstation_cluster method.
505
+ # result = client.create_workstation_cluster request
506
+ #
507
+ # # The returned object is of type Gapic::Operation. You can use it to
508
+ # # check the status of an operation, cancel it, or wait for results.
509
+ # # Here is how to wait for a response.
510
+ # result.wait_until_done! timeout: 60
511
+ # if result.response?
512
+ # p result.response
513
+ # else
514
+ # puts "No response received."
515
+ # end
516
+ #
517
+ def create_workstation_cluster request, options = nil
518
+ raise ::ArgumentError, "request must be provided" if request.nil?
519
+
520
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest
521
+
522
+ # Converts hash and nil to an options object
523
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
524
+
525
+ # Customize the options with defaults
526
+ metadata = @config.rpcs.create_workstation_cluster.metadata.to_h
527
+
528
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
529
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
530
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
531
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
532
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
533
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
534
+
535
+ header_params = {}
536
+ if request.parent
537
+ header_params["parent"] = request.parent
538
+ end
539
+
540
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
541
+ metadata[:"x-goog-request-params"] ||= request_params_header
542
+
543
+ options.apply_defaults timeout: @config.rpcs.create_workstation_cluster.timeout,
544
+ metadata: metadata,
545
+ retry_policy: @config.rpcs.create_workstation_cluster.retry_policy
546
+
547
+ options.apply_defaults timeout: @config.timeout,
548
+ metadata: @config.metadata,
549
+ retry_policy: @config.retry_policy
550
+
551
+ @workstations_stub.call_rpc :create_workstation_cluster, request, options: options do |response, operation|
552
+ response = ::Gapic::Operation.new response, @operations_client, options: options
553
+ yield response, operation if block_given?
554
+ return response
555
+ end
556
+ rescue ::GRPC::BadStatus => e
557
+ raise ::Google::Cloud::Error.from_error(e)
558
+ end
559
+
560
+ ##
561
+ # Updates an existing workstation cluster.
562
+ #
563
+ # @overload update_workstation_cluster(request, options = nil)
564
+ # Pass arguments to `update_workstation_cluster` via a request object, either of type
565
+ # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest} or an equivalent Hash.
566
+ #
567
+ # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Hash]
568
+ # A request object representing the call parameters. Required. To specify no
569
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
570
+ # @param options [::Gapic::CallOptions, ::Hash]
571
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
572
+ #
573
+ # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil)
574
+ # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at
575
+ # least one keyword argument is required. To specify no parameters, or to keep all
576
+ # the default parameter values, pass an empty Hash as a request object (see above).
577
+ #
578
+ # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash]
579
+ # Required. Workstation cluster to update.
580
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
581
+ # Required. Mask that specifies which fields in the workstation cluster
582
+ # should be updated.
583
+ # @param validate_only [::Boolean]
584
+ # Optional. If set, validate the request and preview the review, but do not
585
+ # actually apply it.
586
+ # @param allow_missing [::Boolean]
587
+ # Optional. If set, and the workstation cluster is not found, a new
588
+ # workstation cluster will be created. In this situation, update_mask is
589
+ # ignored.
590
+ #
591
+ # @yield [response, operation] Access the result along with the RPC operation
592
+ # @yieldparam response [::Gapic::Operation]
593
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
594
+ #
595
+ # @return [::Gapic::Operation]
596
+ #
597
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
598
+ #
599
+ # @example Basic example
600
+ # require "google/cloud/workstations/v1beta"
601
+ #
602
+ # # Create a client object. The client can be reused for multiple calls.
603
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
604
+ #
605
+ # # Create a request. To set request fields, pass in keyword arguments.
606
+ # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new
607
+ #
608
+ # # Call the update_workstation_cluster method.
609
+ # result = client.update_workstation_cluster request
610
+ #
611
+ # # The returned object is of type Gapic::Operation. You can use it to
612
+ # # check the status of an operation, cancel it, or wait for results.
613
+ # # Here is how to wait for a response.
614
+ # result.wait_until_done! timeout: 60
615
+ # if result.response?
616
+ # p result.response
617
+ # else
618
+ # puts "No response received."
619
+ # end
620
+ #
621
+ def update_workstation_cluster request, options = nil
622
+ raise ::ArgumentError, "request must be provided" if request.nil?
623
+
624
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest
625
+
626
+ # Converts hash and nil to an options object
627
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
628
+
629
+ # Customize the options with defaults
630
+ metadata = @config.rpcs.update_workstation_cluster.metadata.to_h
631
+
632
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
633
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
634
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
635
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
636
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
637
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
638
+
639
+ header_params = {}
640
+ if request.workstation_cluster&.name
641
+ header_params["workstation_cluster.name"] = request.workstation_cluster.name
642
+ end
643
+
644
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
645
+ metadata[:"x-goog-request-params"] ||= request_params_header
646
+
647
+ options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout,
648
+ metadata: metadata,
649
+ retry_policy: @config.rpcs.update_workstation_cluster.retry_policy
650
+
651
+ options.apply_defaults timeout: @config.timeout,
652
+ metadata: @config.metadata,
653
+ retry_policy: @config.retry_policy
654
+
655
+ @workstations_stub.call_rpc :update_workstation_cluster, request, options: options do |response, operation|
656
+ response = ::Gapic::Operation.new response, @operations_client, options: options
657
+ yield response, operation if block_given?
658
+ return response
659
+ end
660
+ rescue ::GRPC::BadStatus => e
661
+ raise ::Google::Cloud::Error.from_error(e)
662
+ end
663
+
664
+ ##
665
+ # Deletes the specified workstation cluster.
666
+ #
667
+ # @overload delete_workstation_cluster(request, options = nil)
668
+ # Pass arguments to `delete_workstation_cluster` via a request object, either of type
669
+ # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest} or an equivalent Hash.
670
+ #
671
+ # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Hash]
672
+ # A request object representing the call parameters. Required. To specify no
673
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
674
+ # @param options [::Gapic::CallOptions, ::Hash]
675
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
676
+ #
677
+ # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil)
678
+ # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at
679
+ # least one keyword argument is required. To specify no parameters, or to keep all
680
+ # the default parameter values, pass an empty Hash as a request object (see above).
681
+ #
682
+ # @param name [::String]
683
+ # Required. Name of the workstation cluster to delete.
684
+ # @param validate_only [::Boolean]
685
+ # Optional. If set, validate the request and preview the review, but do not
686
+ # apply it.
687
+ # @param etag [::String]
688
+ # Optional. If set, the request will be rejected if the latest version of the
689
+ # workstation cluster on the server does not have this ETag.
690
+ # @param force [::Boolean]
691
+ # Optional. If set, any workstation configurations and workstations in the
692
+ # workstation cluster are also deleted. Otherwise, the request only
693
+ # works if the workstation cluster has no configurations or workstations.
694
+ #
695
+ # @yield [response, operation] Access the result along with the RPC operation
696
+ # @yieldparam response [::Gapic::Operation]
697
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
698
+ #
699
+ # @return [::Gapic::Operation]
700
+ #
701
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
702
+ #
703
+ # @example Basic example
704
+ # require "google/cloud/workstations/v1beta"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new
711
+ #
712
+ # # Call the delete_workstation_cluster method.
713
+ # result = client.delete_workstation_cluster request
714
+ #
715
+ # # The returned object is of type Gapic::Operation. You can use it to
716
+ # # check the status of an operation, cancel it, or wait for results.
717
+ # # Here is how to wait for a response.
718
+ # result.wait_until_done! timeout: 60
719
+ # if result.response?
720
+ # p result.response
721
+ # else
722
+ # puts "No response received."
723
+ # end
724
+ #
725
+ def delete_workstation_cluster request, options = nil
726
+ raise ::ArgumentError, "request must be provided" if request.nil?
727
+
728
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest
729
+
730
+ # Converts hash and nil to an options object
731
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
732
+
733
+ # Customize the options with defaults
734
+ metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h
735
+
736
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
737
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
738
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
739
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
740
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
741
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
742
+
743
+ header_params = {}
744
+ if request.name
745
+ header_params["name"] = request.name
746
+ end
747
+
748
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
749
+ metadata[:"x-goog-request-params"] ||= request_params_header
750
+
751
+ options.apply_defaults timeout: @config.rpcs.delete_workstation_cluster.timeout,
752
+ metadata: metadata,
753
+ retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy
754
+
755
+ options.apply_defaults timeout: @config.timeout,
756
+ metadata: @config.metadata,
757
+ retry_policy: @config.retry_policy
758
+
759
+ @workstations_stub.call_rpc :delete_workstation_cluster, request, options: options do |response, operation|
760
+ response = ::Gapic::Operation.new response, @operations_client, options: options
761
+ yield response, operation if block_given?
762
+ return response
763
+ end
764
+ rescue ::GRPC::BadStatus => e
765
+ raise ::Google::Cloud::Error.from_error(e)
766
+ end
767
+
768
+ ##
769
+ # Returns the requested workstation configuration.
770
+ #
771
+ # @overload get_workstation_config(request, options = nil)
772
+ # Pass arguments to `get_workstation_config` via a request object, either of type
773
+ # {::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest} or an equivalent Hash.
774
+ #
775
+ # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Hash]
776
+ # A request object representing the call parameters. Required. To specify no
777
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
778
+ # @param options [::Gapic::CallOptions, ::Hash]
779
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
780
+ #
781
+ # @overload get_workstation_config(name: nil)
782
+ # Pass arguments to `get_workstation_config` via keyword arguments. Note that at
783
+ # least one keyword argument is required. To specify no parameters, or to keep all
784
+ # the default parameter values, pass an empty Hash as a request object (see above).
785
+ #
786
+ # @param name [::String]
787
+ # Required. Name of the requested resource.
788
+ #
789
+ # @yield [response, operation] Access the result along with the RPC operation
790
+ # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationConfig]
791
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
792
+ #
793
+ # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig]
794
+ #
795
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
796
+ #
797
+ # @example Basic example
798
+ # require "google/cloud/workstations/v1beta"
799
+ #
800
+ # # Create a client object. The client can be reused for multiple calls.
801
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
802
+ #
803
+ # # Create a request. To set request fields, pass in keyword arguments.
804
+ # request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new
805
+ #
806
+ # # Call the get_workstation_config method.
807
+ # result = client.get_workstation_config request
808
+ #
809
+ # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig.
810
+ # p result
811
+ #
812
+ def get_workstation_config request, options = nil
813
+ raise ::ArgumentError, "request must be provided" if request.nil?
814
+
815
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest
816
+
817
+ # Converts hash and nil to an options object
818
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
819
+
820
+ # Customize the options with defaults
821
+ metadata = @config.rpcs.get_workstation_config.metadata.to_h
822
+
823
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
824
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
825
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
826
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
827
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
828
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
829
+
830
+ header_params = {}
831
+ if request.name
832
+ header_params["name"] = request.name
833
+ end
834
+
835
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
836
+ metadata[:"x-goog-request-params"] ||= request_params_header
837
+
838
+ options.apply_defaults timeout: @config.rpcs.get_workstation_config.timeout,
839
+ metadata: metadata,
840
+ retry_policy: @config.rpcs.get_workstation_config.retry_policy
841
+
842
+ options.apply_defaults timeout: @config.timeout,
843
+ metadata: @config.metadata,
844
+ retry_policy: @config.retry_policy
845
+
846
+ @workstations_stub.call_rpc :get_workstation_config, request, options: options do |response, operation|
847
+ yield response, operation if block_given?
848
+ return response
849
+ end
850
+ rescue ::GRPC::BadStatus => e
851
+ raise ::Google::Cloud::Error.from_error(e)
852
+ end
853
+
854
+ ##
855
+ # Returns all workstation configurations in the specified cluster.
856
+ #
857
+ # @overload list_workstation_configs(request, options = nil)
858
+ # Pass arguments to `list_workstation_configs` via a request object, either of type
859
+ # {::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest} or an equivalent Hash.
860
+ #
861
+ # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Hash]
862
+ # A request object representing the call parameters. Required. To specify no
863
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
864
+ # @param options [::Gapic::CallOptions, ::Hash]
865
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
866
+ #
867
+ # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil)
868
+ # Pass arguments to `list_workstation_configs` via keyword arguments. Note that at
869
+ # least one keyword argument is required. To specify no parameters, or to keep all
870
+ # the default parameter values, pass an empty Hash as a request object (see above).
871
+ #
872
+ # @param parent [::String]
873
+ # Required. Parent resource name.
874
+ # @param page_size [::Integer]
875
+ # Optional. Maximum number of items to return.
876
+ # @param page_token [::String]
877
+ # Optional. next_page_token value returned from a previous List request, if
878
+ # any.
879
+ #
880
+ # @yield [response, operation] Access the result along with the RPC operation
881
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>]
882
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
883
+ #
884
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>]
885
+ #
886
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
887
+ #
888
+ # @example Basic example
889
+ # require "google/cloud/workstations/v1beta"
890
+ #
891
+ # # Create a client object. The client can be reused for multiple calls.
892
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
893
+ #
894
+ # # Create a request. To set request fields, pass in keyword arguments.
895
+ # request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new
896
+ #
897
+ # # Call the list_workstation_configs method.
898
+ # result = client.list_workstation_configs request
899
+ #
900
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
901
+ # # over elements, and API calls will be issued to fetch pages as needed.
902
+ # result.each do |item|
903
+ # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationConfig.
904
+ # p item
905
+ # end
906
+ #
907
+ def list_workstation_configs request, options = nil
908
+ raise ::ArgumentError, "request must be provided" if request.nil?
909
+
910
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest
911
+
912
+ # Converts hash and nil to an options object
913
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
914
+
915
+ # Customize the options with defaults
916
+ metadata = @config.rpcs.list_workstation_configs.metadata.to_h
917
+
918
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
919
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
920
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
921
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
922
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
923
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
924
+
925
+ header_params = {}
926
+ if request.parent
927
+ header_params["parent"] = request.parent
928
+ end
929
+
930
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
931
+ metadata[:"x-goog-request-params"] ||= request_params_header
932
+
933
+ options.apply_defaults timeout: @config.rpcs.list_workstation_configs.timeout,
934
+ metadata: metadata,
935
+ retry_policy: @config.rpcs.list_workstation_configs.retry_policy
936
+
937
+ options.apply_defaults timeout: @config.timeout,
938
+ metadata: @config.metadata,
939
+ retry_policy: @config.retry_policy
940
+
941
+ @workstations_stub.call_rpc :list_workstation_configs, request, options: options do |response, operation|
942
+ response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_configs, request, response, operation, options
943
+ yield response, operation if block_given?
944
+ return response
945
+ end
946
+ rescue ::GRPC::BadStatus => e
947
+ raise ::Google::Cloud::Error.from_error(e)
948
+ end
949
+
950
+ ##
951
+ # Returns all workstation configurations in the specified cluster on which
952
+ # the caller has the "workstations.workstation.create" permission.
953
+ #
954
+ # @overload list_usable_workstation_configs(request, options = nil)
955
+ # Pass arguments to `list_usable_workstation_configs` via a request object, either of type
956
+ # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest} or an equivalent Hash.
957
+ #
958
+ # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Hash]
959
+ # A request object representing the call parameters. Required. To specify no
960
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
961
+ # @param options [::Gapic::CallOptions, ::Hash]
962
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
963
+ #
964
+ # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil)
965
+ # Pass arguments to `list_usable_workstation_configs` via keyword arguments. Note that at
966
+ # least one keyword argument is required. To specify no parameters, or to keep all
967
+ # the default parameter values, pass an empty Hash as a request object (see above).
968
+ #
969
+ # @param parent [::String]
970
+ # Required. Parent resource name.
971
+ # @param page_size [::Integer]
972
+ # Optional. Maximum number of items to return.
973
+ # @param page_token [::String]
974
+ # Optional. next_page_token value returned from a previous List request, if
975
+ # any.
976
+ #
977
+ # @yield [response, operation] Access the result along with the RPC operation
978
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>]
979
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
980
+ #
981
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>]
982
+ #
983
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
984
+ #
985
+ # @example Basic example
986
+ # require "google/cloud/workstations/v1beta"
987
+ #
988
+ # # Create a client object. The client can be reused for multiple calls.
989
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
990
+ #
991
+ # # Create a request. To set request fields, pass in keyword arguments.
992
+ # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new
993
+ #
994
+ # # Call the list_usable_workstation_configs method.
995
+ # result = client.list_usable_workstation_configs request
996
+ #
997
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
998
+ # # over elements, and API calls will be issued to fetch pages as needed.
999
+ # result.each do |item|
1000
+ # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationConfig.
1001
+ # p item
1002
+ # end
1003
+ #
1004
+ def list_usable_workstation_configs request, options = nil
1005
+ raise ::ArgumentError, "request must be provided" if request.nil?
1006
+
1007
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest
1008
+
1009
+ # Converts hash and nil to an options object
1010
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1011
+
1012
+ # Customize the options with defaults
1013
+ metadata = @config.rpcs.list_usable_workstation_configs.metadata.to_h
1014
+
1015
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1016
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1017
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1018
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1019
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1020
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1021
+
1022
+ header_params = {}
1023
+ if request.parent
1024
+ header_params["parent"] = request.parent
1025
+ end
1026
+
1027
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1028
+ metadata[:"x-goog-request-params"] ||= request_params_header
1029
+
1030
+ options.apply_defaults timeout: @config.rpcs.list_usable_workstation_configs.timeout,
1031
+ metadata: metadata,
1032
+ retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy
1033
+
1034
+ options.apply_defaults timeout: @config.timeout,
1035
+ metadata: @config.metadata,
1036
+ retry_policy: @config.retry_policy
1037
+
1038
+ @workstations_stub.call_rpc :list_usable_workstation_configs, request, options: options do |response, operation|
1039
+ response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstation_configs, request, response, operation, options
1040
+ yield response, operation if block_given?
1041
+ return response
1042
+ end
1043
+ rescue ::GRPC::BadStatus => e
1044
+ raise ::Google::Cloud::Error.from_error(e)
1045
+ end
1046
+
1047
+ ##
1048
+ # Creates a new workstation configuration.
1049
+ #
1050
+ # @overload create_workstation_config(request, options = nil)
1051
+ # Pass arguments to `create_workstation_config` via a request object, either of type
1052
+ # {::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest} or an equivalent Hash.
1053
+ #
1054
+ # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Hash]
1055
+ # A request object representing the call parameters. Required. To specify no
1056
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1057
+ # @param options [::Gapic::CallOptions, ::Hash]
1058
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1059
+ #
1060
+ # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil)
1061
+ # Pass arguments to `create_workstation_config` via keyword arguments. Note that at
1062
+ # least one keyword argument is required. To specify no parameters, or to keep all
1063
+ # the default parameter values, pass an empty Hash as a request object (see above).
1064
+ #
1065
+ # @param parent [::String]
1066
+ # Required. Parent resource name.
1067
+ # @param workstation_config_id [::String]
1068
+ # Required. ID to use for the workstation configuration.
1069
+ # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash]
1070
+ # Required. Config to create.
1071
+ # @param validate_only [::Boolean]
1072
+ # Optional. If set, validate the request and preview the review, but do not
1073
+ # actually apply it.
1074
+ #
1075
+ # @yield [response, operation] Access the result along with the RPC operation
1076
+ # @yieldparam response [::Gapic::Operation]
1077
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1078
+ #
1079
+ # @return [::Gapic::Operation]
1080
+ #
1081
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1082
+ #
1083
+ # @example Basic example
1084
+ # require "google/cloud/workstations/v1beta"
1085
+ #
1086
+ # # Create a client object. The client can be reused for multiple calls.
1087
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1088
+ #
1089
+ # # Create a request. To set request fields, pass in keyword arguments.
1090
+ # request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new
1091
+ #
1092
+ # # Call the create_workstation_config method.
1093
+ # result = client.create_workstation_config request
1094
+ #
1095
+ # # The returned object is of type Gapic::Operation. You can use it to
1096
+ # # check the status of an operation, cancel it, or wait for results.
1097
+ # # Here is how to wait for a response.
1098
+ # result.wait_until_done! timeout: 60
1099
+ # if result.response?
1100
+ # p result.response
1101
+ # else
1102
+ # puts "No response received."
1103
+ # end
1104
+ #
1105
+ def create_workstation_config request, options = nil
1106
+ raise ::ArgumentError, "request must be provided" if request.nil?
1107
+
1108
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest
1109
+
1110
+ # Converts hash and nil to an options object
1111
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1112
+
1113
+ # Customize the options with defaults
1114
+ metadata = @config.rpcs.create_workstation_config.metadata.to_h
1115
+
1116
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1117
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1118
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1119
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1120
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1121
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1122
+
1123
+ header_params = {}
1124
+ if request.parent
1125
+ header_params["parent"] = request.parent
1126
+ end
1127
+
1128
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1129
+ metadata[:"x-goog-request-params"] ||= request_params_header
1130
+
1131
+ options.apply_defaults timeout: @config.rpcs.create_workstation_config.timeout,
1132
+ metadata: metadata,
1133
+ retry_policy: @config.rpcs.create_workstation_config.retry_policy
1134
+
1135
+ options.apply_defaults timeout: @config.timeout,
1136
+ metadata: @config.metadata,
1137
+ retry_policy: @config.retry_policy
1138
+
1139
+ @workstations_stub.call_rpc :create_workstation_config, request, options: options do |response, operation|
1140
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1141
+ yield response, operation if block_given?
1142
+ return response
1143
+ end
1144
+ rescue ::GRPC::BadStatus => e
1145
+ raise ::Google::Cloud::Error.from_error(e)
1146
+ end
1147
+
1148
+ ##
1149
+ # Updates an existing workstation configuration.
1150
+ #
1151
+ # @overload update_workstation_config(request, options = nil)
1152
+ # Pass arguments to `update_workstation_config` via a request object, either of type
1153
+ # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest} or an equivalent Hash.
1154
+ #
1155
+ # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Hash]
1156
+ # A request object representing the call parameters. Required. To specify no
1157
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1158
+ # @param options [::Gapic::CallOptions, ::Hash]
1159
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1160
+ #
1161
+ # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil)
1162
+ # Pass arguments to `update_workstation_config` via keyword arguments. Note that at
1163
+ # least one keyword argument is required. To specify no parameters, or to keep all
1164
+ # the default parameter values, pass an empty Hash as a request object (see above).
1165
+ #
1166
+ # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash]
1167
+ # Required. Config to update.
1168
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1169
+ # Required. Mask specifying which fields in the workstation configuration
1170
+ # should be updated.
1171
+ # @param validate_only [::Boolean]
1172
+ # Optional. If set, validate the request and preview the review, but do not
1173
+ # actually apply it.
1174
+ # @param allow_missing [::Boolean]
1175
+ # Optional. If set and the workstation configuration is not found, a new
1176
+ # workstation configuration will be created. In this situation,
1177
+ # update_mask is ignored.
1178
+ #
1179
+ # @yield [response, operation] Access the result along with the RPC operation
1180
+ # @yieldparam response [::Gapic::Operation]
1181
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1182
+ #
1183
+ # @return [::Gapic::Operation]
1184
+ #
1185
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1186
+ #
1187
+ # @example Basic example
1188
+ # require "google/cloud/workstations/v1beta"
1189
+ #
1190
+ # # Create a client object. The client can be reused for multiple calls.
1191
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1192
+ #
1193
+ # # Create a request. To set request fields, pass in keyword arguments.
1194
+ # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new
1195
+ #
1196
+ # # Call the update_workstation_config method.
1197
+ # result = client.update_workstation_config request
1198
+ #
1199
+ # # The returned object is of type Gapic::Operation. You can use it to
1200
+ # # check the status of an operation, cancel it, or wait for results.
1201
+ # # Here is how to wait for a response.
1202
+ # result.wait_until_done! timeout: 60
1203
+ # if result.response?
1204
+ # p result.response
1205
+ # else
1206
+ # puts "No response received."
1207
+ # end
1208
+ #
1209
+ def update_workstation_config request, options = nil
1210
+ raise ::ArgumentError, "request must be provided" if request.nil?
1211
+
1212
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest
1213
+
1214
+ # Converts hash and nil to an options object
1215
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1216
+
1217
+ # Customize the options with defaults
1218
+ metadata = @config.rpcs.update_workstation_config.metadata.to_h
1219
+
1220
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1221
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1222
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1223
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1224
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1225
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1226
+
1227
+ header_params = {}
1228
+ if request.workstation_config&.name
1229
+ header_params["workstation_config.name"] = request.workstation_config.name
1230
+ end
1231
+
1232
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1233
+ metadata[:"x-goog-request-params"] ||= request_params_header
1234
+
1235
+ options.apply_defaults timeout: @config.rpcs.update_workstation_config.timeout,
1236
+ metadata: metadata,
1237
+ retry_policy: @config.rpcs.update_workstation_config.retry_policy
1238
+
1239
+ options.apply_defaults timeout: @config.timeout,
1240
+ metadata: @config.metadata,
1241
+ retry_policy: @config.retry_policy
1242
+
1243
+ @workstations_stub.call_rpc :update_workstation_config, request, options: options do |response, operation|
1244
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1245
+ yield response, operation if block_given?
1246
+ return response
1247
+ end
1248
+ rescue ::GRPC::BadStatus => e
1249
+ raise ::Google::Cloud::Error.from_error(e)
1250
+ end
1251
+
1252
+ ##
1253
+ # Deletes the specified workstation configuration.
1254
+ #
1255
+ # @overload delete_workstation_config(request, options = nil)
1256
+ # Pass arguments to `delete_workstation_config` via a request object, either of type
1257
+ # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest} or an equivalent Hash.
1258
+ #
1259
+ # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Hash]
1260
+ # A request object representing the call parameters. Required. To specify no
1261
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1262
+ # @param options [::Gapic::CallOptions, ::Hash]
1263
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1264
+ #
1265
+ # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil)
1266
+ # Pass arguments to `delete_workstation_config` via keyword arguments. Note that at
1267
+ # least one keyword argument is required. To specify no parameters, or to keep all
1268
+ # the default parameter values, pass an empty Hash as a request object (see above).
1269
+ #
1270
+ # @param name [::String]
1271
+ # Required. Name of the workstation configuration to delete.
1272
+ # @param validate_only [::Boolean]
1273
+ # Optional. If set, validate the request and preview the review, but do not
1274
+ # actually apply it.
1275
+ # @param etag [::String]
1276
+ # Optional. If set, the request is rejected if the latest version of the
1277
+ # workstation configuration on the server does not have this ETag.
1278
+ # @param force [::Boolean]
1279
+ # Optional. If set, any workstations in the workstation configuration are
1280
+ # also deleted. Otherwise, the request works only if the workstation
1281
+ # configuration has no workstations.
1282
+ #
1283
+ # @yield [response, operation] Access the result along with the RPC operation
1284
+ # @yieldparam response [::Gapic::Operation]
1285
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1286
+ #
1287
+ # @return [::Gapic::Operation]
1288
+ #
1289
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1290
+ #
1291
+ # @example Basic example
1292
+ # require "google/cloud/workstations/v1beta"
1293
+ #
1294
+ # # Create a client object. The client can be reused for multiple calls.
1295
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1296
+ #
1297
+ # # Create a request. To set request fields, pass in keyword arguments.
1298
+ # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new
1299
+ #
1300
+ # # Call the delete_workstation_config method.
1301
+ # result = client.delete_workstation_config request
1302
+ #
1303
+ # # The returned object is of type Gapic::Operation. You can use it to
1304
+ # # check the status of an operation, cancel it, or wait for results.
1305
+ # # Here is how to wait for a response.
1306
+ # result.wait_until_done! timeout: 60
1307
+ # if result.response?
1308
+ # p result.response
1309
+ # else
1310
+ # puts "No response received."
1311
+ # end
1312
+ #
1313
+ def delete_workstation_config request, options = nil
1314
+ raise ::ArgumentError, "request must be provided" if request.nil?
1315
+
1316
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest
1317
+
1318
+ # Converts hash and nil to an options object
1319
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1320
+
1321
+ # Customize the options with defaults
1322
+ metadata = @config.rpcs.delete_workstation_config.metadata.to_h
1323
+
1324
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1325
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1326
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1327
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1328
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1329
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1330
+
1331
+ header_params = {}
1332
+ if request.name
1333
+ header_params["name"] = request.name
1334
+ end
1335
+
1336
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1337
+ metadata[:"x-goog-request-params"] ||= request_params_header
1338
+
1339
+ options.apply_defaults timeout: @config.rpcs.delete_workstation_config.timeout,
1340
+ metadata: metadata,
1341
+ retry_policy: @config.rpcs.delete_workstation_config.retry_policy
1342
+
1343
+ options.apply_defaults timeout: @config.timeout,
1344
+ metadata: @config.metadata,
1345
+ retry_policy: @config.retry_policy
1346
+
1347
+ @workstations_stub.call_rpc :delete_workstation_config, request, options: options do |response, operation|
1348
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1349
+ yield response, operation if block_given?
1350
+ return response
1351
+ end
1352
+ rescue ::GRPC::BadStatus => e
1353
+ raise ::Google::Cloud::Error.from_error(e)
1354
+ end
1355
+
1356
+ ##
1357
+ # Returns the requested workstation.
1358
+ #
1359
+ # @overload get_workstation(request, options = nil)
1360
+ # Pass arguments to `get_workstation` via a request object, either of type
1361
+ # {::Google::Cloud::Workstations::V1beta::GetWorkstationRequest} or an equivalent Hash.
1362
+ #
1363
+ # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Hash]
1364
+ # A request object representing the call parameters. Required. To specify no
1365
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1366
+ # @param options [::Gapic::CallOptions, ::Hash]
1367
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1368
+ #
1369
+ # @overload get_workstation(name: nil)
1370
+ # Pass arguments to `get_workstation` via keyword arguments. Note that at
1371
+ # least one keyword argument is required. To specify no parameters, or to keep all
1372
+ # the default parameter values, pass an empty Hash as a request object (see above).
1373
+ #
1374
+ # @param name [::String]
1375
+ # Required. Name of the requested resource.
1376
+ #
1377
+ # @yield [response, operation] Access the result along with the RPC operation
1378
+ # @yieldparam response [::Google::Cloud::Workstations::V1beta::Workstation]
1379
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1380
+ #
1381
+ # @return [::Google::Cloud::Workstations::V1beta::Workstation]
1382
+ #
1383
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1384
+ #
1385
+ # @example Basic example
1386
+ # require "google/cloud/workstations/v1beta"
1387
+ #
1388
+ # # Create a client object. The client can be reused for multiple calls.
1389
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1390
+ #
1391
+ # # Create a request. To set request fields, pass in keyword arguments.
1392
+ # request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new
1393
+ #
1394
+ # # Call the get_workstation method.
1395
+ # result = client.get_workstation request
1396
+ #
1397
+ # # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation.
1398
+ # p result
1399
+ #
1400
+ def get_workstation request, options = nil
1401
+ raise ::ArgumentError, "request must be provided" if request.nil?
1402
+
1403
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest
1404
+
1405
+ # Converts hash and nil to an options object
1406
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1407
+
1408
+ # Customize the options with defaults
1409
+ metadata = @config.rpcs.get_workstation.metadata.to_h
1410
+
1411
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1412
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1413
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1414
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1415
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1416
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1417
+
1418
+ header_params = {}
1419
+ if request.name
1420
+ header_params["name"] = request.name
1421
+ end
1422
+
1423
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1424
+ metadata[:"x-goog-request-params"] ||= request_params_header
1425
+
1426
+ options.apply_defaults timeout: @config.rpcs.get_workstation.timeout,
1427
+ metadata: metadata,
1428
+ retry_policy: @config.rpcs.get_workstation.retry_policy
1429
+
1430
+ options.apply_defaults timeout: @config.timeout,
1431
+ metadata: @config.metadata,
1432
+ retry_policy: @config.retry_policy
1433
+
1434
+ @workstations_stub.call_rpc :get_workstation, request, options: options do |response, operation|
1435
+ yield response, operation if block_given?
1436
+ return response
1437
+ end
1438
+ rescue ::GRPC::BadStatus => e
1439
+ raise ::Google::Cloud::Error.from_error(e)
1440
+ end
1441
+
1442
+ ##
1443
+ # Returns all Workstations using the specified workstation configuration.
1444
+ #
1445
+ # @overload list_workstations(request, options = nil)
1446
+ # Pass arguments to `list_workstations` via a request object, either of type
1447
+ # {::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest} or an equivalent Hash.
1448
+ #
1449
+ # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Hash]
1450
+ # A request object representing the call parameters. Required. To specify no
1451
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1452
+ # @param options [::Gapic::CallOptions, ::Hash]
1453
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1454
+ #
1455
+ # @overload list_workstations(parent: nil, page_size: nil, page_token: nil)
1456
+ # Pass arguments to `list_workstations` via keyword arguments. Note that at
1457
+ # least one keyword argument is required. To specify no parameters, or to keep all
1458
+ # the default parameter values, pass an empty Hash as a request object (see above).
1459
+ #
1460
+ # @param parent [::String]
1461
+ # Required. Parent resource name.
1462
+ # @param page_size [::Integer]
1463
+ # Optional. Maximum number of items to return.
1464
+ # @param page_token [::String]
1465
+ # Optional. next_page_token value returned from a previous List request, if
1466
+ # any.
1467
+ #
1468
+ # @yield [response, operation] Access the result along with the RPC operation
1469
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>]
1470
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1471
+ #
1472
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>]
1473
+ #
1474
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1475
+ #
1476
+ # @example Basic example
1477
+ # require "google/cloud/workstations/v1beta"
1478
+ #
1479
+ # # Create a client object. The client can be reused for multiple calls.
1480
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1481
+ #
1482
+ # # Create a request. To set request fields, pass in keyword arguments.
1483
+ # request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new
1484
+ #
1485
+ # # Call the list_workstations method.
1486
+ # result = client.list_workstations request
1487
+ #
1488
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1489
+ # # over elements, and API calls will be issued to fetch pages as needed.
1490
+ # result.each do |item|
1491
+ # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation.
1492
+ # p item
1493
+ # end
1494
+ #
1495
+ def list_workstations request, options = nil
1496
+ raise ::ArgumentError, "request must be provided" if request.nil?
1497
+
1498
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest
1499
+
1500
+ # Converts hash and nil to an options object
1501
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1502
+
1503
+ # Customize the options with defaults
1504
+ metadata = @config.rpcs.list_workstations.metadata.to_h
1505
+
1506
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1507
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1508
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1509
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1510
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1511
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1512
+
1513
+ header_params = {}
1514
+ if request.parent
1515
+ header_params["parent"] = request.parent
1516
+ end
1517
+
1518
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1519
+ metadata[:"x-goog-request-params"] ||= request_params_header
1520
+
1521
+ options.apply_defaults timeout: @config.rpcs.list_workstations.timeout,
1522
+ metadata: metadata,
1523
+ retry_policy: @config.rpcs.list_workstations.retry_policy
1524
+
1525
+ options.apply_defaults timeout: @config.timeout,
1526
+ metadata: @config.metadata,
1527
+ retry_policy: @config.retry_policy
1528
+
1529
+ @workstations_stub.call_rpc :list_workstations, request, options: options do |response, operation|
1530
+ response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstations, request, response, operation, options
1531
+ yield response, operation if block_given?
1532
+ return response
1533
+ end
1534
+ rescue ::GRPC::BadStatus => e
1535
+ raise ::Google::Cloud::Error.from_error(e)
1536
+ end
1537
+
1538
+ ##
1539
+ # Returns all workstations using the specified workstation configuration
1540
+ # on which the caller has the "workstations.workstations.use" permission.
1541
+ #
1542
+ # @overload list_usable_workstations(request, options = nil)
1543
+ # Pass arguments to `list_usable_workstations` via a request object, either of type
1544
+ # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest} or an equivalent Hash.
1545
+ #
1546
+ # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Hash]
1547
+ # A request object representing the call parameters. Required. To specify no
1548
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1549
+ # @param options [::Gapic::CallOptions, ::Hash]
1550
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1551
+ #
1552
+ # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil)
1553
+ # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at
1554
+ # least one keyword argument is required. To specify no parameters, or to keep all
1555
+ # the default parameter values, pass an empty Hash as a request object (see above).
1556
+ #
1557
+ # @param parent [::String]
1558
+ # Required. Parent resource name.
1559
+ # @param page_size [::Integer]
1560
+ # Optional. Maximum number of items to return.
1561
+ # @param page_token [::String]
1562
+ # Optional. next_page_token value returned from a previous List request, if
1563
+ # any.
1564
+ #
1565
+ # @yield [response, operation] Access the result along with the RPC operation
1566
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>]
1567
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1568
+ #
1569
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>]
1570
+ #
1571
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1572
+ #
1573
+ # @example Basic example
1574
+ # require "google/cloud/workstations/v1beta"
1575
+ #
1576
+ # # Create a client object. The client can be reused for multiple calls.
1577
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1578
+ #
1579
+ # # Create a request. To set request fields, pass in keyword arguments.
1580
+ # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new
1581
+ #
1582
+ # # Call the list_usable_workstations method.
1583
+ # result = client.list_usable_workstations request
1584
+ #
1585
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1586
+ # # over elements, and API calls will be issued to fetch pages as needed.
1587
+ # result.each do |item|
1588
+ # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation.
1589
+ # p item
1590
+ # end
1591
+ #
1592
+ def list_usable_workstations request, options = nil
1593
+ raise ::ArgumentError, "request must be provided" if request.nil?
1594
+
1595
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest
1596
+
1597
+ # Converts hash and nil to an options object
1598
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1599
+
1600
+ # Customize the options with defaults
1601
+ metadata = @config.rpcs.list_usable_workstations.metadata.to_h
1602
+
1603
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1604
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1605
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1606
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1607
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1608
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1609
+
1610
+ header_params = {}
1611
+ if request.parent
1612
+ header_params["parent"] = request.parent
1613
+ end
1614
+
1615
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1616
+ metadata[:"x-goog-request-params"] ||= request_params_header
1617
+
1618
+ options.apply_defaults timeout: @config.rpcs.list_usable_workstations.timeout,
1619
+ metadata: metadata,
1620
+ retry_policy: @config.rpcs.list_usable_workstations.retry_policy
1621
+
1622
+ options.apply_defaults timeout: @config.timeout,
1623
+ metadata: @config.metadata,
1624
+ retry_policy: @config.retry_policy
1625
+
1626
+ @workstations_stub.call_rpc :list_usable_workstations, request, options: options do |response, operation|
1627
+ response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstations, request, response, operation, options
1628
+ yield response, operation if block_given?
1629
+ return response
1630
+ end
1631
+ rescue ::GRPC::BadStatus => e
1632
+ raise ::Google::Cloud::Error.from_error(e)
1633
+ end
1634
+
1635
+ ##
1636
+ # Creates a new workstation.
1637
+ #
1638
+ # @overload create_workstation(request, options = nil)
1639
+ # Pass arguments to `create_workstation` via a request object, either of type
1640
+ # {::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest} or an equivalent Hash.
1641
+ #
1642
+ # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Hash]
1643
+ # A request object representing the call parameters. Required. To specify no
1644
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1645
+ # @param options [::Gapic::CallOptions, ::Hash]
1646
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1647
+ #
1648
+ # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil)
1649
+ # Pass arguments to `create_workstation` via keyword arguments. Note that at
1650
+ # least one keyword argument is required. To specify no parameters, or to keep all
1651
+ # the default parameter values, pass an empty Hash as a request object (see above).
1652
+ #
1653
+ # @param parent [::String]
1654
+ # Required. Parent resource name.
1655
+ # @param workstation_id [::String]
1656
+ # Required. ID to use for the workstation.
1657
+ # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash]
1658
+ # Required. Workstation to create.
1659
+ # @param validate_only [::Boolean]
1660
+ # Optional. If set, validate the request and preview the review, but do not
1661
+ # actually apply it.
1662
+ #
1663
+ # @yield [response, operation] Access the result along with the RPC operation
1664
+ # @yieldparam response [::Gapic::Operation]
1665
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1666
+ #
1667
+ # @return [::Gapic::Operation]
1668
+ #
1669
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1670
+ #
1671
+ # @example Basic example
1672
+ # require "google/cloud/workstations/v1beta"
1673
+ #
1674
+ # # Create a client object. The client can be reused for multiple calls.
1675
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1676
+ #
1677
+ # # Create a request. To set request fields, pass in keyword arguments.
1678
+ # request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new
1679
+ #
1680
+ # # Call the create_workstation method.
1681
+ # result = client.create_workstation request
1682
+ #
1683
+ # # The returned object is of type Gapic::Operation. You can use it to
1684
+ # # check the status of an operation, cancel it, or wait for results.
1685
+ # # Here is how to wait for a response.
1686
+ # result.wait_until_done! timeout: 60
1687
+ # if result.response?
1688
+ # p result.response
1689
+ # else
1690
+ # puts "No response received."
1691
+ # end
1692
+ #
1693
+ def create_workstation request, options = nil
1694
+ raise ::ArgumentError, "request must be provided" if request.nil?
1695
+
1696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest
1697
+
1698
+ # Converts hash and nil to an options object
1699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1700
+
1701
+ # Customize the options with defaults
1702
+ metadata = @config.rpcs.create_workstation.metadata.to_h
1703
+
1704
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1705
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1707
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1708
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1709
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1710
+
1711
+ header_params = {}
1712
+ if request.parent
1713
+ header_params["parent"] = request.parent
1714
+ end
1715
+
1716
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1717
+ metadata[:"x-goog-request-params"] ||= request_params_header
1718
+
1719
+ options.apply_defaults timeout: @config.rpcs.create_workstation.timeout,
1720
+ metadata: metadata,
1721
+ retry_policy: @config.rpcs.create_workstation.retry_policy
1722
+
1723
+ options.apply_defaults timeout: @config.timeout,
1724
+ metadata: @config.metadata,
1725
+ retry_policy: @config.retry_policy
1726
+
1727
+ @workstations_stub.call_rpc :create_workstation, request, options: options do |response, operation|
1728
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1729
+ yield response, operation if block_given?
1730
+ return response
1731
+ end
1732
+ rescue ::GRPC::BadStatus => e
1733
+ raise ::Google::Cloud::Error.from_error(e)
1734
+ end
1735
+
1736
+ ##
1737
+ # Updates an existing workstation.
1738
+ #
1739
+ # @overload update_workstation(request, options = nil)
1740
+ # Pass arguments to `update_workstation` via a request object, either of type
1741
+ # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest} or an equivalent Hash.
1742
+ #
1743
+ # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Hash]
1744
+ # A request object representing the call parameters. Required. To specify no
1745
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1746
+ # @param options [::Gapic::CallOptions, ::Hash]
1747
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1748
+ #
1749
+ # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil)
1750
+ # Pass arguments to `update_workstation` via keyword arguments. Note that at
1751
+ # least one keyword argument is required. To specify no parameters, or to keep all
1752
+ # the default parameter values, pass an empty Hash as a request object (see above).
1753
+ #
1754
+ # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash]
1755
+ # Required. Workstation to update.
1756
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1757
+ # Required. Mask specifying which fields in the workstation configuration
1758
+ # should be updated.
1759
+ # @param validate_only [::Boolean]
1760
+ # Optional. If set, validate the request and preview the review, but do not
1761
+ # actually apply it.
1762
+ # @param allow_missing [::Boolean]
1763
+ # Optional. If set and the workstation configuration is not found, a new
1764
+ # workstation configuration is created. In this situation, update_mask
1765
+ # is ignored.
1766
+ #
1767
+ # @yield [response, operation] Access the result along with the RPC operation
1768
+ # @yieldparam response [::Gapic::Operation]
1769
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1770
+ #
1771
+ # @return [::Gapic::Operation]
1772
+ #
1773
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1774
+ #
1775
+ # @example Basic example
1776
+ # require "google/cloud/workstations/v1beta"
1777
+ #
1778
+ # # Create a client object. The client can be reused for multiple calls.
1779
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1780
+ #
1781
+ # # Create a request. To set request fields, pass in keyword arguments.
1782
+ # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new
1783
+ #
1784
+ # # Call the update_workstation method.
1785
+ # result = client.update_workstation request
1786
+ #
1787
+ # # The returned object is of type Gapic::Operation. You can use it to
1788
+ # # check the status of an operation, cancel it, or wait for results.
1789
+ # # Here is how to wait for a response.
1790
+ # result.wait_until_done! timeout: 60
1791
+ # if result.response?
1792
+ # p result.response
1793
+ # else
1794
+ # puts "No response received."
1795
+ # end
1796
+ #
1797
+ def update_workstation request, options = nil
1798
+ raise ::ArgumentError, "request must be provided" if request.nil?
1799
+
1800
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest
1801
+
1802
+ # Converts hash and nil to an options object
1803
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1804
+
1805
+ # Customize the options with defaults
1806
+ metadata = @config.rpcs.update_workstation.metadata.to_h
1807
+
1808
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1809
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1810
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1811
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1812
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1813
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1814
+
1815
+ header_params = {}
1816
+ if request.workstation&.name
1817
+ header_params["workstation.name"] = request.workstation.name
1818
+ end
1819
+
1820
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1821
+ metadata[:"x-goog-request-params"] ||= request_params_header
1822
+
1823
+ options.apply_defaults timeout: @config.rpcs.update_workstation.timeout,
1824
+ metadata: metadata,
1825
+ retry_policy: @config.rpcs.update_workstation.retry_policy
1826
+
1827
+ options.apply_defaults timeout: @config.timeout,
1828
+ metadata: @config.metadata,
1829
+ retry_policy: @config.retry_policy
1830
+
1831
+ @workstations_stub.call_rpc :update_workstation, request, options: options do |response, operation|
1832
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1833
+ yield response, operation if block_given?
1834
+ return response
1835
+ end
1836
+ rescue ::GRPC::BadStatus => e
1837
+ raise ::Google::Cloud::Error.from_error(e)
1838
+ end
1839
+
1840
+ ##
1841
+ # Deletes the specified workstation.
1842
+ #
1843
+ # @overload delete_workstation(request, options = nil)
1844
+ # Pass arguments to `delete_workstation` via a request object, either of type
1845
+ # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest} or an equivalent Hash.
1846
+ #
1847
+ # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Hash]
1848
+ # A request object representing the call parameters. Required. To specify no
1849
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1850
+ # @param options [::Gapic::CallOptions, ::Hash]
1851
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1852
+ #
1853
+ # @overload delete_workstation(name: nil, validate_only: nil, etag: nil)
1854
+ # Pass arguments to `delete_workstation` via keyword arguments. Note that at
1855
+ # least one keyword argument is required. To specify no parameters, or to keep all
1856
+ # the default parameter values, pass an empty Hash as a request object (see above).
1857
+ #
1858
+ # @param name [::String]
1859
+ # Required. Name of the workstation to delete.
1860
+ # @param validate_only [::Boolean]
1861
+ # Optional. If set, validate the request and preview the review, but do not
1862
+ # actually apply it.
1863
+ # @param etag [::String]
1864
+ # Optional. If set, the request will be rejected if the latest version of the
1865
+ # workstation on the server does not have this ETag.
1866
+ #
1867
+ # @yield [response, operation] Access the result along with the RPC operation
1868
+ # @yieldparam response [::Gapic::Operation]
1869
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1870
+ #
1871
+ # @return [::Gapic::Operation]
1872
+ #
1873
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1874
+ #
1875
+ # @example Basic example
1876
+ # require "google/cloud/workstations/v1beta"
1877
+ #
1878
+ # # Create a client object. The client can be reused for multiple calls.
1879
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1880
+ #
1881
+ # # Create a request. To set request fields, pass in keyword arguments.
1882
+ # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new
1883
+ #
1884
+ # # Call the delete_workstation method.
1885
+ # result = client.delete_workstation request
1886
+ #
1887
+ # # The returned object is of type Gapic::Operation. You can use it to
1888
+ # # check the status of an operation, cancel it, or wait for results.
1889
+ # # Here is how to wait for a response.
1890
+ # result.wait_until_done! timeout: 60
1891
+ # if result.response?
1892
+ # p result.response
1893
+ # else
1894
+ # puts "No response received."
1895
+ # end
1896
+ #
1897
+ def delete_workstation request, options = nil
1898
+ raise ::ArgumentError, "request must be provided" if request.nil?
1899
+
1900
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest
1901
+
1902
+ # Converts hash and nil to an options object
1903
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1904
+
1905
+ # Customize the options with defaults
1906
+ metadata = @config.rpcs.delete_workstation.metadata.to_h
1907
+
1908
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1909
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1910
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1911
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
1912
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1913
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1914
+
1915
+ header_params = {}
1916
+ if request.name
1917
+ header_params["name"] = request.name
1918
+ end
1919
+
1920
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1921
+ metadata[:"x-goog-request-params"] ||= request_params_header
1922
+
1923
+ options.apply_defaults timeout: @config.rpcs.delete_workstation.timeout,
1924
+ metadata: metadata,
1925
+ retry_policy: @config.rpcs.delete_workstation.retry_policy
1926
+
1927
+ options.apply_defaults timeout: @config.timeout,
1928
+ metadata: @config.metadata,
1929
+ retry_policy: @config.retry_policy
1930
+
1931
+ @workstations_stub.call_rpc :delete_workstation, request, options: options do |response, operation|
1932
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1933
+ yield response, operation if block_given?
1934
+ return response
1935
+ end
1936
+ rescue ::GRPC::BadStatus => e
1937
+ raise ::Google::Cloud::Error.from_error(e)
1938
+ end
1939
+
1940
+ ##
1941
+ # Starts running a workstation so that users can connect to it.
1942
+ #
1943
+ # @overload start_workstation(request, options = nil)
1944
+ # Pass arguments to `start_workstation` via a request object, either of type
1945
+ # {::Google::Cloud::Workstations::V1beta::StartWorkstationRequest} or an equivalent Hash.
1946
+ #
1947
+ # @param request [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Hash]
1948
+ # A request object representing the call parameters. Required. To specify no
1949
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1950
+ # @param options [::Gapic::CallOptions, ::Hash]
1951
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1952
+ #
1953
+ # @overload start_workstation(name: nil, validate_only: nil, etag: nil)
1954
+ # Pass arguments to `start_workstation` via keyword arguments. Note that at
1955
+ # least one keyword argument is required. To specify no parameters, or to keep all
1956
+ # the default parameter values, pass an empty Hash as a request object (see above).
1957
+ #
1958
+ # @param name [::String]
1959
+ # Required. Name of the workstation to start.
1960
+ # @param validate_only [::Boolean]
1961
+ # Optional. If set, validate the request and preview the review, but do not
1962
+ # actually apply it.
1963
+ # @param etag [::String]
1964
+ # Optional. If set, the request will be rejected if the latest version of the
1965
+ # workstation on the server does not have this ETag.
1966
+ #
1967
+ # @yield [response, operation] Access the result along with the RPC operation
1968
+ # @yieldparam response [::Gapic::Operation]
1969
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1970
+ #
1971
+ # @return [::Gapic::Operation]
1972
+ #
1973
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1974
+ #
1975
+ # @example Basic example
1976
+ # require "google/cloud/workstations/v1beta"
1977
+ #
1978
+ # # Create a client object. The client can be reused for multiple calls.
1979
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
1980
+ #
1981
+ # # Create a request. To set request fields, pass in keyword arguments.
1982
+ # request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new
1983
+ #
1984
+ # # Call the start_workstation method.
1985
+ # result = client.start_workstation request
1986
+ #
1987
+ # # The returned object is of type Gapic::Operation. You can use it to
1988
+ # # check the status of an operation, cancel it, or wait for results.
1989
+ # # Here is how to wait for a response.
1990
+ # result.wait_until_done! timeout: 60
1991
+ # if result.response?
1992
+ # p result.response
1993
+ # else
1994
+ # puts "No response received."
1995
+ # end
1996
+ #
1997
+ def start_workstation request, options = nil
1998
+ raise ::ArgumentError, "request must be provided" if request.nil?
1999
+
2000
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest
2001
+
2002
+ # Converts hash and nil to an options object
2003
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2004
+
2005
+ # Customize the options with defaults
2006
+ metadata = @config.rpcs.start_workstation.metadata.to_h
2007
+
2008
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2009
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2010
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2011
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
2012
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2013
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2014
+
2015
+ header_params = {}
2016
+ if request.name
2017
+ header_params["name"] = request.name
2018
+ end
2019
+
2020
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2021
+ metadata[:"x-goog-request-params"] ||= request_params_header
2022
+
2023
+ options.apply_defaults timeout: @config.rpcs.start_workstation.timeout,
2024
+ metadata: metadata,
2025
+ retry_policy: @config.rpcs.start_workstation.retry_policy
2026
+
2027
+ options.apply_defaults timeout: @config.timeout,
2028
+ metadata: @config.metadata,
2029
+ retry_policy: @config.retry_policy
2030
+
2031
+ @workstations_stub.call_rpc :start_workstation, request, options: options do |response, operation|
2032
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2033
+ yield response, operation if block_given?
2034
+ return response
2035
+ end
2036
+ rescue ::GRPC::BadStatus => e
2037
+ raise ::Google::Cloud::Error.from_error(e)
2038
+ end
2039
+
2040
+ ##
2041
+ # Stops running a workstation, reducing costs.
2042
+ #
2043
+ # @overload stop_workstation(request, options = nil)
2044
+ # Pass arguments to `stop_workstation` via a request object, either of type
2045
+ # {::Google::Cloud::Workstations::V1beta::StopWorkstationRequest} or an equivalent Hash.
2046
+ #
2047
+ # @param request [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Hash]
2048
+ # A request object representing the call parameters. Required. To specify no
2049
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2050
+ # @param options [::Gapic::CallOptions, ::Hash]
2051
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2052
+ #
2053
+ # @overload stop_workstation(name: nil, validate_only: nil, etag: nil)
2054
+ # Pass arguments to `stop_workstation` via keyword arguments. Note that at
2055
+ # least one keyword argument is required. To specify no parameters, or to keep all
2056
+ # the default parameter values, pass an empty Hash as a request object (see above).
2057
+ #
2058
+ # @param name [::String]
2059
+ # Required. Name of the workstation to stop.
2060
+ # @param validate_only [::Boolean]
2061
+ # Optional. If set, validate the request and preview the review, but do not
2062
+ # actually apply it.
2063
+ # @param etag [::String]
2064
+ # Optional. If set, the request will be rejected if the latest version of the
2065
+ # workstation on the server does not have this ETag.
2066
+ #
2067
+ # @yield [response, operation] Access the result along with the RPC operation
2068
+ # @yieldparam response [::Gapic::Operation]
2069
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2070
+ #
2071
+ # @return [::Gapic::Operation]
2072
+ #
2073
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2074
+ #
2075
+ # @example Basic example
2076
+ # require "google/cloud/workstations/v1beta"
2077
+ #
2078
+ # # Create a client object. The client can be reused for multiple calls.
2079
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
2080
+ #
2081
+ # # Create a request. To set request fields, pass in keyword arguments.
2082
+ # request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new
2083
+ #
2084
+ # # Call the stop_workstation method.
2085
+ # result = client.stop_workstation request
2086
+ #
2087
+ # # The returned object is of type Gapic::Operation. You can use it to
2088
+ # # check the status of an operation, cancel it, or wait for results.
2089
+ # # Here is how to wait for a response.
2090
+ # result.wait_until_done! timeout: 60
2091
+ # if result.response?
2092
+ # p result.response
2093
+ # else
2094
+ # puts "No response received."
2095
+ # end
2096
+ #
2097
+ def stop_workstation request, options = nil
2098
+ raise ::ArgumentError, "request must be provided" if request.nil?
2099
+
2100
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest
2101
+
2102
+ # Converts hash and nil to an options object
2103
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2104
+
2105
+ # Customize the options with defaults
2106
+ metadata = @config.rpcs.stop_workstation.metadata.to_h
2107
+
2108
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2109
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2110
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2111
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
2112
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2113
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2114
+
2115
+ header_params = {}
2116
+ if request.name
2117
+ header_params["name"] = request.name
2118
+ end
2119
+
2120
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2121
+ metadata[:"x-goog-request-params"] ||= request_params_header
2122
+
2123
+ options.apply_defaults timeout: @config.rpcs.stop_workstation.timeout,
2124
+ metadata: metadata,
2125
+ retry_policy: @config.rpcs.stop_workstation.retry_policy
2126
+
2127
+ options.apply_defaults timeout: @config.timeout,
2128
+ metadata: @config.metadata,
2129
+ retry_policy: @config.retry_policy
2130
+
2131
+ @workstations_stub.call_rpc :stop_workstation, request, options: options do |response, operation|
2132
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2133
+ yield response, operation if block_given?
2134
+ return response
2135
+ end
2136
+ rescue ::GRPC::BadStatus => e
2137
+ raise ::Google::Cloud::Error.from_error(e)
2138
+ end
2139
+
2140
+ ##
2141
+ # Returns a short-lived credential that can be used to send authenticated and
2142
+ # authorized traffic to a workstation.
2143
+ #
2144
+ # @overload generate_access_token(request, options = nil)
2145
+ # Pass arguments to `generate_access_token` via a request object, either of type
2146
+ # {::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest} or an equivalent Hash.
2147
+ #
2148
+ # @param request [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Hash]
2149
+ # A request object representing the call parameters. Required. To specify no
2150
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2151
+ # @param options [::Gapic::CallOptions, ::Hash]
2152
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2153
+ #
2154
+ # @overload generate_access_token(expire_time: nil, ttl: nil, workstation: nil)
2155
+ # Pass arguments to `generate_access_token` via keyword arguments. Note that at
2156
+ # least one keyword argument is required. To specify no parameters, or to keep all
2157
+ # the default parameter values, pass an empty Hash as a request object (see above).
2158
+ #
2159
+ # @param expire_time [::Google::Protobuf::Timestamp, ::Hash]
2160
+ # Desired expiration time of the access token. This value must
2161
+ # be at most 24 hours in the future. If a value is not specified, the
2162
+ # token's expiration time will be set to a default value of 1 hour in the
2163
+ # future.
2164
+ # @param ttl [::Google::Protobuf::Duration, ::Hash]
2165
+ # Desired lifetime duration of the access token. This value must
2166
+ # be at most 24 hours. If a value is not specified, the token's lifetime
2167
+ # will be set to a default value of 1 hour.
2168
+ # @param workstation [::String]
2169
+ # Required. Name of the workstation for which the access token should be
2170
+ # generated.
2171
+ #
2172
+ # @yield [response, operation] Access the result along with the RPC operation
2173
+ # @yieldparam response [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse]
2174
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2175
+ #
2176
+ # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse]
2177
+ #
2178
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2179
+ #
2180
+ # @example Basic example
2181
+ # require "google/cloud/workstations/v1beta"
2182
+ #
2183
+ # # Create a client object. The client can be reused for multiple calls.
2184
+ # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new
2185
+ #
2186
+ # # Create a request. To set request fields, pass in keyword arguments.
2187
+ # request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new
2188
+ #
2189
+ # # Call the generate_access_token method.
2190
+ # result = client.generate_access_token request
2191
+ #
2192
+ # # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.
2193
+ # p result
2194
+ #
2195
+ def generate_access_token request, options = nil
2196
+ raise ::ArgumentError, "request must be provided" if request.nil?
2197
+
2198
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest
2199
+
2200
+ # Converts hash and nil to an options object
2201
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2202
+
2203
+ # Customize the options with defaults
2204
+ metadata = @config.rpcs.generate_access_token.metadata.to_h
2205
+
2206
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2207
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2208
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2209
+ gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION
2210
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2211
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2212
+
2213
+ header_params = {}
2214
+ if request.workstation
2215
+ header_params["workstation"] = request.workstation
2216
+ end
2217
+
2218
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2219
+ metadata[:"x-goog-request-params"] ||= request_params_header
2220
+
2221
+ options.apply_defaults timeout: @config.rpcs.generate_access_token.timeout,
2222
+ metadata: metadata,
2223
+ retry_policy: @config.rpcs.generate_access_token.retry_policy
2224
+
2225
+ options.apply_defaults timeout: @config.timeout,
2226
+ metadata: @config.metadata,
2227
+ retry_policy: @config.retry_policy
2228
+
2229
+ @workstations_stub.call_rpc :generate_access_token, request, options: options do |response, operation|
2230
+ yield response, operation if block_given?
2231
+ return response
2232
+ end
2233
+ rescue ::GRPC::BadStatus => e
2234
+ raise ::Google::Cloud::Error.from_error(e)
2235
+ end
2236
+
2237
+ ##
2238
+ # Configuration class for the Workstations API.
2239
+ #
2240
+ # This class represents the configuration for Workstations,
2241
+ # providing control over timeouts, retry behavior, logging, transport
2242
+ # parameters, and other low-level controls. Certain parameters can also be
2243
+ # applied individually to specific RPCs. See
2244
+ # {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration::Rpcs}
2245
+ # for a list of RPCs that can be configured independently.
2246
+ #
2247
+ # Configuration can be applied globally to all clients, or to a single client
2248
+ # on construction.
2249
+ #
2250
+ # @example
2251
+ #
2252
+ # # Modify the global config, setting the timeout for
2253
+ # # get_workstation_cluster to 20 seconds,
2254
+ # # and all remaining timeouts to 10 seconds.
2255
+ # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config|
2256
+ # config.timeout = 10.0
2257
+ # config.rpcs.get_workstation_cluster.timeout = 20.0
2258
+ # end
2259
+ #
2260
+ # # Apply the above configuration only to a new client.
2261
+ # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config|
2262
+ # config.timeout = 10.0
2263
+ # config.rpcs.get_workstation_cluster.timeout = 20.0
2264
+ # end
2265
+ #
2266
+ # @!attribute [rw] endpoint
2267
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2268
+ # nil, indicating to use the default endpoint in the current universe domain.
2269
+ # @return [::String,nil]
2270
+ # @!attribute [rw] credentials
2271
+ # Credentials to send with calls. You may provide any of the following types:
2272
+ # * (`String`) The path to a service account key file in JSON format
2273
+ # * (`Hash`) A service account key as a Hash
2274
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2275
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2276
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2277
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2278
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2279
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2280
+ # * (`nil`) indicating no credentials
2281
+ # @return [::Object]
2282
+ # @!attribute [rw] scope
2283
+ # The OAuth scopes
2284
+ # @return [::Array<::String>]
2285
+ # @!attribute [rw] lib_name
2286
+ # The library name as recorded in instrumentation and logging
2287
+ # @return [::String]
2288
+ # @!attribute [rw] lib_version
2289
+ # The library version as recorded in instrumentation and logging
2290
+ # @return [::String]
2291
+ # @!attribute [rw] channel_args
2292
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2293
+ # `GRPC::Core::Channel` object is provided as the credential.
2294
+ # @return [::Hash]
2295
+ # @!attribute [rw] interceptors
2296
+ # An array of interceptors that are run before calls are executed.
2297
+ # @return [::Array<::GRPC::ClientInterceptor>]
2298
+ # @!attribute [rw] timeout
2299
+ # The call timeout in seconds.
2300
+ # @return [::Numeric]
2301
+ # @!attribute [rw] metadata
2302
+ # Additional gRPC headers to be sent with the call.
2303
+ # @return [::Hash{::Symbol=>::String}]
2304
+ # @!attribute [rw] retry_policy
2305
+ # The retry policy. The value is a hash with the following keys:
2306
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2307
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2308
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2309
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2310
+ # trigger a retry.
2311
+ # @return [::Hash]
2312
+ # @!attribute [rw] quota_project
2313
+ # A separate project against which to charge quota.
2314
+ # @return [::String]
2315
+ # @!attribute [rw] universe_domain
2316
+ # The universe domain within which to make requests. This determines the
2317
+ # default endpoint URL. The default value of nil uses the environment
2318
+ # universe (usually the default "googleapis.com" universe).
2319
+ # @return [::String,nil]
2320
+ #
2321
+ class Configuration
2322
+ extend ::Gapic::Config
2323
+
2324
+ # @private
2325
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2326
+ DEFAULT_ENDPOINT = "workstations.googleapis.com"
2327
+
2328
+ config_attr :endpoint, nil, ::String, nil
2329
+ config_attr :credentials, nil do |value|
2330
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2331
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2332
+ allowed.any? { |klass| klass === value }
2333
+ end
2334
+ config_attr :scope, nil, ::String, ::Array, nil
2335
+ config_attr :lib_name, nil, ::String, nil
2336
+ config_attr :lib_version, nil, ::String, nil
2337
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2338
+ config_attr :interceptors, nil, ::Array, nil
2339
+ config_attr :timeout, nil, ::Numeric, nil
2340
+ config_attr :metadata, nil, ::Hash, nil
2341
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2342
+ config_attr :quota_project, nil, ::String, nil
2343
+ config_attr :universe_domain, nil, ::String, nil
2344
+
2345
+ # @private
2346
+ def initialize parent_config = nil
2347
+ @parent_config = parent_config unless parent_config.nil?
2348
+
2349
+ yield self if block_given?
2350
+ end
2351
+
2352
+ ##
2353
+ # Configurations for individual RPCs
2354
+ # @return [Rpcs]
2355
+ #
2356
+ def rpcs
2357
+ @rpcs ||= begin
2358
+ parent_rpcs = nil
2359
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2360
+ Rpcs.new parent_rpcs
2361
+ end
2362
+ end
2363
+
2364
+ ##
2365
+ # Configuration for the channel pool
2366
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2367
+ #
2368
+ def channel_pool
2369
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2370
+ end
2371
+
2372
+ ##
2373
+ # Configuration RPC class for the Workstations API.
2374
+ #
2375
+ # Includes fields providing the configuration for each RPC in this service.
2376
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2377
+ # the following configuration fields:
2378
+ #
2379
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2380
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2381
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2382
+ # include the following keys:
2383
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2384
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2385
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2386
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2387
+ # trigger a retry.
2388
+ #
2389
+ class Rpcs
2390
+ ##
2391
+ # RPC-specific configuration for `get_workstation_cluster`
2392
+ # @return [::Gapic::Config::Method]
2393
+ #
2394
+ attr_reader :get_workstation_cluster
2395
+ ##
2396
+ # RPC-specific configuration for `list_workstation_clusters`
2397
+ # @return [::Gapic::Config::Method]
2398
+ #
2399
+ attr_reader :list_workstation_clusters
2400
+ ##
2401
+ # RPC-specific configuration for `create_workstation_cluster`
2402
+ # @return [::Gapic::Config::Method]
2403
+ #
2404
+ attr_reader :create_workstation_cluster
2405
+ ##
2406
+ # RPC-specific configuration for `update_workstation_cluster`
2407
+ # @return [::Gapic::Config::Method]
2408
+ #
2409
+ attr_reader :update_workstation_cluster
2410
+ ##
2411
+ # RPC-specific configuration for `delete_workstation_cluster`
2412
+ # @return [::Gapic::Config::Method]
2413
+ #
2414
+ attr_reader :delete_workstation_cluster
2415
+ ##
2416
+ # RPC-specific configuration for `get_workstation_config`
2417
+ # @return [::Gapic::Config::Method]
2418
+ #
2419
+ attr_reader :get_workstation_config
2420
+ ##
2421
+ # RPC-specific configuration for `list_workstation_configs`
2422
+ # @return [::Gapic::Config::Method]
2423
+ #
2424
+ attr_reader :list_workstation_configs
2425
+ ##
2426
+ # RPC-specific configuration for `list_usable_workstation_configs`
2427
+ # @return [::Gapic::Config::Method]
2428
+ #
2429
+ attr_reader :list_usable_workstation_configs
2430
+ ##
2431
+ # RPC-specific configuration for `create_workstation_config`
2432
+ # @return [::Gapic::Config::Method]
2433
+ #
2434
+ attr_reader :create_workstation_config
2435
+ ##
2436
+ # RPC-specific configuration for `update_workstation_config`
2437
+ # @return [::Gapic::Config::Method]
2438
+ #
2439
+ attr_reader :update_workstation_config
2440
+ ##
2441
+ # RPC-specific configuration for `delete_workstation_config`
2442
+ # @return [::Gapic::Config::Method]
2443
+ #
2444
+ attr_reader :delete_workstation_config
2445
+ ##
2446
+ # RPC-specific configuration for `get_workstation`
2447
+ # @return [::Gapic::Config::Method]
2448
+ #
2449
+ attr_reader :get_workstation
2450
+ ##
2451
+ # RPC-specific configuration for `list_workstations`
2452
+ # @return [::Gapic::Config::Method]
2453
+ #
2454
+ attr_reader :list_workstations
2455
+ ##
2456
+ # RPC-specific configuration for `list_usable_workstations`
2457
+ # @return [::Gapic::Config::Method]
2458
+ #
2459
+ attr_reader :list_usable_workstations
2460
+ ##
2461
+ # RPC-specific configuration for `create_workstation`
2462
+ # @return [::Gapic::Config::Method]
2463
+ #
2464
+ attr_reader :create_workstation
2465
+ ##
2466
+ # RPC-specific configuration for `update_workstation`
2467
+ # @return [::Gapic::Config::Method]
2468
+ #
2469
+ attr_reader :update_workstation
2470
+ ##
2471
+ # RPC-specific configuration for `delete_workstation`
2472
+ # @return [::Gapic::Config::Method]
2473
+ #
2474
+ attr_reader :delete_workstation
2475
+ ##
2476
+ # RPC-specific configuration for `start_workstation`
2477
+ # @return [::Gapic::Config::Method]
2478
+ #
2479
+ attr_reader :start_workstation
2480
+ ##
2481
+ # RPC-specific configuration for `stop_workstation`
2482
+ # @return [::Gapic::Config::Method]
2483
+ #
2484
+ attr_reader :stop_workstation
2485
+ ##
2486
+ # RPC-specific configuration for `generate_access_token`
2487
+ # @return [::Gapic::Config::Method]
2488
+ #
2489
+ attr_reader :generate_access_token
2490
+
2491
+ # @private
2492
+ def initialize parent_rpcs = nil
2493
+ get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster
2494
+ @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config
2495
+ list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters
2496
+ @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config
2497
+ create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster
2498
+ @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config
2499
+ update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster
2500
+ @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config
2501
+ delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster
2502
+ @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config
2503
+ get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config
2504
+ @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config
2505
+ list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs
2506
+ @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config
2507
+ list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs
2508
+ @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config
2509
+ create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config
2510
+ @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config
2511
+ update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config
2512
+ @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config
2513
+ delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config
2514
+ @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config
2515
+ get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation
2516
+ @get_workstation = ::Gapic::Config::Method.new get_workstation_config
2517
+ list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations
2518
+ @list_workstations = ::Gapic::Config::Method.new list_workstations_config
2519
+ list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations
2520
+ @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config
2521
+ create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation
2522
+ @create_workstation = ::Gapic::Config::Method.new create_workstation_config
2523
+ update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation
2524
+ @update_workstation = ::Gapic::Config::Method.new update_workstation_config
2525
+ delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation
2526
+ @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config
2527
+ start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation
2528
+ @start_workstation = ::Gapic::Config::Method.new start_workstation_config
2529
+ stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation
2530
+ @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config
2531
+ generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token
2532
+ @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config
2533
+
2534
+ yield self if block_given?
2535
+ end
2536
+ end
2537
+ end
2538
+ end
2539
+ end
2540
+ end
2541
+ end
2542
+ end
2543
+ end