google-cloud-web_security_scanner-v1 1.0.1 → 1.1.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: 30d4d81f82ea3ad5a1298437d8e6413cf2bb586f716ef5f78c266de0dafe73e7
4
- data.tar.gz: 91ab62b3eb9daf5f1df5e65d3cc448989c079365a142c98cb3a2e8fbb4dce834
3
+ metadata.gz: 56bfb4f7d6766689926f0671533b33c2a2980eed40fc6f0cf563baebcb2c3b75
4
+ data.tar.gz: 947cb433c7fb86f507ac73e01b3cb368aa3c0cc4eb6d5e43b79757b849a9a145
5
5
  SHA512:
6
- metadata.gz: a4cb0db068d678b58dd86a2a0dec5e92ba652c2b66cb30fe79547918856a455d0be8da5ede9456506630ca856699e620baaca2b02ef5f19a65634558231bb2a7
7
- data.tar.gz: f143ebd804218e341eb7532801cd9dff45f063d94e3c80a37ef11d6ba51283a3df954c20837bfe790f6c4eab918dc339491d5f60eef68f72c0edaa00159a9658
6
+ metadata.gz: 6e08f1cb63431e903e03adf616a9d1995d24c32bd97ed5555dfb349cc49408d29eaeb7f0b5b57ea4db12be4a78bdca754cdeed0432127c0e939246df9051d25d
7
+ data.tar.gz: c4473537d603012ae1796a18ba25308cbc9446e49ee4ff86b19f2b6b41379a6dfca5268d86e2332926439d85ddcdf1aa640121b9d3cf514ea9766ce60d4578a3
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/)
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/web_security_scanner/v1"
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::WebSecurityScanner::V1::WebSecurityScanner::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).
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module WebSecurityScanner
23
23
  module V1
24
- VERSION = "1.0.1"
24
+ VERSION = "1.1.0"
25
25
  end
26
26
  end
27
27
  end
@@ -210,8 +210,28 @@ module Google
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
+ @web_security_scanner_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
+ @web_security_scanner_stub.logger
215
235
  end
216
236
 
217
237
  # Service calls
@@ -299,7 +319,6 @@ module Google
299
319
 
300
320
  @web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation|
301
321
  yield response, operation if block_given?
302
- return response
303
322
  end
304
323
  rescue ::GRPC::BadStatus => e
305
324
  raise ::Google::Cloud::Error.from_error(e)
@@ -386,7 +405,6 @@ module Google
386
405
 
387
406
  @web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation|
388
407
  yield response, operation if block_given?
389
- return response
390
408
  end
391
409
  rescue ::GRPC::BadStatus => e
392
410
  raise ::Google::Cloud::Error.from_error(e)
@@ -473,7 +491,6 @@ module Google
473
491
 
474
492
  @web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation|
475
493
  yield response, operation if block_given?
476
- return response
477
494
  end
478
495
  rescue ::GRPC::BadStatus => e
479
496
  raise ::Google::Cloud::Error.from_error(e)
@@ -573,7 +590,7 @@ module Google
573
590
  @web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation|
574
591
  response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options
575
592
  yield response, operation if block_given?
576
- return response
593
+ throw :response, response
577
594
  end
578
595
  rescue ::GRPC::BadStatus => e
579
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -665,7 +682,6 @@ module Google
665
682
 
666
683
  @web_security_scanner_stub.call_rpc :update_scan_config, request, options: options do |response, operation|
667
684
  yield response, operation if block_given?
668
- return response
669
685
  end
670
686
  rescue ::GRPC::BadStatus => e
671
687
  raise ::Google::Cloud::Error.from_error(e)
@@ -752,7 +768,6 @@ module Google
752
768
 
753
769
  @web_security_scanner_stub.call_rpc :start_scan_run, request, options: options do |response, operation|
754
770
  yield response, operation if block_given?
755
- return response
756
771
  end
757
772
  rescue ::GRPC::BadStatus => e
758
773
  raise ::Google::Cloud::Error.from_error(e)
@@ -840,7 +855,6 @@ module Google
840
855
 
841
856
  @web_security_scanner_stub.call_rpc :get_scan_run, request, options: options do |response, operation|
842
857
  yield response, operation if block_given?
843
- return response
844
858
  end
845
859
  rescue ::GRPC::BadStatus => e
846
860
  raise ::Google::Cloud::Error.from_error(e)
@@ -941,7 +955,7 @@ module Google
941
955
  @web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation|
942
956
  response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, request, response, operation, options
943
957
  yield response, operation if block_given?
944
- return response
958
+ throw :response, response
945
959
  end
946
960
  rescue ::GRPC::BadStatus => e
947
961
  raise ::Google::Cloud::Error.from_error(e)
@@ -1029,7 +1043,6 @@ module Google
1029
1043
 
1030
1044
  @web_security_scanner_stub.call_rpc :stop_scan_run, request, options: options do |response, operation|
1031
1045
  yield response, operation if block_given?
1032
- return response
1033
1046
  end
1034
1047
  rescue ::GRPC::BadStatus => e
1035
1048
  raise ::Google::Cloud::Error.from_error(e)
@@ -1130,7 +1143,7 @@ module Google
1130
1143
  @web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation|
1131
1144
  response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, operation, options
1132
1145
  yield response, operation if block_given?
1133
- return response
1146
+ throw :response, response
1134
1147
  end
1135
1148
  rescue ::GRPC::BadStatus => e
1136
1149
  raise ::Google::Cloud::Error.from_error(e)
@@ -1218,7 +1231,6 @@ module Google
1218
1231
 
1219
1232
  @web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation|
1220
1233
  yield response, operation if block_given?
1221
- return response
1222
1234
  end
1223
1235
  rescue ::GRPC::BadStatus => e
1224
1236
  raise ::Google::Cloud::Error.from_error(e)
@@ -1324,7 +1336,7 @@ module Google
1324
1336
  @web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation|
1325
1337
  response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options
1326
1338
  yield response, operation if block_given?
1327
- return response
1339
+ throw :response, response
1328
1340
  end
1329
1341
  rescue ::GRPC::BadStatus => e
1330
1342
  raise ::Google::Cloud::Error.from_error(e)
@@ -1412,7 +1424,6 @@ module Google
1412
1424
 
1413
1425
  @web_security_scanner_stub.call_rpc :list_finding_type_stats, request, options: options do |response, operation|
1414
1426
  yield response, operation if block_given?
1415
- return response
1416
1427
  end
1417
1428
  rescue ::GRPC::BadStatus => e
1418
1429
  raise ::Google::Cloud::Error.from_error(e)
@@ -1501,6 +1512,11 @@ module Google
1501
1512
  # default endpoint URL. The default value of nil uses the environment
1502
1513
  # universe (usually the default "googleapis.com" universe).
1503
1514
  # @return [::String,nil]
1515
+ # @!attribute [rw] logger
1516
+ # A custom logger to use for request/response debug logging, or the value
1517
+ # `:default` (the default) to construct a default logger, or `nil` to
1518
+ # explicitly disable logging.
1519
+ # @return [::Logger,:default,nil]
1504
1520
  #
1505
1521
  class Configuration
1506
1522
  extend ::Gapic::Config
@@ -1525,6 +1541,7 @@ module Google
1525
1541
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1526
1542
  config_attr :quota_project, nil, ::String, nil
1527
1543
  config_attr :universe_domain, nil, ::String, nil
1544
+ config_attr :logger, :default, ::Logger, nil, :default
1528
1545
 
1529
1546
  # @private
1530
1547
  def initialize parent_config = nil
@@ -203,8 +203,28 @@ module Google
203
203
  endpoint: @config.endpoint,
204
204
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
205
205
  universe_domain: @config.universe_domain,
206
- credentials: credentials
206
+ credentials: credentials,
207
+ logger: @config.logger
207
208
  )
209
+
210
+ @web_security_scanner_stub.logger(stub: true)&.info do |entry|
211
+ entry.set_system_name
212
+ entry.set_service
213
+ entry.message = "Created client for #{entry.service}"
214
+ entry.set_credentials_fields credentials
215
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
216
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
217
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
218
+ end
219
+ end
220
+
221
+ ##
222
+ # The logger used for request/response debug logging.
223
+ #
224
+ # @return [Logger]
225
+ #
226
+ def logger
227
+ @web_security_scanner_stub.logger
208
228
  end
209
229
 
210
230
  # Service calls
@@ -285,7 +305,6 @@ module Google
285
305
 
286
306
  @web_security_scanner_stub.create_scan_config request, options do |result, operation|
287
307
  yield result, operation if block_given?
288
- return result
289
308
  end
290
309
  rescue ::Gapic::Rest::Error => e
291
310
  raise ::Google::Cloud::Error.from_error(e)
@@ -365,7 +384,6 @@ module Google
365
384
 
366
385
  @web_security_scanner_stub.delete_scan_config request, options do |result, operation|
367
386
  yield result, operation if block_given?
368
- return result
369
387
  end
370
388
  rescue ::Gapic::Rest::Error => e
371
389
  raise ::Google::Cloud::Error.from_error(e)
@@ -445,7 +463,6 @@ module Google
445
463
 
446
464
  @web_security_scanner_stub.get_scan_config request, options do |result, operation|
447
465
  yield result, operation if block_given?
448
- return result
449
466
  end
450
467
  rescue ::Gapic::Rest::Error => e
451
468
  raise ::Google::Cloud::Error.from_error(e)
@@ -538,7 +555,7 @@ module Google
538
555
  @web_security_scanner_stub.list_scan_configs request, options do |result, operation|
539
556
  result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options
540
557
  yield result, operation if block_given?
541
- return result
558
+ throw :response, result
542
559
  end
543
560
  rescue ::Gapic::Rest::Error => e
544
561
  raise ::Google::Cloud::Error.from_error(e)
@@ -623,7 +640,6 @@ module Google
623
640
 
624
641
  @web_security_scanner_stub.update_scan_config request, options do |result, operation|
625
642
  yield result, operation if block_given?
626
- return result
627
643
  end
628
644
  rescue ::Gapic::Rest::Error => e
629
645
  raise ::Google::Cloud::Error.from_error(e)
@@ -703,7 +719,6 @@ module Google
703
719
 
704
720
  @web_security_scanner_stub.start_scan_run request, options do |result, operation|
705
721
  yield result, operation if block_given?
706
- return result
707
722
  end
708
723
  rescue ::Gapic::Rest::Error => e
709
724
  raise ::Google::Cloud::Error.from_error(e)
@@ -784,7 +799,6 @@ module Google
784
799
 
785
800
  @web_security_scanner_stub.get_scan_run request, options do |result, operation|
786
801
  yield result, operation if block_given?
787
- return result
788
802
  end
789
803
  rescue ::Gapic::Rest::Error => e
790
804
  raise ::Google::Cloud::Error.from_error(e)
@@ -878,7 +892,7 @@ module Google
878
892
  @web_security_scanner_stub.list_scan_runs request, options do |result, operation|
879
893
  result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_runs", request, result, options
880
894
  yield result, operation if block_given?
881
- return result
895
+ throw :response, result
882
896
  end
883
897
  rescue ::Gapic::Rest::Error => e
884
898
  raise ::Google::Cloud::Error.from_error(e)
@@ -959,7 +973,6 @@ module Google
959
973
 
960
974
  @web_security_scanner_stub.stop_scan_run request, options do |result, operation|
961
975
  yield result, operation if block_given?
962
- return result
963
976
  end
964
977
  rescue ::Gapic::Rest::Error => e
965
978
  raise ::Google::Cloud::Error.from_error(e)
@@ -1053,7 +1066,7 @@ module Google
1053
1066
  @web_security_scanner_stub.list_crawled_urls request, options do |result, operation|
1054
1067
  result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, options
1055
1068
  yield result, operation if block_given?
1056
- return result
1069
+ throw :response, result
1057
1070
  end
1058
1071
  rescue ::Gapic::Rest::Error => e
1059
1072
  raise ::Google::Cloud::Error.from_error(e)
@@ -1134,7 +1147,6 @@ module Google
1134
1147
 
1135
1148
  @web_security_scanner_stub.get_finding request, options do |result, operation|
1136
1149
  yield result, operation if block_given?
1137
- return result
1138
1150
  end
1139
1151
  rescue ::Gapic::Rest::Error => e
1140
1152
  raise ::Google::Cloud::Error.from_error(e)
@@ -1233,7 +1245,7 @@ module Google
1233
1245
  @web_security_scanner_stub.list_findings request, options do |result, operation|
1234
1246
  result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, options
1235
1247
  yield result, operation if block_given?
1236
- return result
1248
+ throw :response, result
1237
1249
  end
1238
1250
  rescue ::Gapic::Rest::Error => e
1239
1251
  raise ::Google::Cloud::Error.from_error(e)
@@ -1314,7 +1326,6 @@ module Google
1314
1326
 
1315
1327
  @web_security_scanner_stub.list_finding_type_stats request, options do |result, operation|
1316
1328
  yield result, operation if block_given?
1317
- return result
1318
1329
  end
1319
1330
  rescue ::Gapic::Rest::Error => e
1320
1331
  raise ::Google::Cloud::Error.from_error(e)
@@ -1394,6 +1405,11 @@ module Google
1394
1405
  # default endpoint URL. The default value of nil uses the environment
1395
1406
  # universe (usually the default "googleapis.com" universe).
1396
1407
  # @return [::String,nil]
1408
+ # @!attribute [rw] logger
1409
+ # A custom logger to use for request/response debug logging, or the value
1410
+ # `:default` (the default) to construct a default logger, or `nil` to
1411
+ # explicitly disable logging.
1412
+ # @return [::Logger,:default,nil]
1397
1413
  #
1398
1414
  class Configuration
1399
1415
  extend ::Gapic::Config
@@ -1415,6 +1431,7 @@ module Google
1415
1431
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1416
1432
  config_attr :quota_project, nil, ::String, nil
1417
1433
  config_attr :universe_domain, nil, ::String, nil
1434
+ config_attr :logger, :default, ::Logger, nil, :default
1418
1435
 
1419
1436
  # @private
1420
1437
  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_scan_config 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_scan_config",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.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: "delete_scan_config",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Protobuf::Empty.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_scan_config",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.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_scan_configs",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.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: "update_scan_config",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.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: "start_scan_run",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.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_scan_run",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.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_scan_runs",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.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: "stop_scan_run",
397
426
  options: options
398
427
  )
399
428
  operation = ::Gapic::Rest::TransportOperation.new response
400
429
  result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.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_crawled_urls",
435
466
  options: options
436
467
  )
437
468
  operation = ::Gapic::Rest::TransportOperation.new response
438
469
  result = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.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_finding",
473
506
  options: options
474
507
  )
475
508
  operation = ::Gapic::Rest::TransportOperation.new response
476
509
  result = ::Google::Cloud::WebSecurityScanner::V1::Finding.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_findings",
511
546
  options: options
512
547
  )
513
548
  operation = ::Gapic::Rest::TransportOperation.new response
514
549
  result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.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
  ##
@@ -543,16 +579,18 @@ module Google
543
579
 
544
580
  response = @client_stub.make_http_request(
545
581
  verb,
546
- uri: uri,
547
- body: body || "",
548
- params: query_string_params,
582
+ uri: uri,
583
+ body: body || "",
584
+ params: query_string_params,
585
+ method_name: "list_finding_type_stats",
549
586
  options: options
550
587
  )
551
588
  operation = ::Gapic::Rest::TransportOperation.new response
552
589
  result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.decode_json response.body, ignore_unknown_fields: true
553
-
554
- yield result, operation if block_given?
555
- result
590
+ catch :response do
591
+ yield result, operation if block_given?
592
+ result
593
+ end
556
594
  end
557
595
 
558
596
  ##
@@ -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-cloud-web_security_scanner-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.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
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.5.6
121
+ rubygems_version: 3.5.23
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Scans your Compute and App Engine apps for common web vulnerabilities.