google-apps-meet-v2 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) 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/apps/meet/v2/conference_records_service/client.rb +1612 -0
  6. data/lib/google/apps/meet/v2/conference_records_service/credentials.rb +48 -0
  7. data/lib/google/apps/meet/v2/conference_records_service/paths.rb +136 -0
  8. data/lib/google/apps/meet/v2/conference_records_service/rest/client.rb +1510 -0
  9. data/lib/google/apps/meet/v2/conference_records_service/rest/service_stub.rb +775 -0
  10. data/lib/google/apps/meet/v2/conference_records_service/rest.rb +52 -0
  11. data/lib/google/apps/meet/v2/conference_records_service.rb +55 -0
  12. data/lib/google/apps/meet/v2/resource_pb.rb +64 -0
  13. data/lib/google/apps/meet/v2/rest.rb +38 -0
  14. data/lib/google/apps/meet/v2/service_pb.rb +73 -0
  15. data/lib/google/apps/meet/v2/service_services_pb.rb +109 -0
  16. data/lib/google/apps/meet/v2/spaces_service/client.rb +706 -0
  17. data/lib/google/apps/meet/v2/spaces_service/credentials.rb +48 -0
  18. data/lib/google/apps/meet/v2/spaces_service/paths.rb +61 -0
  19. data/lib/google/apps/meet/v2/spaces_service/rest/client.rb +660 -0
  20. data/lib/google/apps/meet/v2/spaces_service/rest/service_stub.rb +306 -0
  21. data/lib/google/apps/meet/v2/spaces_service/rest.rb +52 -0
  22. data/lib/google/apps/meet/v2/spaces_service.rb +55 -0
  23. data/lib/google/apps/meet/v2/version.rb +7 -2
  24. data/lib/google/apps/meet/v2.rb +46 -0
  25. data/lib/google-apps-meet-v2.rb +21 -0
  26. data/proto_docs/README.md +4 -0
  27. data/proto_docs/google/api/client.rb +395 -0
  28. data/proto_docs/google/api/field_behavior.rb +85 -0
  29. data/proto_docs/google/api/launch_stage.rb +71 -0
  30. data/proto_docs/google/api/resource.rb +222 -0
  31. data/proto_docs/google/apps/meet/v2/resource.rb +367 -0
  32. data/proto_docs/google/apps/meet/v2/service.rb +353 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  36. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  37. metadata +186 -9
@@ -0,0 +1,706 @@
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/apps/meet/v2/service_pb"
21
+
22
+ module Google
23
+ module Apps
24
+ module Meet
25
+ module V2
26
+ module SpacesService
27
+ ##
28
+ # Client for the SpacesService service.
29
+ #
30
+ # REST API for services dealing with spaces.
31
+ #
32
+ class Client
33
+ # @private
34
+ DEFAULT_ENDPOINT_TEMPLATE = "meet.$UNIVERSE_DOMAIN$"
35
+
36
+ include Paths
37
+
38
+ # @private
39
+ attr_reader :spaces_service_stub
40
+
41
+ ##
42
+ # Configure the SpacesService Client class.
43
+ #
44
+ # See {::Google::Apps::Meet::V2::SpacesService::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all SpacesService clients
50
+ # ::Google::Apps::Meet::V2::SpacesService::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
53
+ #
54
+ # @yield [config] Configure the Client client.
55
+ # @yieldparam config [Client::Configuration]
56
+ #
57
+ # @return [Client::Configuration]
58
+ #
59
+ def self.configure
60
+ @configure ||= begin
61
+ namespace = ["Google", "Apps", "Meet", "V2"]
62
+ parent_config = while namespace.any?
63
+ parent_name = namespace.join "::"
64
+ parent_const = const_get parent_name
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
+ namespace.pop
67
+ end
68
+ default_config = Client::Configuration.new parent_config
69
+
70
+ default_config.rpcs.create_space.timeout = 60.0
71
+
72
+ default_config.rpcs.get_space.timeout = 60.0
73
+ default_config.rpcs.get_space.retry_policy = {
74
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
75
+ }
76
+
77
+ default_config.rpcs.update_space.timeout = 60.0
78
+
79
+ default_config.rpcs.end_active_conference.timeout = 60.0
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the SpacesService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Apps::Meet::V2::SpacesService::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @spaces_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new SpacesService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Apps::Meet::V2::SpacesService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Apps::Meet::V2::SpacesService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the SpacesService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # These require statements are intentionally placed here to initialize
134
+ # the gRPC module only when it's required.
135
+ # See https://github.com/googleapis/toolkit/issues/446
136
+ require "gapic/grpc"
137
+ require "google/apps/meet/v2/service_services_pb"
138
+
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint.nil? ||
150
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
+ !@config.endpoint.split(".").first.include?("-"))
152
+ credentials ||= Credentials.default scope: @config.scope,
153
+ enable_self_signed_jwt: enable_self_signed_jwt
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
155
+ credentials = Credentials.new credentials, scope: @config.scope
156
+ end
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @spaces_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Apps::Meet::V2::SpacesService::Stub,
162
+ credentials: credentials,
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ channel_args: @config.channel_args,
167
+ interceptors: @config.interceptors,
168
+ channel_pool_config: @config.channel_pool
169
+ )
170
+ end
171
+
172
+ # Service calls
173
+
174
+ ##
175
+ # Creates a space.
176
+ #
177
+ # @overload create_space(request, options = nil)
178
+ # Pass arguments to `create_space` via a request object, either of type
179
+ # {::Google::Apps::Meet::V2::CreateSpaceRequest} or an equivalent Hash.
180
+ #
181
+ # @param request [::Google::Apps::Meet::V2::CreateSpaceRequest, ::Hash]
182
+ # A request object representing the call parameters. Required. To specify no
183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
184
+ # @param options [::Gapic::CallOptions, ::Hash]
185
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
186
+ #
187
+ # @overload create_space(space: nil)
188
+ # Pass arguments to `create_space` via keyword arguments. Note that at
189
+ # least one keyword argument is required. To specify no parameters, or to keep all
190
+ # the default parameter values, pass an empty Hash as a request object (see above).
191
+ #
192
+ # @param space [::Google::Apps::Meet::V2::Space, ::Hash]
193
+ # Space to be created. As of May 2023, the input space can be empty. Later on
194
+ # the input space can be non-empty when space configuration is introduced.
195
+ #
196
+ # @yield [response, operation] Access the result along with the RPC operation
197
+ # @yieldparam response [::Google::Apps::Meet::V2::Space]
198
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
199
+ #
200
+ # @return [::Google::Apps::Meet::V2::Space]
201
+ #
202
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
203
+ #
204
+ # @example Basic example
205
+ # require "google/apps/meet/v2"
206
+ #
207
+ # # Create a client object. The client can be reused for multiple calls.
208
+ # client = Google::Apps::Meet::V2::SpacesService::Client.new
209
+ #
210
+ # # Create a request. To set request fields, pass in keyword arguments.
211
+ # request = Google::Apps::Meet::V2::CreateSpaceRequest.new
212
+ #
213
+ # # Call the create_space method.
214
+ # result = client.create_space request
215
+ #
216
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
217
+ # p result
218
+ #
219
+ def create_space request, options = nil
220
+ raise ::ArgumentError, "request must be provided" if request.nil?
221
+
222
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::CreateSpaceRequest
223
+
224
+ # Converts hash and nil to an options object
225
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
226
+
227
+ # Customize the options with defaults
228
+ metadata = @config.rpcs.create_space.metadata.to_h
229
+
230
+ # Set x-goog-api-client and x-goog-user-project headers
231
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
232
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
233
+ gapic_version: ::Google::Apps::Meet::V2::VERSION
234
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
+
236
+ options.apply_defaults timeout: @config.rpcs.create_space.timeout,
237
+ metadata: metadata,
238
+ retry_policy: @config.rpcs.create_space.retry_policy
239
+
240
+ options.apply_defaults timeout: @config.timeout,
241
+ metadata: @config.metadata,
242
+ retry_policy: @config.retry_policy
243
+
244
+ @spaces_service_stub.call_rpc :create_space, request, options: options do |response, operation|
245
+ yield response, operation if block_given?
246
+ return response
247
+ end
248
+ rescue ::GRPC::BadStatus => e
249
+ raise ::Google::Cloud::Error.from_error(e)
250
+ end
251
+
252
+ ##
253
+ # Gets a space by `space_id` or `meeting_code`.
254
+ #
255
+ # @overload get_space(request, options = nil)
256
+ # Pass arguments to `get_space` via a request object, either of type
257
+ # {::Google::Apps::Meet::V2::GetSpaceRequest} or an equivalent Hash.
258
+ #
259
+ # @param request [::Google::Apps::Meet::V2::GetSpaceRequest, ::Hash]
260
+ # A request object representing the call parameters. Required. To specify no
261
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
262
+ # @param options [::Gapic::CallOptions, ::Hash]
263
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
264
+ #
265
+ # @overload get_space(name: nil)
266
+ # Pass arguments to `get_space` via keyword arguments. Note that at
267
+ # least one keyword argument is required. To specify no parameters, or to keep all
268
+ # the default parameter values, pass an empty Hash as a request object (see above).
269
+ #
270
+ # @param name [::String]
271
+ # Required. Resource name of the space.
272
+ #
273
+ # @yield [response, operation] Access the result along with the RPC operation
274
+ # @yieldparam response [::Google::Apps::Meet::V2::Space]
275
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
276
+ #
277
+ # @return [::Google::Apps::Meet::V2::Space]
278
+ #
279
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
280
+ #
281
+ # @example Basic example
282
+ # require "google/apps/meet/v2"
283
+ #
284
+ # # Create a client object. The client can be reused for multiple calls.
285
+ # client = Google::Apps::Meet::V2::SpacesService::Client.new
286
+ #
287
+ # # Create a request. To set request fields, pass in keyword arguments.
288
+ # request = Google::Apps::Meet::V2::GetSpaceRequest.new
289
+ #
290
+ # # Call the get_space method.
291
+ # result = client.get_space request
292
+ #
293
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
294
+ # p result
295
+ #
296
+ def get_space request, options = nil
297
+ raise ::ArgumentError, "request must be provided" if request.nil?
298
+
299
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::GetSpaceRequest
300
+
301
+ # Converts hash and nil to an options object
302
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
303
+
304
+ # Customize the options with defaults
305
+ metadata = @config.rpcs.get_space.metadata.to_h
306
+
307
+ # Set x-goog-api-client and x-goog-user-project headers
308
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
309
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
310
+ gapic_version: ::Google::Apps::Meet::V2::VERSION
311
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
312
+
313
+ header_params = {}
314
+ if request.name
315
+ header_params["name"] = request.name
316
+ end
317
+
318
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
319
+ metadata[:"x-goog-request-params"] ||= request_params_header
320
+
321
+ options.apply_defaults timeout: @config.rpcs.get_space.timeout,
322
+ metadata: metadata,
323
+ retry_policy: @config.rpcs.get_space.retry_policy
324
+
325
+ options.apply_defaults timeout: @config.timeout,
326
+ metadata: @config.metadata,
327
+ retry_policy: @config.retry_policy
328
+
329
+ @spaces_service_stub.call_rpc :get_space, request, options: options do |response, operation|
330
+ yield response, operation if block_given?
331
+ return response
332
+ end
333
+ rescue ::GRPC::BadStatus => e
334
+ raise ::Google::Cloud::Error.from_error(e)
335
+ end
336
+
337
+ ##
338
+ # Updates a space.
339
+ #
340
+ # @overload update_space(request, options = nil)
341
+ # Pass arguments to `update_space` via a request object, either of type
342
+ # {::Google::Apps::Meet::V2::UpdateSpaceRequest} or an equivalent Hash.
343
+ #
344
+ # @param request [::Google::Apps::Meet::V2::UpdateSpaceRequest, ::Hash]
345
+ # A request object representing the call parameters. Required. To specify no
346
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
347
+ # @param options [::Gapic::CallOptions, ::Hash]
348
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
349
+ #
350
+ # @overload update_space(space: nil, update_mask: nil)
351
+ # Pass arguments to `update_space` via keyword arguments. Note that at
352
+ # least one keyword argument is required. To specify no parameters, or to keep all
353
+ # the default parameter values, pass an empty Hash as a request object (see above).
354
+ #
355
+ # @param space [::Google::Apps::Meet::V2::Space, ::Hash]
356
+ # Required. Space to be updated.
357
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
358
+ # Optional. Field mask used to specify the fields to be updated in the space.
359
+ # If update_mask isn't provided, it defaults to '*' and updates all
360
+ # fields provided in the request, including deleting fields not set in the
361
+ # request.
362
+ #
363
+ # @yield [response, operation] Access the result along with the RPC operation
364
+ # @yieldparam response [::Google::Apps::Meet::V2::Space]
365
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
366
+ #
367
+ # @return [::Google::Apps::Meet::V2::Space]
368
+ #
369
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
370
+ #
371
+ # @example Basic example
372
+ # require "google/apps/meet/v2"
373
+ #
374
+ # # Create a client object. The client can be reused for multiple calls.
375
+ # client = Google::Apps::Meet::V2::SpacesService::Client.new
376
+ #
377
+ # # Create a request. To set request fields, pass in keyword arguments.
378
+ # request = Google::Apps::Meet::V2::UpdateSpaceRequest.new
379
+ #
380
+ # # Call the update_space method.
381
+ # result = client.update_space request
382
+ #
383
+ # # The returned object is of type Google::Apps::Meet::V2::Space.
384
+ # p result
385
+ #
386
+ def update_space request, options = nil
387
+ raise ::ArgumentError, "request must be provided" if request.nil?
388
+
389
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::UpdateSpaceRequest
390
+
391
+ # Converts hash and nil to an options object
392
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
393
+
394
+ # Customize the options with defaults
395
+ metadata = @config.rpcs.update_space.metadata.to_h
396
+
397
+ # Set x-goog-api-client and x-goog-user-project headers
398
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
399
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
400
+ gapic_version: ::Google::Apps::Meet::V2::VERSION
401
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
402
+
403
+ header_params = {}
404
+ if request.space&.name
405
+ header_params["space.name"] = request.space.name
406
+ end
407
+
408
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
409
+ metadata[:"x-goog-request-params"] ||= request_params_header
410
+
411
+ options.apply_defaults timeout: @config.rpcs.update_space.timeout,
412
+ metadata: metadata,
413
+ retry_policy: @config.rpcs.update_space.retry_policy
414
+
415
+ options.apply_defaults timeout: @config.timeout,
416
+ metadata: @config.metadata,
417
+ retry_policy: @config.retry_policy
418
+
419
+ @spaces_service_stub.call_rpc :update_space, request, options: options do |response, operation|
420
+ yield response, operation if block_given?
421
+ return response
422
+ end
423
+ rescue ::GRPC::BadStatus => e
424
+ raise ::Google::Cloud::Error.from_error(e)
425
+ end
426
+
427
+ ##
428
+ # Ends an active conference (if there's one).
429
+ #
430
+ # @overload end_active_conference(request, options = nil)
431
+ # Pass arguments to `end_active_conference` via a request object, either of type
432
+ # {::Google::Apps::Meet::V2::EndActiveConferenceRequest} or an equivalent Hash.
433
+ #
434
+ # @param request [::Google::Apps::Meet::V2::EndActiveConferenceRequest, ::Hash]
435
+ # A request object representing the call parameters. Required. To specify no
436
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
437
+ # @param options [::Gapic::CallOptions, ::Hash]
438
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
439
+ #
440
+ # @overload end_active_conference(name: nil)
441
+ # Pass arguments to `end_active_conference` via keyword arguments. Note that at
442
+ # least one keyword argument is required. To specify no parameters, or to keep all
443
+ # the default parameter values, pass an empty Hash as a request object (see above).
444
+ #
445
+ # @param name [::String]
446
+ # Required. Resource name of the space.
447
+ #
448
+ # @yield [response, operation] Access the result along with the RPC operation
449
+ # @yieldparam response [::Google::Protobuf::Empty]
450
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
451
+ #
452
+ # @return [::Google::Protobuf::Empty]
453
+ #
454
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
455
+ #
456
+ # @example Basic example
457
+ # require "google/apps/meet/v2"
458
+ #
459
+ # # Create a client object. The client can be reused for multiple calls.
460
+ # client = Google::Apps::Meet::V2::SpacesService::Client.new
461
+ #
462
+ # # Create a request. To set request fields, pass in keyword arguments.
463
+ # request = Google::Apps::Meet::V2::EndActiveConferenceRequest.new
464
+ #
465
+ # # Call the end_active_conference method.
466
+ # result = client.end_active_conference request
467
+ #
468
+ # # The returned object is of type Google::Protobuf::Empty.
469
+ # p result
470
+ #
471
+ def end_active_conference request, options = nil
472
+ raise ::ArgumentError, "request must be provided" if request.nil?
473
+
474
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Meet::V2::EndActiveConferenceRequest
475
+
476
+ # Converts hash and nil to an options object
477
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
478
+
479
+ # Customize the options with defaults
480
+ metadata = @config.rpcs.end_active_conference.metadata.to_h
481
+
482
+ # Set x-goog-api-client and x-goog-user-project headers
483
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
484
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
485
+ gapic_version: ::Google::Apps::Meet::V2::VERSION
486
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
487
+
488
+ header_params = {}
489
+ if request.name
490
+ header_params["name"] = request.name
491
+ end
492
+
493
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
494
+ metadata[:"x-goog-request-params"] ||= request_params_header
495
+
496
+ options.apply_defaults timeout: @config.rpcs.end_active_conference.timeout,
497
+ metadata: metadata,
498
+ retry_policy: @config.rpcs.end_active_conference.retry_policy
499
+
500
+ options.apply_defaults timeout: @config.timeout,
501
+ metadata: @config.metadata,
502
+ retry_policy: @config.retry_policy
503
+
504
+ @spaces_service_stub.call_rpc :end_active_conference, request, options: options do |response, operation|
505
+ yield response, operation if block_given?
506
+ return response
507
+ end
508
+ rescue ::GRPC::BadStatus => e
509
+ raise ::Google::Cloud::Error.from_error(e)
510
+ end
511
+
512
+ ##
513
+ # Configuration class for the SpacesService API.
514
+ #
515
+ # This class represents the configuration for SpacesService,
516
+ # providing control over timeouts, retry behavior, logging, transport
517
+ # parameters, and other low-level controls. Certain parameters can also be
518
+ # applied individually to specific RPCs. See
519
+ # {::Google::Apps::Meet::V2::SpacesService::Client::Configuration::Rpcs}
520
+ # for a list of RPCs that can be configured independently.
521
+ #
522
+ # Configuration can be applied globally to all clients, or to a single client
523
+ # on construction.
524
+ #
525
+ # @example
526
+ #
527
+ # # Modify the global config, setting the timeout for
528
+ # # create_space to 20 seconds,
529
+ # # and all remaining timeouts to 10 seconds.
530
+ # ::Google::Apps::Meet::V2::SpacesService::Client.configure do |config|
531
+ # config.timeout = 10.0
532
+ # config.rpcs.create_space.timeout = 20.0
533
+ # end
534
+ #
535
+ # # Apply the above configuration only to a new client.
536
+ # client = ::Google::Apps::Meet::V2::SpacesService::Client.new do |config|
537
+ # config.timeout = 10.0
538
+ # config.rpcs.create_space.timeout = 20.0
539
+ # end
540
+ #
541
+ # @!attribute [rw] endpoint
542
+ # A custom service endpoint, as a hostname or hostname:port. The default is
543
+ # nil, indicating to use the default endpoint in the current universe domain.
544
+ # @return [::String,nil]
545
+ # @!attribute [rw] credentials
546
+ # Credentials to send with calls. You may provide any of the following types:
547
+ # * (`String`) The path to a service account key file in JSON format
548
+ # * (`Hash`) A service account key as a Hash
549
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
550
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
551
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
552
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
553
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
554
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
555
+ # * (`nil`) indicating no credentials
556
+ # @return [::Object]
557
+ # @!attribute [rw] scope
558
+ # The OAuth scopes
559
+ # @return [::Array<::String>]
560
+ # @!attribute [rw] lib_name
561
+ # The library name as recorded in instrumentation and logging
562
+ # @return [::String]
563
+ # @!attribute [rw] lib_version
564
+ # The library version as recorded in instrumentation and logging
565
+ # @return [::String]
566
+ # @!attribute [rw] channel_args
567
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
568
+ # `GRPC::Core::Channel` object is provided as the credential.
569
+ # @return [::Hash]
570
+ # @!attribute [rw] interceptors
571
+ # An array of interceptors that are run before calls are executed.
572
+ # @return [::Array<::GRPC::ClientInterceptor>]
573
+ # @!attribute [rw] timeout
574
+ # The call timeout in seconds.
575
+ # @return [::Numeric]
576
+ # @!attribute [rw] metadata
577
+ # Additional gRPC headers to be sent with the call.
578
+ # @return [::Hash{::Symbol=>::String}]
579
+ # @!attribute [rw] retry_policy
580
+ # The retry policy. The value is a hash with the following keys:
581
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
582
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
583
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
584
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
585
+ # trigger a retry.
586
+ # @return [::Hash]
587
+ # @!attribute [rw] quota_project
588
+ # A separate project against which to charge quota.
589
+ # @return [::String]
590
+ # @!attribute [rw] universe_domain
591
+ # The universe domain within which to make requests. This determines the
592
+ # default endpoint URL. The default value of nil uses the environment
593
+ # universe (usually the default "googleapis.com" universe).
594
+ # @return [::String,nil]
595
+ #
596
+ class Configuration
597
+ extend ::Gapic::Config
598
+
599
+ # @private
600
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
601
+ DEFAULT_ENDPOINT = "meet.googleapis.com"
602
+
603
+ config_attr :endpoint, nil, ::String, nil
604
+ config_attr :credentials, nil do |value|
605
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
606
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
607
+ allowed.any? { |klass| klass === value }
608
+ end
609
+ config_attr :scope, nil, ::String, ::Array, nil
610
+ config_attr :lib_name, nil, ::String, nil
611
+ config_attr :lib_version, nil, ::String, nil
612
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
613
+ config_attr :interceptors, nil, ::Array, nil
614
+ config_attr :timeout, nil, ::Numeric, nil
615
+ config_attr :metadata, nil, ::Hash, nil
616
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
617
+ config_attr :quota_project, nil, ::String, nil
618
+ config_attr :universe_domain, nil, ::String, nil
619
+
620
+ # @private
621
+ def initialize parent_config = nil
622
+ @parent_config = parent_config unless parent_config.nil?
623
+
624
+ yield self if block_given?
625
+ end
626
+
627
+ ##
628
+ # Configurations for individual RPCs
629
+ # @return [Rpcs]
630
+ #
631
+ def rpcs
632
+ @rpcs ||= begin
633
+ parent_rpcs = nil
634
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
635
+ Rpcs.new parent_rpcs
636
+ end
637
+ end
638
+
639
+ ##
640
+ # Configuration for the channel pool
641
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
642
+ #
643
+ def channel_pool
644
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
645
+ end
646
+
647
+ ##
648
+ # Configuration RPC class for the SpacesService API.
649
+ #
650
+ # Includes fields providing the configuration for each RPC in this service.
651
+ # Each configuration object is of type `Gapic::Config::Method` and includes
652
+ # the following configuration fields:
653
+ #
654
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
655
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
656
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
657
+ # include the following keys:
658
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
659
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
660
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
661
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
662
+ # trigger a retry.
663
+ #
664
+ class Rpcs
665
+ ##
666
+ # RPC-specific configuration for `create_space`
667
+ # @return [::Gapic::Config::Method]
668
+ #
669
+ attr_reader :create_space
670
+ ##
671
+ # RPC-specific configuration for `get_space`
672
+ # @return [::Gapic::Config::Method]
673
+ #
674
+ attr_reader :get_space
675
+ ##
676
+ # RPC-specific configuration for `update_space`
677
+ # @return [::Gapic::Config::Method]
678
+ #
679
+ attr_reader :update_space
680
+ ##
681
+ # RPC-specific configuration for `end_active_conference`
682
+ # @return [::Gapic::Config::Method]
683
+ #
684
+ attr_reader :end_active_conference
685
+
686
+ # @private
687
+ def initialize parent_rpcs = nil
688
+ create_space_config = parent_rpcs.create_space if parent_rpcs.respond_to? :create_space
689
+ @create_space = ::Gapic::Config::Method.new create_space_config
690
+ get_space_config = parent_rpcs.get_space if parent_rpcs.respond_to? :get_space
691
+ @get_space = ::Gapic::Config::Method.new get_space_config
692
+ update_space_config = parent_rpcs.update_space if parent_rpcs.respond_to? :update_space
693
+ @update_space = ::Gapic::Config::Method.new update_space_config
694
+ end_active_conference_config = parent_rpcs.end_active_conference if parent_rpcs.respond_to? :end_active_conference
695
+ @end_active_conference = ::Gapic::Config::Method.new end_active_conference_config
696
+
697
+ yield self if block_given?
698
+ end
699
+ end
700
+ end
701
+ end
702
+ end
703
+ end
704
+ end
705
+ end
706
+ end