google-apps-meet-v2 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: befee9c8978656d8f4f0d422c67acd00125108189bb310e0c39912e2da0fd50a
4
- data.tar.gz: 291bdb6f7965ea01c9601a96caf6a3edfe12abad8b765dd846b3cc81f48d202c
3
+ metadata.gz: 942cb91d5742ee70df3440b41781e2c1ed43792ce7a35147f6150d66420d0047
4
+ data.tar.gz: 7d81d792a65aabb93a161a85bdf09ef0f22f96aee6cb6f1892c86d3c9bc0b018
5
5
  SHA512:
6
- metadata.gz: 32355d96d9cbabebd88632f01a225446643ebe60014ad8c68a40e258c5018ee8197b2bc2c20495a80292587b24068860ea8e01a7521e9126894904bb8a2bdadd
7
- data.tar.gz: b10c1ba644ad7f3ce9bd139fcd5e071eadd340b22ceb9db0049e21013a5a7effd891afd55a759e4497ecc7a5c2e55d87d148034ee2c6f5f286f9d654a8a36ce2
6
+ metadata.gz: 1aa6321e119aa47b6538c45a9d18674bc7ccb38c6c23e786635d17ee3ba943af087a21c8f15421980eb35ab879cbb42cd619b17a26601e23656139aa9a5b9217
7
+ data.tar.gz: 5001f8da20efe1984bf24833f0dbdea0c2b1f7a8d14f41061c991d0917d2be3e8760783a5f0931ace4ebddeb992d49ba5ada27a6015b5f41d80a8edf69ea560a
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Create and manage meetings in Google Meet.
4
4
 
5
- Create and manage meetings in Google Meet.
6
5
 
7
6
  https://github.com/googleapis/google-cloud-ruby
8
7
 
@@ -43,33 +42,43 @@ for class and method documentation.
43
42
  See also the [Product Documentation](https://developers.google.com/meet/api/guides/overview)
44
43
  for general usage information.
45
44
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ You can customize logging by modifying the `logger` configuration when
71
+ constructing a client object. For example:
55
72
 
56
73
  ```ruby
74
+ require "google/apps/meet/v2"
57
75
  require "logger"
58
76
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
77
+ client = ::Google::Apps::Meet::V2::SpacesService::Client.new do |config|
78
+ config.logger = Logger.new "my-app.log"
69
79
  end
70
80
  ```
71
81
 
72
-
73
82
  ## Google Cloud Samples
74
83
 
75
84
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -30,6 +30,9 @@ module Google
30
30
  # REST API for services dealing with conference records.
31
31
  #
32
32
  class Client
33
+ # @private
34
+ API_VERSION = ""
35
+
33
36
  # @private
34
37
  DEFAULT_ENDPOINT_TEMPLATE = "meet.$UNIVERSE_DOMAIN$"
35
38
 
@@ -214,8 +217,28 @@ module Google
214
217
  universe_domain: @config.universe_domain,
215
218
  channel_args: @config.channel_args,
216
219
  interceptors: @config.interceptors,
217
- channel_pool_config: @config.channel_pool
220
+ channel_pool_config: @config.channel_pool,
221
+ logger: @config.logger
218
222
  )
223
+
224
+ @conference_records_service_stub.stub_logger&.info do |entry|
225
+ entry.set_system_name
226
+ entry.set_service
227
+ entry.message = "Created client for #{entry.service}"
228
+ entry.set_credentials_fields credentials
229
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
230
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
231
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
232
+ end
233
+ end
234
+
235
+ ##
236
+ # The logger used for request/response debug logging.
237
+ #
238
+ # @return [Logger]
239
+ #
240
+ def logger
241
+ @conference_records_service_stub.logger
219
242
  end
220
243
 
221
244
  # Service calls
@@ -275,10 +298,11 @@ module Google
275
298
  # Customize the options with defaults
276
299
  metadata = @config.rpcs.get_conference_record.metadata.to_h
277
300
 
278
- # Set x-goog-api-client and x-goog-user-project headers
301
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
279
302
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
280
303
  lib_name: @config.lib_name, lib_version: @config.lib_version,
281
304
  gapic_version: ::Google::Apps::Meet::V2::VERSION
305
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
282
306
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
283
307
 
284
308
  header_params = {}
@@ -299,7 +323,6 @@ module Google
299
323
 
300
324
  @conference_records_service_stub.call_rpc :get_conference_record, request, options: options do |response, operation|
301
325
  yield response, operation if block_given?
302
- return response
303
326
  end
304
327
  rescue ::GRPC::BadStatus => e
305
328
  raise ::Google::Cloud::Error.from_error(e)
@@ -381,10 +404,11 @@ module Google
381
404
  # Customize the options with defaults
382
405
  metadata = @config.rpcs.list_conference_records.metadata.to_h
383
406
 
384
- # Set x-goog-api-client and x-goog-user-project headers
407
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
385
408
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
386
409
  lib_name: @config.lib_name, lib_version: @config.lib_version,
387
410
  gapic_version: ::Google::Apps::Meet::V2::VERSION
411
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
388
412
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
389
413
 
390
414
  options.apply_defaults timeout: @config.rpcs.list_conference_records.timeout,
@@ -398,7 +422,7 @@ module Google
398
422
  @conference_records_service_stub.call_rpc :list_conference_records, request, options: options do |response, operation|
399
423
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_conference_records, request, response, operation, options
400
424
  yield response, operation if block_given?
401
- return response
425
+ throw :response, response
402
426
  end
403
427
  rescue ::GRPC::BadStatus => e
404
428
  raise ::Google::Cloud::Error.from_error(e)
@@ -459,10 +483,11 @@ module Google
459
483
  # Customize the options with defaults
460
484
  metadata = @config.rpcs.get_participant.metadata.to_h
461
485
 
462
- # Set x-goog-api-client and x-goog-user-project headers
486
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
463
487
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
464
488
  lib_name: @config.lib_name, lib_version: @config.lib_version,
465
489
  gapic_version: ::Google::Apps::Meet::V2::VERSION
490
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
466
491
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
467
492
 
468
493
  header_params = {}
@@ -483,7 +508,6 @@ module Google
483
508
 
484
509
  @conference_records_service_stub.call_rpc :get_participant, request, options: options do |response, operation|
485
510
  yield response, operation if block_given?
486
- return response
487
511
  end
488
512
  rescue ::GRPC::BadStatus => e
489
513
  raise ::Google::Cloud::Error.from_error(e)
@@ -570,10 +594,11 @@ module Google
570
594
  # Customize the options with defaults
571
595
  metadata = @config.rpcs.list_participants.metadata.to_h
572
596
 
573
- # Set x-goog-api-client and x-goog-user-project headers
597
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
574
598
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
575
599
  lib_name: @config.lib_name, lib_version: @config.lib_version,
576
600
  gapic_version: ::Google::Apps::Meet::V2::VERSION
601
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
577
602
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
578
603
 
579
604
  header_params = {}
@@ -595,7 +620,7 @@ module Google
595
620
  @conference_records_service_stub.call_rpc :list_participants, request, options: options do |response, operation|
596
621
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_participants, request, response, operation, options
597
622
  yield response, operation if block_given?
598
- return response
623
+ throw :response, response
599
624
  end
600
625
  rescue ::GRPC::BadStatus => e
601
626
  raise ::Google::Cloud::Error.from_error(e)
@@ -656,10 +681,11 @@ module Google
656
681
  # Customize the options with defaults
657
682
  metadata = @config.rpcs.get_participant_session.metadata.to_h
658
683
 
659
- # Set x-goog-api-client and x-goog-user-project headers
684
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
660
685
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
661
686
  lib_name: @config.lib_name, lib_version: @config.lib_version,
662
687
  gapic_version: ::Google::Apps::Meet::V2::VERSION
688
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
663
689
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
664
690
 
665
691
  header_params = {}
@@ -680,7 +706,6 @@ module Google
680
706
 
681
707
  @conference_records_service_stub.call_rpc :get_participant_session, request, options: options do |response, operation|
682
708
  yield response, operation if block_given?
683
- return response
684
709
  end
685
710
  rescue ::GRPC::BadStatus => e
686
711
  raise ::Google::Cloud::Error.from_error(e)
@@ -767,10 +792,11 @@ module Google
767
792
  # Customize the options with defaults
768
793
  metadata = @config.rpcs.list_participant_sessions.metadata.to_h
769
794
 
770
- # Set x-goog-api-client and x-goog-user-project headers
795
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
771
796
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
772
797
  lib_name: @config.lib_name, lib_version: @config.lib_version,
773
798
  gapic_version: ::Google::Apps::Meet::V2::VERSION
799
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
774
800
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
775
801
 
776
802
  header_params = {}
@@ -792,7 +818,7 @@ module Google
792
818
  @conference_records_service_stub.call_rpc :list_participant_sessions, request, options: options do |response, operation|
793
819
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_participant_sessions, request, response, operation, options
794
820
  yield response, operation if block_given?
795
- return response
821
+ throw :response, response
796
822
  end
797
823
  rescue ::GRPC::BadStatus => e
798
824
  raise ::Google::Cloud::Error.from_error(e)
@@ -853,10 +879,11 @@ module Google
853
879
  # Customize the options with defaults
854
880
  metadata = @config.rpcs.get_recording.metadata.to_h
855
881
 
856
- # Set x-goog-api-client and x-goog-user-project headers
882
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
857
883
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
858
884
  lib_name: @config.lib_name, lib_version: @config.lib_version,
859
885
  gapic_version: ::Google::Apps::Meet::V2::VERSION
886
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
860
887
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
861
888
 
862
889
  header_params = {}
@@ -877,7 +904,6 @@ module Google
877
904
 
878
905
  @conference_records_service_stub.call_rpc :get_recording, request, options: options do |response, operation|
879
906
  yield response, operation if block_given?
880
- return response
881
907
  end
882
908
  rescue ::GRPC::BadStatus => e
883
909
  raise ::Google::Cloud::Error.from_error(e)
@@ -951,10 +977,11 @@ module Google
951
977
  # Customize the options with defaults
952
978
  metadata = @config.rpcs.list_recordings.metadata.to_h
953
979
 
954
- # Set x-goog-api-client and x-goog-user-project headers
980
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
955
981
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
956
982
  lib_name: @config.lib_name, lib_version: @config.lib_version,
957
983
  gapic_version: ::Google::Apps::Meet::V2::VERSION
984
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
958
985
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
959
986
 
960
987
  header_params = {}
@@ -976,7 +1003,7 @@ module Google
976
1003
  @conference_records_service_stub.call_rpc :list_recordings, request, options: options do |response, operation|
977
1004
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_recordings, request, response, operation, options
978
1005
  yield response, operation if block_given?
979
- return response
1006
+ throw :response, response
980
1007
  end
981
1008
  rescue ::GRPC::BadStatus => e
982
1009
  raise ::Google::Cloud::Error.from_error(e)
@@ -1037,10 +1064,11 @@ module Google
1037
1064
  # Customize the options with defaults
1038
1065
  metadata = @config.rpcs.get_transcript.metadata.to_h
1039
1066
 
1040
- # Set x-goog-api-client and x-goog-user-project headers
1067
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1041
1068
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1042
1069
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1043
1070
  gapic_version: ::Google::Apps::Meet::V2::VERSION
1071
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1044
1072
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1045
1073
 
1046
1074
  header_params = {}
@@ -1061,7 +1089,6 @@ module Google
1061
1089
 
1062
1090
  @conference_records_service_stub.call_rpc :get_transcript, request, options: options do |response, operation|
1063
1091
  yield response, operation if block_given?
1064
- return response
1065
1092
  end
1066
1093
  rescue ::GRPC::BadStatus => e
1067
1094
  raise ::Google::Cloud::Error.from_error(e)
@@ -1135,10 +1162,11 @@ module Google
1135
1162
  # Customize the options with defaults
1136
1163
  metadata = @config.rpcs.list_transcripts.metadata.to_h
1137
1164
 
1138
- # Set x-goog-api-client and x-goog-user-project headers
1165
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1139
1166
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1140
1167
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1141
1168
  gapic_version: ::Google::Apps::Meet::V2::VERSION
1169
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1142
1170
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1143
1171
 
1144
1172
  header_params = {}
@@ -1160,7 +1188,7 @@ module Google
1160
1188
  @conference_records_service_stub.call_rpc :list_transcripts, request, options: options do |response, operation|
1161
1189
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_transcripts, request, response, operation, options
1162
1190
  yield response, operation if block_given?
1163
- return response
1191
+ throw :response, response
1164
1192
  end
1165
1193
  rescue ::GRPC::BadStatus => e
1166
1194
  raise ::Google::Cloud::Error.from_error(e)
@@ -1225,10 +1253,11 @@ module Google
1225
1253
  # Customize the options with defaults
1226
1254
  metadata = @config.rpcs.get_transcript_entry.metadata.to_h
1227
1255
 
1228
- # Set x-goog-api-client and x-goog-user-project headers
1256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1229
1257
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1230
1258
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1231
1259
  gapic_version: ::Google::Apps::Meet::V2::VERSION
1260
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1232
1261
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1233
1262
 
1234
1263
  header_params = {}
@@ -1249,7 +1278,6 @@ module Google
1249
1278
 
1250
1279
  @conference_records_service_stub.call_rpc :get_transcript_entry, request, options: options do |response, operation|
1251
1280
  yield response, operation if block_given?
1252
- return response
1253
1281
  end
1254
1282
  rescue ::GRPC::BadStatus => e
1255
1283
  raise ::Google::Cloud::Error.from_error(e)
@@ -1328,10 +1356,11 @@ module Google
1328
1356
  # Customize the options with defaults
1329
1357
  metadata = @config.rpcs.list_transcript_entries.metadata.to_h
1330
1358
 
1331
- # Set x-goog-api-client and x-goog-user-project headers
1359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1332
1360
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1333
1361
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1334
1362
  gapic_version: ::Google::Apps::Meet::V2::VERSION
1363
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1335
1364
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1336
1365
 
1337
1366
  header_params = {}
@@ -1353,7 +1382,7 @@ module Google
1353
1382
  @conference_records_service_stub.call_rpc :list_transcript_entries, request, options: options do |response, operation|
1354
1383
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_transcript_entries, request, response, operation, options
1355
1384
  yield response, operation if block_given?
1356
- return response
1385
+ throw :response, response
1357
1386
  end
1358
1387
  rescue ::GRPC::BadStatus => e
1359
1388
  raise ::Google::Cloud::Error.from_error(e)
@@ -1442,6 +1471,11 @@ module Google
1442
1471
  # default endpoint URL. The default value of nil uses the environment
1443
1472
  # universe (usually the default "googleapis.com" universe).
1444
1473
  # @return [::String,nil]
1474
+ # @!attribute [rw] logger
1475
+ # A custom logger to use for request/response debug logging, or the value
1476
+ # `:default` (the default) to construct a default logger, or `nil` to
1477
+ # explicitly disable logging.
1478
+ # @return [::Logger,:default,nil]
1445
1479
  #
1446
1480
  class Configuration
1447
1481
  extend ::Gapic::Config
@@ -1466,6 +1500,7 @@ module Google
1466
1500
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1467
1501
  config_attr :quota_project, nil, ::String, nil
1468
1502
  config_attr :universe_domain, nil, ::String, nil
1503
+ config_attr :logger, :default, ::Logger, nil, :default
1469
1504
 
1470
1505
  # @private
1471
1506
  def initialize parent_config = nil