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