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