google-cloud-logging-v2 1.0.1 → 1.2.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: 1de3582a8bd85aec173e931ee3aed5f7a6634ab07b6f7a63f202455691587679
4
- data.tar.gz: 4957efcc7cc799f645d254f7ea34e66bb0521baca763c081177a4d9105370dc7
3
+ metadata.gz: d35688bdb5faf0c721ea2944650ef5352f9395a1373ef4f7c300e480f66a602b
4
+ data.tar.gz: 6c05319ea01bd616ce0bb40e93c78de14ff5557f58f031db72fb15ac06105873
5
5
  SHA512:
6
- metadata.gz: 3cf5741ef24c1959e9a2baf38fb23ce1f3d78d3a6fe5f327c843ca6f7b8a924bd429bfc047afefbdeecd4ef69c60889c0857d8950bd02c905dd3a82cc1038ba6
7
- data.tar.gz: c3c5c08fa262e781aa8ce4691289909bb0ab2d02e15e342cfedc56af213535fbb1296d14146c7c322f40235f7f1daac5423e95411f8f05fae9c5e08360e93fd8
6
+ metadata.gz: 250e5c861afc3d7603b1182f8f9f74b89a7a21fbddb3b32b80ec738e53f6af43012bcfb74ecccfe0c4edb8727f32a04ca0edd13e357a00fb497dd6192718da3d
7
+ data.tar.gz: 06b536d5f9a194887a7fee3a8b958ac28241b105bdbb04e3e2292d3a93dbb43ce25b2f86e45e6bab6f9f5c6b43b65298c2832544166288ff995f7861cf86defb
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/logging)
44
44
  for general usage information.
45
45
 
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:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/logging/v2"
57
76
  require "logger"
58
77
 
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
78
+ client = ::Google::Cloud::Logging::V2::LoggingService::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
86
 
77
87
  ## Supported Ruby Versions
78
88
 
79
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
80
90
 
81
91
  Google provides official support for Ruby versions that are actively supported
82
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -205,8 +205,19 @@ module Google
205
205
  universe_domain: @config.universe_domain,
206
206
  channel_args: @config.channel_args,
207
207
  interceptors: @config.interceptors,
208
- channel_pool_config: @config.channel_pool
208
+ channel_pool_config: @config.channel_pool,
209
+ logger: @config.logger
209
210
  )
211
+
212
+ @config_service_stub.stub_logger&.info do |entry|
213
+ entry.set_system_name
214
+ entry.set_service
215
+ entry.message = "Created client for #{entry.service}"
216
+ entry.set_credentials_fields credentials
217
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
218
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
219
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
220
+ end
210
221
  end
211
222
 
212
223
  ##
@@ -216,6 +227,15 @@ module Google
216
227
  #
217
228
  attr_reader :operations_client
218
229
 
230
+ ##
231
+ # The logger used for request/response debug logging.
232
+ #
233
+ # @return [Logger]
234
+ #
235
+ def logger
236
+ @config_service_stub.logger
237
+ end
238
+
219
239
  # Service calls
220
240
 
221
241
  ##
@@ -321,7 +341,7 @@ module Google
321
341
  @config_service_stub.call_rpc :list_buckets, request, options: options do |response, operation|
322
342
  response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_buckets, request, response, operation, options
323
343
  yield response, operation if block_given?
324
- return response
344
+ throw :response, response
325
345
  end
326
346
  rescue ::GRPC::BadStatus => e
327
347
  raise ::Google::Cloud::Error.from_error(e)
@@ -416,7 +436,6 @@ module Google
416
436
 
417
437
  @config_service_stub.call_rpc :get_bucket, request, options: options do |response, operation|
418
438
  yield response, operation if block_given?
419
- return response
420
439
  end
421
440
  rescue ::GRPC::BadStatus => e
422
441
  raise ::Google::Cloud::Error.from_error(e)
@@ -526,7 +545,7 @@ module Google
526
545
  @config_service_stub.call_rpc :create_bucket_async, request, options: options do |response, operation|
527
546
  response = ::Gapic::Operation.new response, @operations_client, options: options
528
547
  yield response, operation if block_given?
529
- return response
548
+ throw :response, response
530
549
  end
531
550
  rescue ::GRPC::BadStatus => e
532
551
  raise ::Google::Cloud::Error.from_error(e)
@@ -645,7 +664,7 @@ module Google
645
664
  @config_service_stub.call_rpc :update_bucket_async, request, options: options do |response, operation|
646
665
  response = ::Gapic::Operation.new response, @operations_client, options: options
647
666
  yield response, operation if block_given?
648
- return response
667
+ throw :response, response
649
668
  end
650
669
  rescue ::GRPC::BadStatus => e
651
670
  raise ::Google::Cloud::Error.from_error(e)
@@ -746,7 +765,6 @@ module Google
746
765
 
747
766
  @config_service_stub.call_rpc :create_bucket, request, options: options do |response, operation|
748
767
  yield response, operation if block_given?
749
- return response
750
768
  end
751
769
  rescue ::GRPC::BadStatus => e
752
770
  raise ::Google::Cloud::Error.from_error(e)
@@ -857,7 +875,6 @@ module Google
857
875
 
858
876
  @config_service_stub.call_rpc :update_bucket, request, options: options do |response, operation|
859
877
  yield response, operation if block_given?
860
- return response
861
878
  end
862
879
  rescue ::GRPC::BadStatus => e
863
880
  raise ::Google::Cloud::Error.from_error(e)
@@ -956,7 +973,6 @@ module Google
956
973
 
957
974
  @config_service_stub.call_rpc :delete_bucket, request, options: options do |response, operation|
958
975
  yield response, operation if block_given?
959
- return response
960
976
  end
961
977
  rescue ::GRPC::BadStatus => e
962
978
  raise ::Google::Cloud::Error.from_error(e)
@@ -1052,7 +1068,6 @@ module Google
1052
1068
 
1053
1069
  @config_service_stub.call_rpc :undelete_bucket, request, options: options do |response, operation|
1054
1070
  yield response, operation if block_given?
1055
- return response
1056
1071
  end
1057
1072
  rescue ::GRPC::BadStatus => e
1058
1073
  raise ::Google::Cloud::Error.from_error(e)
@@ -1155,7 +1170,7 @@ module Google
1155
1170
  @config_service_stub.call_rpc :list_views, request, options: options do |response, operation|
1156
1171
  response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_views, request, response, operation, options
1157
1172
  yield response, operation if block_given?
1158
- return response
1173
+ throw :response, response
1159
1174
  end
1160
1175
  rescue ::GRPC::BadStatus => e
1161
1176
  raise ::Google::Cloud::Error.from_error(e)
@@ -1247,7 +1262,6 @@ module Google
1247
1262
 
1248
1263
  @config_service_stub.call_rpc :get_view, request, options: options do |response, operation|
1249
1264
  yield response, operation if block_given?
1250
- return response
1251
1265
  end
1252
1266
  rescue ::GRPC::BadStatus => e
1253
1267
  raise ::Google::Cloud::Error.from_error(e)
@@ -1346,7 +1360,6 @@ module Google
1346
1360
 
1347
1361
  @config_service_stub.call_rpc :create_view, request, options: options do |response, operation|
1348
1362
  yield response, operation if block_given?
1349
- return response
1350
1363
  end
1351
1364
  rescue ::GRPC::BadStatus => e
1352
1365
  raise ::Google::Cloud::Error.from_error(e)
@@ -1453,7 +1466,6 @@ module Google
1453
1466
 
1454
1467
  @config_service_stub.call_rpc :update_view, request, options: options do |response, operation|
1455
1468
  yield response, operation if block_given?
1456
- return response
1457
1469
  end
1458
1470
  rescue ::GRPC::BadStatus => e
1459
1471
  raise ::Google::Cloud::Error.from_error(e)
@@ -1548,7 +1560,6 @@ module Google
1548
1560
 
1549
1561
  @config_service_stub.call_rpc :delete_view, request, options: options do |response, operation|
1550
1562
  yield response, operation if block_given?
1551
- return response
1552
1563
  end
1553
1564
  rescue ::GRPC::BadStatus => e
1554
1565
  raise ::Google::Cloud::Error.from_error(e)
@@ -1653,7 +1664,7 @@ module Google
1653
1664
  @config_service_stub.call_rpc :list_sinks, request, options: options do |response, operation|
1654
1665
  response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_sinks, request, response, operation, options
1655
1666
  yield response, operation if block_given?
1656
- return response
1667
+ throw :response, response
1657
1668
  end
1658
1669
  rescue ::GRPC::BadStatus => e
1659
1670
  raise ::Google::Cloud::Error.from_error(e)
@@ -1748,7 +1759,6 @@ module Google
1748
1759
 
1749
1760
  @config_service_stub.call_rpc :get_sink, request, options: options do |response, operation|
1750
1761
  yield response, operation if block_given?
1751
- return response
1752
1762
  end
1753
1763
  rescue ::GRPC::BadStatus => e
1754
1764
  raise ::Google::Cloud::Error.from_error(e)
@@ -1863,7 +1873,6 @@ module Google
1863
1873
 
1864
1874
  @config_service_stub.call_rpc :create_sink, request, options: options do |response, operation|
1865
1875
  yield response, operation if block_given?
1866
- return response
1867
1876
  end
1868
1877
  rescue ::GRPC::BadStatus => e
1869
1878
  raise ::Google::Cloud::Error.from_error(e)
@@ -1995,7 +2004,6 @@ module Google
1995
2004
 
1996
2005
  @config_service_stub.call_rpc :update_sink, request, options: options do |response, operation|
1997
2006
  yield response, operation if block_given?
1998
- return response
1999
2007
  end
2000
2008
  rescue ::GRPC::BadStatus => e
2001
2009
  raise ::Google::Cloud::Error.from_error(e)
@@ -2092,7 +2100,6 @@ module Google
2092
2100
 
2093
2101
  @config_service_stub.call_rpc :delete_sink, request, options: options do |response, operation|
2094
2102
  yield response, operation if block_given?
2095
- return response
2096
2103
  end
2097
2104
  rescue ::GRPC::BadStatus => e
2098
2105
  raise ::Google::Cloud::Error.from_error(e)
@@ -2199,7 +2206,7 @@ module Google
2199
2206
  @config_service_stub.call_rpc :create_link, request, options: options do |response, operation|
2200
2207
  response = ::Gapic::Operation.new response, @operations_client, options: options
2201
2208
  yield response, operation if block_given?
2202
- return response
2209
+ throw :response, response
2203
2210
  end
2204
2211
  rescue ::GRPC::BadStatus => e
2205
2212
  raise ::Google::Cloud::Error.from_error(e)
@@ -2299,7 +2306,7 @@ module Google
2299
2306
  @config_service_stub.call_rpc :delete_link, request, options: options do |response, operation|
2300
2307
  response = ::Gapic::Operation.new response, @operations_client, options: options
2301
2308
  yield response, operation if block_given?
2302
- return response
2309
+ throw :response, response
2303
2310
  end
2304
2311
  rescue ::GRPC::BadStatus => e
2305
2312
  raise ::Google::Cloud::Error.from_error(e)
@@ -2401,7 +2408,7 @@ module Google
2401
2408
  @config_service_stub.call_rpc :list_links, request, options: options do |response, operation|
2402
2409
  response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_links, request, response, operation, options
2403
2410
  yield response, operation if block_given?
2404
- return response
2411
+ throw :response, response
2405
2412
  end
2406
2413
  rescue ::GRPC::BadStatus => e
2407
2414
  raise ::Google::Cloud::Error.from_error(e)
@@ -2492,7 +2499,6 @@ module Google
2492
2499
 
2493
2500
  @config_service_stub.call_rpc :get_link, request, options: options do |response, operation|
2494
2501
  yield response, operation if block_given?
2495
- return response
2496
2502
  end
2497
2503
  rescue ::GRPC::BadStatus => e
2498
2504
  raise ::Google::Cloud::Error.from_error(e)
@@ -2597,7 +2603,7 @@ module Google
2597
2603
  @config_service_stub.call_rpc :list_exclusions, request, options: options do |response, operation|
2598
2604
  response = ::Gapic::PagedEnumerable.new @config_service_stub, :list_exclusions, request, response, operation, options
2599
2605
  yield response, operation if block_given?
2600
- return response
2606
+ throw :response, response
2601
2607
  end
2602
2608
  rescue ::GRPC::BadStatus => e
2603
2609
  raise ::Google::Cloud::Error.from_error(e)
@@ -2692,7 +2698,6 @@ module Google
2692
2698
 
2693
2699
  @config_service_stub.call_rpc :get_exclusion, request, options: options do |response, operation|
2694
2700
  yield response, operation if block_given?
2695
- return response
2696
2701
  end
2697
2702
  rescue ::GRPC::BadStatus => e
2698
2703
  raise ::Google::Cloud::Error.from_error(e)
@@ -2793,7 +2798,6 @@ module Google
2793
2798
 
2794
2799
  @config_service_stub.call_rpc :create_exclusion, request, options: options do |response, operation|
2795
2800
  yield response, operation if block_given?
2796
- return response
2797
2801
  end
2798
2802
  rescue ::GRPC::BadStatus => e
2799
2803
  raise ::Google::Cloud::Error.from_error(e)
@@ -2901,7 +2905,6 @@ module Google
2901
2905
 
2902
2906
  @config_service_stub.call_rpc :update_exclusion, request, options: options do |response, operation|
2903
2907
  yield response, operation if block_given?
2904
- return response
2905
2908
  end
2906
2909
  rescue ::GRPC::BadStatus => e
2907
2910
  raise ::Google::Cloud::Error.from_error(e)
@@ -2996,7 +2999,6 @@ module Google
2996
2999
 
2997
3000
  @config_service_stub.call_rpc :delete_exclusion, request, options: options do |response, operation|
2998
3001
  yield response, operation if block_given?
2999
- return response
3000
3002
  end
3001
3003
  rescue ::GRPC::BadStatus => e
3002
3004
  raise ::Google::Cloud::Error.from_error(e)
@@ -3105,7 +3107,6 @@ module Google
3105
3107
 
3106
3108
  @config_service_stub.call_rpc :get_cmek_settings, request, options: options do |response, operation|
3107
3109
  yield response, operation if block_given?
3108
- return response
3109
3110
  end
3110
3111
  rescue ::GRPC::BadStatus => e
3111
3112
  raise ::Google::Cloud::Error.from_error(e)
@@ -3232,7 +3233,6 @@ module Google
3232
3233
 
3233
3234
  @config_service_stub.call_rpc :update_cmek_settings, request, options: options do |response, operation|
3234
3235
  yield response, operation if block_given?
3235
- return response
3236
3236
  end
3237
3237
  rescue ::GRPC::BadStatus => e
3238
3238
  raise ::Google::Cloud::Error.from_error(e)
@@ -3341,7 +3341,6 @@ module Google
3341
3341
 
3342
3342
  @config_service_stub.call_rpc :get_settings, request, options: options do |response, operation|
3343
3343
  yield response, operation if block_given?
3344
- return response
3345
3344
  end
3346
3345
  rescue ::GRPC::BadStatus => e
3347
3346
  raise ::Google::Cloud::Error.from_error(e)
@@ -3466,7 +3465,6 @@ module Google
3466
3465
 
3467
3466
  @config_service_stub.call_rpc :update_settings, request, options: options do |response, operation|
3468
3467
  yield response, operation if block_given?
3469
- return response
3470
3468
  end
3471
3469
  rescue ::GRPC::BadStatus => e
3472
3470
  raise ::Google::Cloud::Error.from_error(e)
@@ -3561,7 +3559,7 @@ module Google
3561
3559
  @config_service_stub.call_rpc :copy_log_entries, request, options: options do |response, operation|
3562
3560
  response = ::Gapic::Operation.new response, @operations_client, options: options
3563
3561
  yield response, operation if block_given?
3564
- return response
3562
+ throw :response, response
3565
3563
  end
3566
3564
  rescue ::GRPC::BadStatus => e
3567
3565
  raise ::Google::Cloud::Error.from_error(e)
@@ -3611,6 +3609,13 @@ module Google
3611
3609
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3612
3610
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3613
3611
  # * (`nil`) indicating no credentials
3612
+ #
3613
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3614
+ # external source for authentication to Google Cloud, you must validate it before
3615
+ # providing it to a Google API client library. Providing an unvalidated credential
3616
+ # configuration to Google APIs can compromise the security of your systems and data.
3617
+ # For more information, refer to [Validate credential configurations from external
3618
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3614
3619
  # @return [::Object]
3615
3620
  # @!attribute [rw] scope
3616
3621
  # The OAuth scopes
@@ -3650,6 +3655,11 @@ module Google
3650
3655
  # default endpoint URL. The default value of nil uses the environment
3651
3656
  # universe (usually the default "googleapis.com" universe).
3652
3657
  # @return [::String,nil]
3658
+ # @!attribute [rw] logger
3659
+ # A custom logger to use for request/response debug logging, or the value
3660
+ # `:default` (the default) to construct a default logger, or `nil` to
3661
+ # explicitly disable logging.
3662
+ # @return [::Logger,:default,nil]
3653
3663
  #
3654
3664
  class Configuration
3655
3665
  extend ::Gapic::Config
@@ -3674,6 +3684,7 @@ module Google
3674
3684
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3675
3685
  config_attr :quota_project, nil, ::String, nil
3676
3686
  config_attr :universe_domain, nil, ::String, nil
3687
+ config_attr :logger, :default, ::Logger, nil, :default
3677
3688
 
3678
3689
  # @private
3679
3690
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -649,6 +640,13 @@ module Google
649
640
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
650
641
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
651
642
  # * (`nil`) indicating no credentials
643
+ #
644
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
645
+ # external source for authentication to Google Cloud, you must validate it before
646
+ # providing it to a Google API client library. Providing an unvalidated credential
647
+ # configuration to Google APIs can compromise the security of your systems and data.
648
+ # For more information, refer to [Validate credential configurations from external
649
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
652
650
  # @return [::Object]
653
651
  # @!attribute [rw] scope
654
652
  # The OAuth scopes
@@ -688,6 +686,11 @@ module Google
688
686
  # default endpoint URL. The default value of nil uses the environment
689
687
  # universe (usually the default "googleapis.com" universe).
690
688
  # @return [::String,nil]
689
+ # @!attribute [rw] logger
690
+ # A custom logger to use for request/response debug logging, or the value
691
+ # `:default` (the default) to construct a default logger, or `nil` to
692
+ # explicitly disable logging.
693
+ # @return [::Logger,:default,nil]
691
694
  #
692
695
  class Configuration
693
696
  extend ::Gapic::Config
@@ -712,6 +715,7 @@ module Google
712
715
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
716
  config_attr :quota_project, nil, ::String, nil
714
717
  config_attr :universe_domain, nil, ::String, nil
718
+ config_attr :logger, :default, ::Logger, nil, :default
715
719
 
716
720
  # @private
717
721
  def initialize parent_config = nil
@@ -187,8 +187,28 @@ module Google
187
187
  universe_domain: @config.universe_domain,
188
188
  channel_args: @config.channel_args,
189
189
  interceptors: @config.interceptors,
190
- channel_pool_config: @config.channel_pool
190
+ channel_pool_config: @config.channel_pool,
191
+ logger: @config.logger
191
192
  )
193
+
194
+ @logging_service_stub.stub_logger&.info do |entry|
195
+ entry.set_system_name
196
+ entry.set_service
197
+ entry.message = "Created client for #{entry.service}"
198
+ entry.set_credentials_fields credentials
199
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
200
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
201
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
202
+ end
203
+ end
204
+
205
+ ##
206
+ # The logger used for request/response debug logging.
207
+ #
208
+ # @return [Logger]
209
+ #
210
+ def logger
211
+ @logging_service_stub.logger
192
212
  end
193
213
 
194
214
  # Service calls
@@ -288,7 +308,6 @@ module Google
288
308
 
289
309
  @logging_service_stub.call_rpc :delete_log, request, options: options do |response, operation|
290
310
  yield response, operation if block_given?
291
- return response
292
311
  end
293
312
  rescue ::GRPC::BadStatus => e
294
313
  raise ::Google::Cloud::Error.from_error(e)
@@ -439,7 +458,6 @@ module Google
439
458
 
440
459
  @logging_service_stub.call_rpc :write_log_entries, request, options: options do |response, operation|
441
460
  yield response, operation if block_given?
442
- return response
443
461
  end
444
462
  rescue ::GRPC::BadStatus => e
445
463
  raise ::Google::Cloud::Error.from_error(e)
@@ -564,7 +582,7 @@ module Google
564
582
  @logging_service_stub.call_rpc :list_log_entries, request, options: options do |response, operation|
565
583
  response = ::Gapic::PagedEnumerable.new @logging_service_stub, :list_log_entries, request, response, operation, options
566
584
  yield response, operation if block_given?
567
- return response
585
+ throw :response, response
568
586
  end
569
587
  rescue ::GRPC::BadStatus => e
570
588
  raise ::Google::Cloud::Error.from_error(e)
@@ -654,7 +672,7 @@ module Google
654
672
  @logging_service_stub.call_rpc :list_monitored_resource_descriptors, request, options: options do |response, operation|
655
673
  response = ::Gapic::PagedEnumerable.new @logging_service_stub, :list_monitored_resource_descriptors, request, response, operation, options
656
674
  yield response, operation if block_given?
657
- return response
675
+ throw :response, response
658
676
  end
659
677
  rescue ::GRPC::BadStatus => e
660
678
  raise ::Google::Cloud::Error.from_error(e)
@@ -771,7 +789,6 @@ module Google
771
789
 
772
790
  @logging_service_stub.call_rpc :list_logs, request, options: options do |response, operation|
773
791
  yield response, operation if block_given?
774
- return response
775
792
  end
776
793
  rescue ::GRPC::BadStatus => e
777
794
  raise ::Google::Cloud::Error.from_error(e)
@@ -851,7 +868,6 @@ module Google
851
868
 
852
869
  @logging_service_stub.call_rpc :tail_log_entries, request, options: options do |response, operation|
853
870
  yield response, operation if block_given?
854
- return response
855
871
  end
856
872
  rescue ::GRPC::BadStatus => e
857
873
  raise ::Google::Cloud::Error.from_error(e)
@@ -901,6 +917,13 @@ module Google
901
917
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
902
918
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
903
919
  # * (`nil`) indicating no credentials
920
+ #
921
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
922
+ # external source for authentication to Google Cloud, you must validate it before
923
+ # providing it to a Google API client library. Providing an unvalidated credential
924
+ # configuration to Google APIs can compromise the security of your systems and data.
925
+ # For more information, refer to [Validate credential configurations from external
926
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
904
927
  # @return [::Object]
905
928
  # @!attribute [rw] scope
906
929
  # The OAuth scopes
@@ -940,6 +963,11 @@ module Google
940
963
  # default endpoint URL. The default value of nil uses the environment
941
964
  # universe (usually the default "googleapis.com" universe).
942
965
  # @return [::String,nil]
966
+ # @!attribute [rw] logger
967
+ # A custom logger to use for request/response debug logging, or the value
968
+ # `:default` (the default) to construct a default logger, or `nil` to
969
+ # explicitly disable logging.
970
+ # @return [::Logger,:default,nil]
943
971
  #
944
972
  class Configuration
945
973
  extend ::Gapic::Config
@@ -964,6 +992,7 @@ module Google
964
992
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
965
993
  config_attr :quota_project, nil, ::String, nil
966
994
  config_attr :universe_domain, nil, ::String, nil
995
+ config_attr :logger, :default, ::Logger, nil, :default
967
996
 
968
997
  # @private
969
998
  def initialize parent_config = nil
@@ -179,8 +179,28 @@ module Google
179
179
  universe_domain: @config.universe_domain,
180
180
  channel_args: @config.channel_args,
181
181
  interceptors: @config.interceptors,
182
- channel_pool_config: @config.channel_pool
182
+ channel_pool_config: @config.channel_pool,
183
+ logger: @config.logger
183
184
  )
185
+
186
+ @metrics_service_stub.stub_logger&.info do |entry|
187
+ entry.set_system_name
188
+ entry.set_service
189
+ entry.message = "Created client for #{entry.service}"
190
+ entry.set_credentials_fields credentials
191
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
192
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
193
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
194
+ end
195
+ end
196
+
197
+ ##
198
+ # The logger used for request/response debug logging.
199
+ #
200
+ # @return [Logger]
201
+ #
202
+ def logger
203
+ @metrics_service_stub.logger
184
204
  end
185
205
 
186
206
  # Service calls
@@ -281,7 +301,7 @@ module Google
281
301
  @metrics_service_stub.call_rpc :list_log_metrics, request, options: options do |response, operation|
282
302
  response = ::Gapic::PagedEnumerable.new @metrics_service_stub, :list_log_metrics, request, response, operation, options
283
303
  yield response, operation if block_given?
284
- return response
304
+ throw :response, response
285
305
  end
286
306
  rescue ::GRPC::BadStatus => e
287
307
  raise ::Google::Cloud::Error.from_error(e)
@@ -369,7 +389,6 @@ module Google
369
389
 
370
390
  @metrics_service_stub.call_rpc :get_log_metric, request, options: options do |response, operation|
371
391
  yield response, operation if block_given?
372
- return response
373
392
  end
374
393
  rescue ::GRPC::BadStatus => e
375
394
  raise ::Google::Cloud::Error.from_error(e)
@@ -462,7 +481,6 @@ module Google
462
481
 
463
482
  @metrics_service_stub.call_rpc :create_log_metric, request, options: options do |response, operation|
464
483
  yield response, operation if block_given?
465
- return response
466
484
  end
467
485
  rescue ::GRPC::BadStatus => e
468
486
  raise ::Google::Cloud::Error.from_error(e)
@@ -556,7 +574,6 @@ module Google
556
574
 
557
575
  @metrics_service_stub.call_rpc :update_log_metric, request, options: options do |response, operation|
558
576
  yield response, operation if block_given?
559
- return response
560
577
  end
561
578
  rescue ::GRPC::BadStatus => e
562
579
  raise ::Google::Cloud::Error.from_error(e)
@@ -644,7 +661,6 @@ module Google
644
661
 
645
662
  @metrics_service_stub.call_rpc :delete_log_metric, request, options: options do |response, operation|
646
663
  yield response, operation if block_given?
647
- return response
648
664
  end
649
665
  rescue ::GRPC::BadStatus => e
650
666
  raise ::Google::Cloud::Error.from_error(e)
@@ -694,6 +710,13 @@ module Google
694
710
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
695
711
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
696
712
  # * (`nil`) indicating no credentials
713
+ #
714
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
715
+ # external source for authentication to Google Cloud, you must validate it before
716
+ # providing it to a Google API client library. Providing an unvalidated credential
717
+ # configuration to Google APIs can compromise the security of your systems and data.
718
+ # For more information, refer to [Validate credential configurations from external
719
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
697
720
  # @return [::Object]
698
721
  # @!attribute [rw] scope
699
722
  # The OAuth scopes
@@ -733,6 +756,11 @@ module Google
733
756
  # default endpoint URL. The default value of nil uses the environment
734
757
  # universe (usually the default "googleapis.com" universe).
735
758
  # @return [::String,nil]
759
+ # @!attribute [rw] logger
760
+ # A custom logger to use for request/response debug logging, or the value
761
+ # `:default` (the default) to construct a default logger, or `nil` to
762
+ # explicitly disable logging.
763
+ # @return [::Logger,:default,nil]
736
764
  #
737
765
  class Configuration
738
766
  extend ::Gapic::Config
@@ -757,6 +785,7 @@ module Google
757
785
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
758
786
  config_attr :quota_project, nil, ::String, nil
759
787
  config_attr :universe_domain, nil, ::String, nil
788
+ config_attr :logger, :default, ::Logger, nil, :default
760
789
 
761
790
  # @private
762
791
  def initialize parent_config = nil
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Logging
23
23
  module V2
24
- VERSION = "1.0.1"
24
+ VERSION = "1.2.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
@@ -115,12 +115,18 @@ module Google
115
115
  # @!attribute [rw] linear_buckets
116
116
  # @return [::Google::Api::Distribution::BucketOptions::Linear]
117
117
  # The linear bucket.
118
+ #
119
+ # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.
118
120
  # @!attribute [rw] exponential_buckets
119
121
  # @return [::Google::Api::Distribution::BucketOptions::Exponential]
120
122
  # The exponential buckets.
123
+ #
124
+ # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.
121
125
  # @!attribute [rw] explicit_buckets
122
126
  # @return [::Google::Api::Distribution::BucketOptions::Explicit]
123
127
  # The explicit buckets.
128
+ #
129
+ # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared.
124
130
  class BucketOptions
125
131
  include ::Google::Protobuf::MessageExts
126
132
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -200,9 +200,27 @@ module Google
200
200
  # The delay of data points caused by ingestion. Data points older than this
201
201
  # age are guaranteed to be ingested and available to be read, excluding
202
202
  # data loss due to errors.
203
+ # @!attribute [rw] time_series_resource_hierarchy_level
204
+ # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>]
205
+ # The scope of the timeseries data of the metric.
203
206
  class MetricDescriptorMetadata
204
207
  include ::Google::Protobuf::MessageExts
205
208
  extend ::Google::Protobuf::MessageExts::ClassMethods
209
+
210
+ # The resource hierarchy level of the timeseries data of a metric.
211
+ module TimeSeriesResourceHierarchyLevel
212
+ # Do not use this default value.
213
+ TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0
214
+
215
+ # Scopes a metric to a project.
216
+ PROJECT = 1
217
+
218
+ # Scopes a metric to an organization.
219
+ ORGANIZATION = 2
220
+
221
+ # Scopes a metric to a folder.
222
+ FOLDER = 3
223
+ end
206
224
  end
207
225
 
208
226
  # The kind of measurement. It describes how the data is reported.
@@ -64,13 +64,19 @@ module Google
64
64
  #
65
65
  # "type.googleapis.com/google.cloud.audit.AuditLog"
66
66
  # "type.googleapis.com/google.appengine.logging.v1.RequestLog"
67
+ #
68
+ # Note: The following fields are mutually exclusive: `proto_payload`, `text_payload`, `json_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
67
69
  # @!attribute [rw] text_payload
68
70
  # @return [::String]
69
71
  # The log entry payload, represented as a Unicode string (UTF-8).
72
+ #
73
+ # Note: The following fields are mutually exclusive: `text_payload`, `proto_payload`, `json_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
70
74
  # @!attribute [rw] json_payload
71
75
  # @return [::Google::Protobuf::Struct]
72
76
  # The log entry payload, represented as a structure that is
73
77
  # expressed as a JSON object.
78
+ #
79
+ # Note: The following fields are mutually exclusive: `json_payload`, `proto_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared.
74
80
  # @!attribute [rw] timestamp
75
81
  # @return [::Google::Protobuf::Timestamp]
76
82
  # Optional. The time the event described by the log entry occurred. This time
@@ -1416,9 +1416,13 @@ module Google
1416
1416
  # @!attribute [rw] create_bucket_request
1417
1417
  # @return [::Google::Cloud::Logging::V2::CreateBucketRequest]
1418
1418
  # LongRunningCreateBucket RPC request.
1419
+ #
1420
+ # Note: The following fields are mutually exclusive: `create_bucket_request`, `update_bucket_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1419
1421
  # @!attribute [rw] update_bucket_request
1420
1422
  # @return [::Google::Cloud::Logging::V2::UpdateBucketRequest]
1421
1423
  # LongRunningUpdateBucket RPC request.
1424
+ #
1425
+ # Note: The following fields are mutually exclusive: `update_bucket_request`, `create_bucket_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1422
1426
  class BucketMetadata
1423
1427
  include ::Google::Protobuf::MessageExts
1424
1428
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1437,9 +1441,13 @@ module Google
1437
1441
  # @!attribute [rw] create_link_request
1438
1442
  # @return [::Google::Cloud::Logging::V2::CreateLinkRequest]
1439
1443
  # CreateLink RPC request.
1444
+ #
1445
+ # Note: The following fields are mutually exclusive: `create_link_request`, `delete_link_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1440
1446
  # @!attribute [rw] delete_link_request
1441
1447
  # @return [::Google::Cloud::Logging::V2::DeleteLinkRequest]
1442
1448
  # DeleteLink RPC request.
1449
+ #
1450
+ # Note: The following fields are mutually exclusive: `delete_link_request`, `create_link_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1443
1451
  class LinkMetadata
1444
1452
  include ::Google::Protobuf::MessageExts
1445
1453
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -40,9 +40,11 @@ module Google
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
42
42
  # The error result of the operation in case of failure or cancellation.
43
+ #
44
+ # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
43
45
  # @!attribute [rw] response
44
46
  # @return [::Google::Protobuf::Any]
45
- # The normal response of the operation in case of success. If the original
47
+ # The normal, successful response of the operation. If the original
46
48
  # method returns no data on success, such as `Delete`, the response is
47
49
  # `google.protobuf.Empty`. If the original method is standard
48
50
  # `Get`/`Create`/`Update`, the response should be the resource. For other
@@ -50,12 +52,15 @@ module Google
50
52
  # is the original method name. For example, if the original method name
51
53
  # is `TakeSnapshot()`, the inferred response type is
52
54
  # `TakeSnapshotResponse`.
55
+ #
56
+ # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
53
57
  class Operation
54
58
  include ::Google::Protobuf::MessageExts
55
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
56
60
  end
57
61
 
58
- # The request message for Operations.GetOperation.
62
+ # The request message for
63
+ # Operations.GetOperation.
59
64
  # @!attribute [rw] name
60
65
  # @return [::String]
61
66
  # The name of the operation resource.
@@ -64,7 +69,8 @@ module Google
64
69
  extend ::Google::Protobuf::MessageExts::ClassMethods
65
70
  end
66
71
 
67
- # The request message for Operations.ListOperations.
72
+ # The request message for
73
+ # Operations.ListOperations.
68
74
  # @!attribute [rw] name
69
75
  # @return [::String]
70
76
  # The name of the operation's parent resource.
@@ -82,7 +88,8 @@ module Google
82
88
  extend ::Google::Protobuf::MessageExts::ClassMethods
83
89
  end
84
90
 
85
- # The response message for Operations.ListOperations.
91
+ # The response message for
92
+ # Operations.ListOperations.
86
93
  # @!attribute [rw] operations
87
94
  # @return [::Array<::Google::Longrunning::Operation>]
88
95
  # A list of operations that matches the specified filter in the request.
@@ -94,7 +101,8 @@ module Google
94
101
  extend ::Google::Protobuf::MessageExts::ClassMethods
95
102
  end
96
103
 
97
- # The request message for Operations.CancelOperation.
104
+ # The request message for
105
+ # Operations.CancelOperation.
98
106
  # @!attribute [rw] name
99
107
  # @return [::String]
100
108
  # The name of the operation resource to be cancelled.
@@ -103,7 +111,8 @@ module Google
103
111
  extend ::Google::Protobuf::MessageExts::ClassMethods
104
112
  end
105
113
 
106
- # The request message for Operations.DeleteOperation.
114
+ # The request message for
115
+ # Operations.DeleteOperation.
107
116
  # @!attribute [rw] name
108
117
  # @return [::String]
109
118
  # The name of the operation resource to be deleted.
@@ -112,7 +121,8 @@ module Google
112
121
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
122
  end
114
123
 
115
- # The request message for Operations.WaitOperation.
124
+ # The request message for
125
+ # Operations.WaitOperation.
116
126
  # @!attribute [rw] name
117
127
  # @return [::String]
118
128
  # The name of the operation resource to wait on.
@@ -130,13 +140,12 @@ module Google
130
140
  #
131
141
  # Example:
132
142
  #
133
- # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
- # returns (google.longrunning.Operation) {
135
- # option (google.longrunning.operation_info) = {
136
- # response_type: "LongRunningRecognizeResponse"
137
- # metadata_type: "LongRunningRecognizeMetadata"
138
- # };
139
- # }
143
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
144
+ # option (google.longrunning.operation_info) = {
145
+ # response_type: "ExportResponse"
146
+ # metadata_type: "ExportMetadata"
147
+ # };
148
+ # }
140
149
  # @!attribute [rw] response_type
141
150
  # @return [::String]
142
151
  # Required. The message name of the primary return type for this
@@ -53,21 +53,33 @@ module Google
53
53
  # @!attribute [rw] null_value
54
54
  # @return [::Google::Protobuf::NullValue]
55
55
  # Represents a null value.
56
+ #
57
+ # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
56
58
  # @!attribute [rw] number_value
57
59
  # @return [::Float]
58
60
  # Represents a double value.
61
+ #
62
+ # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
59
63
  # @!attribute [rw] string_value
60
64
  # @return [::String]
61
65
  # Represents a string value.
66
+ #
67
+ # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
62
68
  # @!attribute [rw] bool_value
63
69
  # @return [::Boolean]
64
70
  # Represents a boolean value.
71
+ #
72
+ # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
65
73
  # @!attribute [rw] struct_value
66
74
  # @return [::Google::Protobuf::Struct]
67
75
  # Represents a structured value.
76
+ #
77
+ # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
68
78
  # @!attribute [rw] list_value
69
79
  # @return [::Google::Protobuf::ListValue]
70
80
  # Represents a repeated `Value`.
81
+ #
82
+ # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
71
83
  class Value
72
84
  include ::Google::Protobuf::MessageExts
73
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gapic-common
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.1
18
+ version: 0.25.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.a
@@ -26,7 +25,7 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 0.21.1
28
+ version: 0.25.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: 2.a
@@ -108,7 +107,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
108
107
  licenses:
109
108
  - Apache-2.0
110
109
  metadata: {}
111
- post_install_message:
112
110
  rdoc_options: []
113
111
  require_paths:
114
112
  - lib
@@ -116,15 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
114
  requirements:
117
115
  - - ">="
118
116
  - !ruby/object:Gem::Version
119
- version: '2.7'
117
+ version: '3.0'
120
118
  required_rubygems_version: !ruby/object:Gem::Requirement
121
119
  requirements:
122
120
  - - ">="
123
121
  - !ruby/object:Gem::Version
124
122
  version: '0'
125
123
  requirements: []
126
- rubygems_version: 3.5.6
127
- signing_key:
124
+ rubygems_version: 3.6.2
128
125
  specification_version: 4
129
126
  summary: Writes log entries and manages your Cloud Logging configuration.
130
127
  test_files: []