google-apps-meet-v2 0.2.2 → 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: 7759f5ad9bb4c9b6fe6f120f44bfd452693b86ecbf3a4e59a0b7c2535d309389
4
- data.tar.gz: ffa55f4289a86482b4b430834d4bb8723041d691dd25195891b99086d9218b3e
3
+ metadata.gz: 942cb91d5742ee70df3440b41781e2c1ed43792ce7a35147f6150d66420d0047
4
+ data.tar.gz: 7d81d792a65aabb93a161a85bdf09ef0f22f96aee6cb6f1892c86d3c9bc0b018
5
5
  SHA512:
6
- metadata.gz: 0070a6c5754bf0df02c888ea9470d355e84e7d17366b978a42ecdec55c87a214ae30289c31cd6128a68557bda5a5adf057227e33b16c5d448aec0612a314518d
7
- data.tar.gz: 3930102042261f74f70f3c63097a58e83f6007094e32a17c587733e91f8c601117a2aff3de7175b33902af69263481fcf6b93fc892f0a6ca2b87cc22a3335259
6
+ metadata.gz: 1aa6321e119aa47b6538c45a9d18674bc7ccb38c6c23e786635d17ee3ba943af087a21c8f15421980eb35ab879cbb42cd619b17a26601e23656139aa9a5b9217
7
+ data.tar.gz: 5001f8da20efe1984bf24833f0dbdea0c2b1f7a8d14f41061c991d0917d2be3e8760783a5f0931ace4ebddeb992d49ba5ada27a6015b5f41d80a8edf69ea560a
data/README.md CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
42
42
  See also the [Product Documentation](https://developers.google.com/meet/api/guides/overview)
43
43
  for general usage information.
44
44
 
45
- ## Enabling Logging
46
-
47
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
48
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
49
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
50
- 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)
51
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
52
-
53
- 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:
54
72
 
55
73
  ```ruby
74
+ require "google/apps/meet/v2"
56
75
  require "logger"
57
76
 
58
- module MyLogger
59
- LOGGER = Logger.new $stderr, level: Logger::WARN
60
- def logger
61
- LOGGER
62
- end
63
- end
64
-
65
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
66
- module GRPC
67
- extend MyLogger
77
+ client = ::Google::Apps::Meet::V2::SpacesService::Client.new do |config|
78
+ config.logger = Logger.new "my-app.log"
68
79
  end
69
80
  ```
70
81
 
71
-
72
82
  ## Google Cloud Samples
73
83
 
74
84
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -217,8 +217,28 @@ module Google
217
217
  universe_domain: @config.universe_domain,
218
218
  channel_args: @config.channel_args,
219
219
  interceptors: @config.interceptors,
220
- channel_pool_config: @config.channel_pool
220
+ channel_pool_config: @config.channel_pool,
221
+ logger: @config.logger
221
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
222
242
  end
223
243
 
224
244
  # Service calls
@@ -303,7 +323,6 @@ module Google
303
323
 
304
324
  @conference_records_service_stub.call_rpc :get_conference_record, request, options: options do |response, operation|
305
325
  yield response, operation if block_given?
306
- return response
307
326
  end
308
327
  rescue ::GRPC::BadStatus => e
309
328
  raise ::Google::Cloud::Error.from_error(e)
@@ -403,7 +422,7 @@ module Google
403
422
  @conference_records_service_stub.call_rpc :list_conference_records, request, options: options do |response, operation|
404
423
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_conference_records, request, response, operation, options
405
424
  yield response, operation if block_given?
406
- return response
425
+ throw :response, response
407
426
  end
408
427
  rescue ::GRPC::BadStatus => e
409
428
  raise ::Google::Cloud::Error.from_error(e)
@@ -489,7 +508,6 @@ module Google
489
508
 
490
509
  @conference_records_service_stub.call_rpc :get_participant, request, options: options do |response, operation|
491
510
  yield response, operation if block_given?
492
- return response
493
511
  end
494
512
  rescue ::GRPC::BadStatus => e
495
513
  raise ::Google::Cloud::Error.from_error(e)
@@ -602,7 +620,7 @@ module Google
602
620
  @conference_records_service_stub.call_rpc :list_participants, request, options: options do |response, operation|
603
621
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_participants, request, response, operation, options
604
622
  yield response, operation if block_given?
605
- return response
623
+ throw :response, response
606
624
  end
607
625
  rescue ::GRPC::BadStatus => e
608
626
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,7 +706,6 @@ module Google
688
706
 
689
707
  @conference_records_service_stub.call_rpc :get_participant_session, request, options: options do |response, operation|
690
708
  yield response, operation if block_given?
691
- return response
692
709
  end
693
710
  rescue ::GRPC::BadStatus => e
694
711
  raise ::Google::Cloud::Error.from_error(e)
@@ -801,7 +818,7 @@ module Google
801
818
  @conference_records_service_stub.call_rpc :list_participant_sessions, request, options: options do |response, operation|
802
819
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_participant_sessions, request, response, operation, options
803
820
  yield response, operation if block_given?
804
- return response
821
+ throw :response, response
805
822
  end
806
823
  rescue ::GRPC::BadStatus => e
807
824
  raise ::Google::Cloud::Error.from_error(e)
@@ -887,7 +904,6 @@ module Google
887
904
 
888
905
  @conference_records_service_stub.call_rpc :get_recording, request, options: options do |response, operation|
889
906
  yield response, operation if block_given?
890
- return response
891
907
  end
892
908
  rescue ::GRPC::BadStatus => e
893
909
  raise ::Google::Cloud::Error.from_error(e)
@@ -987,7 +1003,7 @@ module Google
987
1003
  @conference_records_service_stub.call_rpc :list_recordings, request, options: options do |response, operation|
988
1004
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_recordings, request, response, operation, options
989
1005
  yield response, operation if block_given?
990
- return response
1006
+ throw :response, response
991
1007
  end
992
1008
  rescue ::GRPC::BadStatus => e
993
1009
  raise ::Google::Cloud::Error.from_error(e)
@@ -1073,7 +1089,6 @@ module Google
1073
1089
 
1074
1090
  @conference_records_service_stub.call_rpc :get_transcript, request, options: options do |response, operation|
1075
1091
  yield response, operation if block_given?
1076
- return response
1077
1092
  end
1078
1093
  rescue ::GRPC::BadStatus => e
1079
1094
  raise ::Google::Cloud::Error.from_error(e)
@@ -1173,7 +1188,7 @@ module Google
1173
1188
  @conference_records_service_stub.call_rpc :list_transcripts, request, options: options do |response, operation|
1174
1189
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_transcripts, request, response, operation, options
1175
1190
  yield response, operation if block_given?
1176
- return response
1191
+ throw :response, response
1177
1192
  end
1178
1193
  rescue ::GRPC::BadStatus => e
1179
1194
  raise ::Google::Cloud::Error.from_error(e)
@@ -1263,7 +1278,6 @@ module Google
1263
1278
 
1264
1279
  @conference_records_service_stub.call_rpc :get_transcript_entry, request, options: options do |response, operation|
1265
1280
  yield response, operation if block_given?
1266
- return response
1267
1281
  end
1268
1282
  rescue ::GRPC::BadStatus => e
1269
1283
  raise ::Google::Cloud::Error.from_error(e)
@@ -1368,7 +1382,7 @@ module Google
1368
1382
  @conference_records_service_stub.call_rpc :list_transcript_entries, request, options: options do |response, operation|
1369
1383
  response = ::Gapic::PagedEnumerable.new @conference_records_service_stub, :list_transcript_entries, request, response, operation, options
1370
1384
  yield response, operation if block_given?
1371
- return response
1385
+ throw :response, response
1372
1386
  end
1373
1387
  rescue ::GRPC::BadStatus => e
1374
1388
  raise ::Google::Cloud::Error.from_error(e)
@@ -1457,6 +1471,11 @@ module Google
1457
1471
  # default endpoint URL. The default value of nil uses the environment
1458
1472
  # universe (usually the default "googleapis.com" universe).
1459
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]
1460
1479
  #
1461
1480
  class Configuration
1462
1481
  extend ::Gapic::Config
@@ -1481,6 +1500,7 @@ module Google
1481
1500
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1482
1501
  config_attr :quota_project, nil, ::String, nil
1483
1502
  config_attr :universe_domain, nil, ::String, nil
1503
+ config_attr :logger, :default, ::Logger, nil, :default
1484
1504
 
1485
1505
  # @private
1486
1506
  def initialize parent_config = nil
@@ -210,8 +210,28 @@ module Google
210
210
  endpoint: @config.endpoint,
211
211
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
212
212
  universe_domain: @config.universe_domain,
213
- credentials: credentials
213
+ credentials: credentials,
214
+ logger: @config.logger
214
215
  )
216
+
217
+ @conference_records_service_stub.logger(stub: true)&.info do |entry|
218
+ entry.set_system_name
219
+ entry.set_service
220
+ entry.message = "Created client for #{entry.service}"
221
+ entry.set_credentials_fields credentials
222
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
223
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
224
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
225
+ end
226
+ end
227
+
228
+ ##
229
+ # The logger used for request/response debug logging.
230
+ #
231
+ # @return [Logger]
232
+ #
233
+ def logger
234
+ @conference_records_service_stub.logger
215
235
  end
216
236
 
217
237
  # Service calls
@@ -289,7 +309,6 @@ module Google
289
309
 
290
310
  @conference_records_service_stub.get_conference_record request, options do |result, operation|
291
311
  yield result, operation if block_given?
292
- return result
293
312
  end
294
313
  rescue ::Gapic::Rest::Error => e
295
314
  raise ::Google::Cloud::Error.from_error(e)
@@ -390,7 +409,7 @@ module Google
390
409
  @conference_records_service_stub.list_conference_records request, options do |result, operation|
391
410
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_conference_records, "conference_records", request, result, options
392
411
  yield result, operation if block_given?
393
- return result
412
+ throw :response, result
394
413
  end
395
414
  rescue ::Gapic::Rest::Error => e
396
415
  raise ::Google::Cloud::Error.from_error(e)
@@ -469,7 +488,6 @@ module Google
469
488
 
470
489
  @conference_records_service_stub.get_participant request, options do |result, operation|
471
490
  yield result, operation if block_given?
472
- return result
473
491
  end
474
492
  rescue ::Gapic::Rest::Error => e
475
493
  raise ::Google::Cloud::Error.from_error(e)
@@ -575,7 +593,7 @@ module Google
575
593
  @conference_records_service_stub.list_participants request, options do |result, operation|
576
594
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_participants, "participants", request, result, options
577
595
  yield result, operation if block_given?
578
- return result
596
+ throw :response, result
579
597
  end
580
598
  rescue ::Gapic::Rest::Error => e
581
599
  raise ::Google::Cloud::Error.from_error(e)
@@ -654,7 +672,6 @@ module Google
654
672
 
655
673
  @conference_records_service_stub.get_participant_session request, options do |result, operation|
656
674
  yield result, operation if block_given?
657
- return result
658
675
  end
659
676
  rescue ::Gapic::Rest::Error => e
660
677
  raise ::Google::Cloud::Error.from_error(e)
@@ -760,7 +777,7 @@ module Google
760
777
  @conference_records_service_stub.list_participant_sessions request, options do |result, operation|
761
778
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_participant_sessions, "participant_sessions", request, result, options
762
779
  yield result, operation if block_given?
763
- return result
780
+ throw :response, result
764
781
  end
765
782
  rescue ::Gapic::Rest::Error => e
766
783
  raise ::Google::Cloud::Error.from_error(e)
@@ -839,7 +856,6 @@ module Google
839
856
 
840
857
  @conference_records_service_stub.get_recording request, options do |result, operation|
841
858
  yield result, operation if block_given?
842
- return result
843
859
  end
844
860
  rescue ::Gapic::Rest::Error => e
845
861
  raise ::Google::Cloud::Error.from_error(e)
@@ -932,7 +948,7 @@ module Google
932
948
  @conference_records_service_stub.list_recordings request, options do |result, operation|
933
949
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_recordings, "recordings", request, result, options
934
950
  yield result, operation if block_given?
935
- return result
951
+ throw :response, result
936
952
  end
937
953
  rescue ::Gapic::Rest::Error => e
938
954
  raise ::Google::Cloud::Error.from_error(e)
@@ -1011,7 +1027,6 @@ module Google
1011
1027
 
1012
1028
  @conference_records_service_stub.get_transcript request, options do |result, operation|
1013
1029
  yield result, operation if block_given?
1014
- return result
1015
1030
  end
1016
1031
  rescue ::Gapic::Rest::Error => e
1017
1032
  raise ::Google::Cloud::Error.from_error(e)
@@ -1104,7 +1119,7 @@ module Google
1104
1119
  @conference_records_service_stub.list_transcripts request, options do |result, operation|
1105
1120
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_transcripts, "transcripts", request, result, options
1106
1121
  yield result, operation if block_given?
1107
- return result
1122
+ throw :response, result
1108
1123
  end
1109
1124
  rescue ::Gapic::Rest::Error => e
1110
1125
  raise ::Google::Cloud::Error.from_error(e)
@@ -1187,7 +1202,6 @@ module Google
1187
1202
 
1188
1203
  @conference_records_service_stub.get_transcript_entry request, options do |result, operation|
1189
1204
  yield result, operation if block_given?
1190
- return result
1191
1205
  end
1192
1206
  rescue ::Gapic::Rest::Error => e
1193
1207
  raise ::Google::Cloud::Error.from_error(e)
@@ -1285,7 +1299,7 @@ module Google
1285
1299
  @conference_records_service_stub.list_transcript_entries request, options do |result, operation|
1286
1300
  result = ::Gapic::Rest::PagedEnumerable.new @conference_records_service_stub, :list_transcript_entries, "transcript_entries", request, result, options
1287
1301
  yield result, operation if block_given?
1288
- return result
1302
+ throw :response, result
1289
1303
  end
1290
1304
  rescue ::Gapic::Rest::Error => e
1291
1305
  raise ::Google::Cloud::Error.from_error(e)
@@ -1365,6 +1379,11 @@ module Google
1365
1379
  # default endpoint URL. The default value of nil uses the environment
1366
1380
  # universe (usually the default "googleapis.com" universe).
1367
1381
  # @return [::String,nil]
1382
+ # @!attribute [rw] logger
1383
+ # A custom logger to use for request/response debug logging, or the value
1384
+ # `:default` (the default) to construct a default logger, or `nil` to
1385
+ # explicitly disable logging.
1386
+ # @return [::Logger,:default,nil]
1368
1387
  #
1369
1388
  class Configuration
1370
1389
  extend ::Gapic::Config
@@ -1386,6 +1405,7 @@ module Google
1386
1405
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1387
1406
  config_attr :quota_project, nil, ::String, nil
1388
1407
  config_attr :universe_domain, nil, ::String, nil
1408
+ config_attr :logger, :default, ::Logger, nil, :default
1389
1409
 
1390
1410
  # @private
1391
1411
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the get_conference_record REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "get_conference_record",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Apps::Meet::V2::ConferenceRecord.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "list_conference_records",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Apps::Meet::V2::ListConferenceRecordsResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "get_participant",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Apps::Meet::V2::Participant.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "list_participants",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Apps::Meet::V2::ListParticipantsResponse.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "get_participant_session",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Apps::Meet::V2::ParticipantSession.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "list_participant_sessions",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Apps::Meet::V2::ListParticipantSessionsResponse.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "get_recording",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Apps::Meet::V2::Recording.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "list_recordings",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Apps::Meet::V2::ListRecordingsResponse.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -391,16 +419,18 @@ module Google
391
419
 
392
420
  response = @client_stub.make_http_request(
393
421
  verb,
394
- uri: uri,
395
- body: body || "",
396
- params: query_string_params,
422
+ uri: uri,
423
+ body: body || "",
424
+ params: query_string_params,
425
+ method_name: "get_transcript",
397
426
  options: options
398
427
  )
399
428
  operation = ::Gapic::Rest::TransportOperation.new response
400
429
  result = ::Google::Apps::Meet::V2::Transcript.decode_json response.body, ignore_unknown_fields: true
401
-
402
- yield result, operation if block_given?
403
- result
430
+ catch :response do
431
+ yield result, operation if block_given?
432
+ result
433
+ end
404
434
  end
405
435
 
406
436
  ##
@@ -429,16 +459,18 @@ module Google
429
459
 
430
460
  response = @client_stub.make_http_request(
431
461
  verb,
432
- uri: uri,
433
- body: body || "",
434
- params: query_string_params,
462
+ uri: uri,
463
+ body: body || "",
464
+ params: query_string_params,
465
+ method_name: "list_transcripts",
435
466
  options: options
436
467
  )
437
468
  operation = ::Gapic::Rest::TransportOperation.new response
438
469
  result = ::Google::Apps::Meet::V2::ListTranscriptsResponse.decode_json response.body, ignore_unknown_fields: true
439
-
440
- yield result, operation if block_given?
441
- result
470
+ catch :response do
471
+ yield result, operation if block_given?
472
+ result
473
+ end
442
474
  end
443
475
 
444
476
  ##
@@ -467,16 +499,18 @@ module Google
467
499
 
468
500
  response = @client_stub.make_http_request(
469
501
  verb,
470
- uri: uri,
471
- body: body || "",
472
- params: query_string_params,
502
+ uri: uri,
503
+ body: body || "",
504
+ params: query_string_params,
505
+ method_name: "get_transcript_entry",
473
506
  options: options
474
507
  )
475
508
  operation = ::Gapic::Rest::TransportOperation.new response
476
509
  result = ::Google::Apps::Meet::V2::TranscriptEntry.decode_json response.body, ignore_unknown_fields: true
477
-
478
- yield result, operation if block_given?
479
- result
510
+ catch :response do
511
+ yield result, operation if block_given?
512
+ result
513
+ end
480
514
  end
481
515
 
482
516
  ##
@@ -505,16 +539,18 @@ module Google
505
539
 
506
540
  response = @client_stub.make_http_request(
507
541
  verb,
508
- uri: uri,
509
- body: body || "",
510
- params: query_string_params,
542
+ uri: uri,
543
+ body: body || "",
544
+ params: query_string_params,
545
+ method_name: "list_transcript_entries",
511
546
  options: options
512
547
  )
513
548
  operation = ::Gapic::Rest::TransportOperation.new response
514
549
  result = ::Google::Apps::Meet::V2::ListTranscriptEntriesResponse.decode_json response.body, ignore_unknown_fields: true
515
-
516
- yield result, operation if block_given?
517
- result
550
+ catch :response do
551
+ yield result, operation if block_given?
552
+ result
553
+ end
518
554
  end
519
555
 
520
556
  ##
@@ -168,8 +168,28 @@ module Google
168
168
  universe_domain: @config.universe_domain,
169
169
  channel_args: @config.channel_args,
170
170
  interceptors: @config.interceptors,
171
- channel_pool_config: @config.channel_pool
171
+ channel_pool_config: @config.channel_pool,
172
+ logger: @config.logger
172
173
  )
174
+
175
+ @spaces_service_stub.stub_logger&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+ end
185
+
186
+ ##
187
+ # The logger used for request/response debug logging.
188
+ #
189
+ # @return [Logger]
190
+ #
191
+ def logger
192
+ @spaces_service_stub.logger
173
193
  end
174
194
 
175
195
  # Service calls
@@ -247,7 +267,6 @@ module Google
247
267
 
248
268
  @spaces_service_stub.call_rpc :create_space, request, options: options do |response, operation|
249
269
  yield response, operation if block_given?
250
- return response
251
270
  end
252
271
  rescue ::GRPC::BadStatus => e
253
272
  raise ::Google::Cloud::Error.from_error(e)
@@ -333,7 +352,6 @@ module Google
333
352
 
334
353
  @spaces_service_stub.call_rpc :get_space, request, options: options do |response, operation|
335
354
  yield response, operation if block_given?
336
- return response
337
355
  end
338
356
  rescue ::GRPC::BadStatus => e
339
357
  raise ::Google::Cloud::Error.from_error(e)
@@ -424,7 +442,6 @@ module Google
424
442
 
425
443
  @spaces_service_stub.call_rpc :update_space, request, options: options do |response, operation|
426
444
  yield response, operation if block_given?
427
- return response
428
445
  end
429
446
  rescue ::GRPC::BadStatus => e
430
447
  raise ::Google::Cloud::Error.from_error(e)
@@ -510,7 +527,6 @@ module Google
510
527
 
511
528
  @spaces_service_stub.call_rpc :end_active_conference, request, options: options do |response, operation|
512
529
  yield response, operation if block_given?
513
- return response
514
530
  end
515
531
  rescue ::GRPC::BadStatus => e
516
532
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,6 +615,11 @@ module Google
599
615
  # default endpoint URL. The default value of nil uses the environment
600
616
  # universe (usually the default "googleapis.com" universe).
601
617
  # @return [::String,nil]
618
+ # @!attribute [rw] logger
619
+ # A custom logger to use for request/response debug logging, or the value
620
+ # `:default` (the default) to construct a default logger, or `nil` to
621
+ # explicitly disable logging.
622
+ # @return [::Logger,:default,nil]
602
623
  #
603
624
  class Configuration
604
625
  extend ::Gapic::Config
@@ -623,6 +644,7 @@ module Google
623
644
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
624
645
  config_attr :quota_project, nil, ::String, nil
625
646
  config_attr :universe_domain, nil, ::String, nil
647
+ config_attr :logger, :default, ::Logger, nil, :default
626
648
 
627
649
  # @private
628
650
  def initialize parent_config = nil
@@ -161,8 +161,28 @@ module Google
161
161
  endpoint: @config.endpoint,
162
162
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
163
  universe_domain: @config.universe_domain,
164
- credentials: credentials
164
+ credentials: credentials,
165
+ logger: @config.logger
165
166
  )
167
+
168
+ @spaces_service_stub.logger(stub: true)&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+ end
178
+
179
+ ##
180
+ # The logger used for request/response debug logging.
181
+ #
182
+ # @return [Logger]
183
+ #
184
+ def logger
185
+ @spaces_service_stub.logger
166
186
  end
167
187
 
168
188
  # Service calls
@@ -241,7 +261,6 @@ module Google
241
261
 
242
262
  @spaces_service_stub.create_space request, options do |result, operation|
243
263
  yield result, operation if block_given?
244
- return result
245
264
  end
246
265
  rescue ::Gapic::Rest::Error => e
247
266
  raise ::Google::Cloud::Error.from_error(e)
@@ -320,7 +339,6 @@ module Google
320
339
 
321
340
  @spaces_service_stub.get_space request, options do |result, operation|
322
341
  yield result, operation if block_given?
323
- return result
324
342
  end
325
343
  rescue ::Gapic::Rest::Error => e
326
344
  raise ::Google::Cloud::Error.from_error(e)
@@ -404,7 +422,6 @@ module Google
404
422
 
405
423
  @spaces_service_stub.update_space request, options do |result, operation|
406
424
  yield result, operation if block_given?
407
- return result
408
425
  end
409
426
  rescue ::Gapic::Rest::Error => e
410
427
  raise ::Google::Cloud::Error.from_error(e)
@@ -483,7 +500,6 @@ module Google
483
500
 
484
501
  @spaces_service_stub.end_active_conference request, options do |result, operation|
485
502
  yield result, operation if block_given?
486
- return result
487
503
  end
488
504
  rescue ::Gapic::Rest::Error => e
489
505
  raise ::Google::Cloud::Error.from_error(e)
@@ -563,6 +579,11 @@ module Google
563
579
  # default endpoint URL. The default value of nil uses the environment
564
580
  # universe (usually the default "googleapis.com" universe).
565
581
  # @return [::String,nil]
582
+ # @!attribute [rw] logger
583
+ # A custom logger to use for request/response debug logging, or the value
584
+ # `:default` (the default) to construct a default logger, or `nil` to
585
+ # explicitly disable logging.
586
+ # @return [::Logger,:default,nil]
566
587
  #
567
588
  class Configuration
568
589
  extend ::Gapic::Config
@@ -584,6 +605,7 @@ module Google
584
605
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
585
606
  config_attr :quota_project, nil, ::String, nil
586
607
  config_attr :universe_domain, nil, ::String, nil
608
+ config_attr :logger, :default, ::Logger, nil, :default
587
609
 
588
610
  # @private
589
611
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the create_space REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "create_space",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Apps::Meet::V2::Space.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_space",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Apps::Meet::V2::Space.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "update_space",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Apps::Meet::V2::Space.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "end_active_conference",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Apps
22
22
  module Meet
23
23
  module V2
24
- VERSION = "0.2.2"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apps-meet-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.1
19
+ version: 0.24.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.5.6
110
+ rubygems_version: 3.5.23
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Create and manage meetings in Google Meet.