grafeas-v1 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfac8221d4b0f0fa86421f6227bcc1ff67099630640c414df8a79784918a8a1c
4
- data.tar.gz: 1b5716c6a135b906e3a7f6f0fe03bb466fa1e7d031caa75d83d80458eb92bf1e
3
+ metadata.gz: 765f71ee1f820ff24854e38d4b13a739a407180d4466e45d23e4450c4e9f124c
4
+ data.tar.gz: 3a3de502ddc7e5d58013c001f56e7f68a610af024877045d90fa1b57d941e7f3
5
5
  SHA512:
6
- metadata.gz: e353e4aad9dc3eb4549095a0af918fb60946bfe5ac56b37b6fa3480f21f93c0629010c02a55ba71d8acf57a9d1b7aaf88e33b0fd7d008ba6d437a356d6bf413e
7
- data.tar.gz: cd1b30a0390e82f7c60755d3f73e1a2e6dd84e3c428cf49d8c9fc739411c0c061b39b42a8bd642419fc2366cd1dfa5e3ba234bca224a622c4d00cfe32ed4fe5e
6
+ metadata.gz: 7a1dc5f8bee9d1d1728d69ef64d90f603d3c4da162ffdee852045605102c7dadfc5db2a09736cfe4bc30f12bc0841842526de14cf75453d782a10bcdf591d757
7
+ data.tar.gz: 3deca38b4736014bd271a735754caf751a453678d6164a6118b347ef8e0dd5d094528d9f314e6b6e13518427ba5f5d81d48f70ed5ba980eb6d12613c4031eec3
data/README.md CHANGED
@@ -31,33 +31,43 @@ response = client.get_occurrence request
31
31
  View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/grafeas-v1/latest)
32
32
  for class and method documentation.
33
33
 
34
- ## Enabling Logging
35
-
36
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
37
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
38
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
39
- 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)
40
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
41
-
42
- Configuring a Ruby stdlib logger:
34
+ ## Debug Logging
35
+
36
+ This library comes with opt-in Debug Logging that can help you troubleshoot
37
+ your application's integration with the API. When logging is activated, key
38
+ events such as requests and responses, along with data payloads and metadata
39
+ such as headers and client configuration, are logged to the standard error
40
+ stream.
41
+
42
+ **WARNING:** Client Library Debug Logging includes your data payloads in
43
+ plaintext, which could include sensitive data such as PII for yourself or your
44
+ customers, private keys, or other security data that could be compromising if
45
+ leaked. Always practice good data hygiene with your application logs, and follow
46
+ the principle of least access. Google also recommends that Client Library Debug
47
+ Logging be enabled only temporarily during active debugging, and not used
48
+ permanently in production.
49
+
50
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
51
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
52
+ list of client library gem names. This will select the default logging behavior,
53
+ which writes logs to the standard error stream. On a local workstation, this may
54
+ result in logs appearing on the console. When running on a Google Cloud hosting
55
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
56
+ results in logs appearing alongside your application logs in the
57
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
58
+
59
+ You can customize logging by modifying the `logger` configuration when
60
+ constructing a client object. For example:
43
61
 
44
62
  ```ruby
63
+ require "grafeas/v1"
45
64
  require "logger"
46
65
 
47
- module MyLogger
48
- LOGGER = Logger.new $stderr, level: Logger::WARN
49
- def logger
50
- LOGGER
51
- end
52
- end
53
-
54
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
55
- module GRPC
56
- extend MyLogger
66
+ client = ::Grafeas::V1::Grafeas::Client.new do |config|
67
+ config.logger = Logger.new "my-app.log"
57
68
  end
58
69
  ```
59
70
 
60
-
61
71
  ## Google Cloud Samples
62
72
 
63
73
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -210,8 +210,28 @@ module Grafeas
210
210
  universe_domain: @config.universe_domain,
211
211
  channel_args: @config.channel_args,
212
212
  interceptors: @config.interceptors,
213
- channel_pool_config: @config.channel_pool
213
+ channel_pool_config: @config.channel_pool,
214
+ logger: @config.logger
214
215
  )
216
+
217
+ @grafeas_stub.stub_logger&.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
+ @grafeas_stub.logger
215
235
  end
216
236
 
217
237
  # Service calls
@@ -297,7 +317,6 @@ module Grafeas
297
317
 
298
318
  @grafeas_stub.call_rpc :get_occurrence, request, options: options do |response, operation|
299
319
  yield response, operation if block_given?
300
- return response
301
320
  end
302
321
  rescue ::GRPC::BadStatus => e
303
322
  raise ::Google::Cloud::Error.from_error(e)
@@ -396,7 +415,7 @@ module Grafeas
396
415
  @grafeas_stub.call_rpc :list_occurrences, request, options: options do |response, operation|
397
416
  response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_occurrences, request, response, operation, options
398
417
  yield response, operation if block_given?
399
- return response
418
+ throw :response, response
400
419
  end
401
420
  rescue ::GRPC::BadStatus => e
402
421
  raise ::Google::Cloud::Error.from_error(e)
@@ -485,7 +504,6 @@ module Grafeas
485
504
 
486
505
  @grafeas_stub.call_rpc :delete_occurrence, request, options: options do |response, operation|
487
506
  yield response, operation if block_given?
488
- return response
489
507
  end
490
508
  rescue ::GRPC::BadStatus => e
491
509
  raise ::Google::Cloud::Error.from_error(e)
@@ -574,7 +592,6 @@ module Grafeas
574
592
 
575
593
  @grafeas_stub.call_rpc :create_occurrence, request, options: options do |response, operation|
576
594
  yield response, operation if block_given?
577
- return response
578
595
  end
579
596
  rescue ::GRPC::BadStatus => e
580
597
  raise ::Google::Cloud::Error.from_error(e)
@@ -663,7 +680,6 @@ module Grafeas
663
680
 
664
681
  @grafeas_stub.call_rpc :batch_create_occurrences, request, options: options do |response, operation|
665
682
  yield response, operation if block_given?
666
- return response
667
683
  end
668
684
  rescue ::GRPC::BadStatus => e
669
685
  raise ::Google::Cloud::Error.from_error(e)
@@ -754,7 +770,6 @@ module Grafeas
754
770
 
755
771
  @grafeas_stub.call_rpc :update_occurrence, request, options: options do |response, operation|
756
772
  yield response, operation if block_given?
757
- return response
758
773
  end
759
774
  rescue ::GRPC::BadStatus => e
760
775
  raise ::Google::Cloud::Error.from_error(e)
@@ -842,7 +857,6 @@ module Grafeas
842
857
 
843
858
  @grafeas_stub.call_rpc :get_occurrence_note, request, options: options do |response, operation|
844
859
  yield response, operation if block_given?
845
- return response
846
860
  end
847
861
  rescue ::GRPC::BadStatus => e
848
862
  raise ::Google::Cloud::Error.from_error(e)
@@ -929,7 +943,6 @@ module Grafeas
929
943
 
930
944
  @grafeas_stub.call_rpc :get_note, request, options: options do |response, operation|
931
945
  yield response, operation if block_given?
932
- return response
933
946
  end
934
947
  rescue ::GRPC::BadStatus => e
935
948
  raise ::Google::Cloud::Error.from_error(e)
@@ -1028,7 +1041,7 @@ module Grafeas
1028
1041
  @grafeas_stub.call_rpc :list_notes, request, options: options do |response, operation|
1029
1042
  response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_notes, request, response, operation, options
1030
1043
  yield response, operation if block_given?
1031
- return response
1044
+ throw :response, response
1032
1045
  end
1033
1046
  rescue ::GRPC::BadStatus => e
1034
1047
  raise ::Google::Cloud::Error.from_error(e)
@@ -1115,7 +1128,6 @@ module Grafeas
1115
1128
 
1116
1129
  @grafeas_stub.call_rpc :delete_note, request, options: options do |response, operation|
1117
1130
  yield response, operation if block_given?
1118
- return response
1119
1131
  end
1120
1132
  rescue ::GRPC::BadStatus => e
1121
1133
  raise ::Google::Cloud::Error.from_error(e)
@@ -1206,7 +1218,6 @@ module Grafeas
1206
1218
 
1207
1219
  @grafeas_stub.call_rpc :create_note, request, options: options do |response, operation|
1208
1220
  yield response, operation if block_given?
1209
- return response
1210
1221
  end
1211
1222
  rescue ::GRPC::BadStatus => e
1212
1223
  raise ::Google::Cloud::Error.from_error(e)
@@ -1295,7 +1306,6 @@ module Grafeas
1295
1306
 
1296
1307
  @grafeas_stub.call_rpc :batch_create_notes, request, options: options do |response, operation|
1297
1308
  yield response, operation if block_given?
1298
- return response
1299
1309
  end
1300
1310
  rescue ::GRPC::BadStatus => e
1301
1311
  raise ::Google::Cloud::Error.from_error(e)
@@ -1386,7 +1396,6 @@ module Grafeas
1386
1396
 
1387
1397
  @grafeas_stub.call_rpc :update_note, request, options: options do |response, operation|
1388
1398
  yield response, operation if block_given?
1389
- return response
1390
1399
  end
1391
1400
  rescue ::GRPC::BadStatus => e
1392
1401
  raise ::Google::Cloud::Error.from_error(e)
@@ -1486,7 +1495,7 @@ module Grafeas
1486
1495
  @grafeas_stub.call_rpc :list_note_occurrences, request, options: options do |response, operation|
1487
1496
  response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_note_occurrences, request, response, operation, options
1488
1497
  yield response, operation if block_given?
1489
- return response
1498
+ throw :response, response
1490
1499
  end
1491
1500
  rescue ::GRPC::BadStatus => e
1492
1501
  raise ::Google::Cloud::Error.from_error(e)
@@ -1575,6 +1584,11 @@ module Grafeas
1575
1584
  # default endpoint URL. The default value of nil uses the environment
1576
1585
  # universe (usually the default "googleapis.com" universe).
1577
1586
  # @return [::String,nil]
1587
+ # @!attribute [rw] logger
1588
+ # A custom logger to use for request/response debug logging, or the value
1589
+ # `:default` (the default) to construct a default logger, or `nil` to
1590
+ # explicitly disable logging.
1591
+ # @return [::Logger,:default,nil]
1578
1592
  #
1579
1593
  class Configuration
1580
1594
  extend ::Gapic::Config
@@ -1599,6 +1613,7 @@ module Grafeas
1599
1613
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1600
1614
  config_attr :quota_project, nil, ::String, nil
1601
1615
  config_attr :universe_domain, nil, ::String, nil
1616
+ config_attr :logger, :default, ::Logger, nil, :default
1602
1617
 
1603
1618
  # @private
1604
1619
  def initialize parent_config = nil
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Grafeas
21
21
  module V1
22
- VERSION = "1.1.1"
22
+ VERSION = "1.2.0"
23
23
  end
24
24
  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: grafeas-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.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
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.5.6
139
+ rubygems_version: 3.5.23
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: An implementation of the Grafeas API, which stores, and enables querying