google-cloud-web_security_scanner-v1 0.3.3 → 0.4.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: 17c92db59c0446cb2f68a1bbad844aad6dbb3b3253c67a5e90517648b87921c7
4
- data.tar.gz: b80382e822afb1d1889229b85ea8ca09ebdf77816fb571c767d61d3786ee0e52
3
+ metadata.gz: ec9c45d8e5ebf469b2a6a3d57becb73ff65bdf9224e3a40f3370bd6e64fb5a35
4
+ data.tar.gz: ad8b2e26dabd3fc769ea79559d02733599c55bc0564dc1330567a1e8f7145bc7
5
5
  SHA512:
6
- metadata.gz: a008b1ebcf9168e7e90ba59718731a6070cf90d6da42dc1d4c80d9025dad4cc7c6fded09d40f31485905569cf11a03c46fce40197f830cee58b8ed1929f23829
7
- data.tar.gz: bfb8084b8cfd0bed05b669fb8e42f49494a4b1e7db9e3ea67dbd582f8f652144a0bcf8e3ab3aad5e805b5623a320f97f97302e22cff95031abc1d42d7c0e4040
6
+ metadata.gz: 1be4a0fce1004c7aaa95c7d214d88e936047309a8a952592e08535d5e9ad889872a04151a308f6cc3cf584984ed22565cb2f5012269f320c067807ad3279b128
7
+ data.tar.gz: 4c30bf21a15ae44bc38613f17ba10e82889672d2b26fafd31418d1cb43d433989e8b380d964b0b336c21f82d1028a46b149feda04d0b0b91bbaf1e27feb52875
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Web Security Scanner V1 API
2
+ --title="Web Security Scanner V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new #
37
37
  response = client.create_scan_config request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-web_security_scanner-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module WebSecurityScanner
23
23
  module V1
24
- VERSION = "0.3.3"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -229,6 +229,21 @@ module Google
229
229
  #
230
230
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
231
231
  #
232
+ # @example Basic example
233
+ # require "google/cloud/web_security_scanner/v1"
234
+ #
235
+ # # Create a client object. The client can be reused for multiple calls.
236
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
237
+ #
238
+ # # Create a request. To set request fields, pass in keyword arguments.
239
+ # request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new
240
+ #
241
+ # # Call the create_scan_config method.
242
+ # result = client.create_scan_config request
243
+ #
244
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig.
245
+ # p result
246
+ #
232
247
  def create_scan_config request, options = nil
233
248
  raise ::ArgumentError, "request must be provided" if request.nil?
234
249
 
@@ -246,9 +261,11 @@ module Google
246
261
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
247
262
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
248
263
 
249
- header_params = {
250
- "parent" => request.parent
251
- }
264
+ header_params = {}
265
+ if request.parent
266
+ header_params["parent"] = request.parent
267
+ end
268
+
252
269
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
253
270
  metadata[:"x-goog-request-params"] ||= request_params_header
254
271
 
@@ -298,6 +315,21 @@ module Google
298
315
  #
299
316
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
300
317
  #
318
+ # @example Basic example
319
+ # require "google/cloud/web_security_scanner/v1"
320
+ #
321
+ # # Create a client object. The client can be reused for multiple calls.
322
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
323
+ #
324
+ # # Create a request. To set request fields, pass in keyword arguments.
325
+ # request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new
326
+ #
327
+ # # Call the delete_scan_config method.
328
+ # result = client.delete_scan_config request
329
+ #
330
+ # # The returned object is of type Google::Protobuf::Empty.
331
+ # p result
332
+ #
301
333
  def delete_scan_config request, options = nil
302
334
  raise ::ArgumentError, "request must be provided" if request.nil?
303
335
 
@@ -315,9 +347,11 @@ module Google
315
347
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
316
348
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
349
 
318
- header_params = {
319
- "name" => request.name
320
- }
350
+ header_params = {}
351
+ if request.name
352
+ header_params["name"] = request.name
353
+ end
354
+
321
355
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
322
356
  metadata[:"x-goog-request-params"] ||= request_params_header
323
357
 
@@ -367,6 +401,21 @@ module Google
367
401
  #
368
402
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
369
403
  #
404
+ # @example Basic example
405
+ # require "google/cloud/web_security_scanner/v1"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new
412
+ #
413
+ # # Call the get_scan_config method.
414
+ # result = client.get_scan_config request
415
+ #
416
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig.
417
+ # p result
418
+ #
370
419
  def get_scan_config request, options = nil
371
420
  raise ::ArgumentError, "request must be provided" if request.nil?
372
421
 
@@ -384,9 +433,11 @@ module Google
384
433
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
385
434
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
386
435
 
387
- header_params = {
388
- "name" => request.name
389
- }
436
+ header_params = {}
437
+ if request.name
438
+ header_params["name"] = request.name
439
+ end
440
+
390
441
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
391
442
  metadata[:"x-goog-request-params"] ||= request_params_header
392
443
 
@@ -444,6 +495,27 @@ module Google
444
495
  #
445
496
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
497
  #
498
+ # @example Basic example
499
+ # require "google/cloud/web_security_scanner/v1"
500
+ #
501
+ # # Create a client object. The client can be reused for multiple calls.
502
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
503
+ #
504
+ # # Create a request. To set request fields, pass in keyword arguments.
505
+ # request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new
506
+ #
507
+ # # Call the list_scan_configs method.
508
+ # result = client.list_scan_configs request
509
+ #
510
+ # # The returned object is of type Gapic::PagedEnumerable. You can
511
+ # # iterate over all elements by calling #each, and the enumerable
512
+ # # will lazily make API calls to fetch subsequent pages. Other
513
+ # # methods are also available for managing paging directly.
514
+ # result.each do |response|
515
+ # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.
516
+ # p response
517
+ # end
518
+ #
447
519
  def list_scan_configs request, options = nil
448
520
  raise ::ArgumentError, "request must be provided" if request.nil?
449
521
 
@@ -461,9 +533,11 @@ module Google
461
533
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
462
534
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
463
535
 
464
- header_params = {
465
- "parent" => request.parent
466
- }
536
+ header_params = {}
537
+ if request.parent
538
+ header_params["parent"] = request.parent
539
+ end
540
+
467
541
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
468
542
  metadata[:"x-goog-request-params"] ||= request_params_header
469
543
 
@@ -519,6 +593,21 @@ module Google
519
593
  #
520
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
521
595
  #
596
+ # @example Basic example
597
+ # require "google/cloud/web_security_scanner/v1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new
604
+ #
605
+ # # Call the update_scan_config method.
606
+ # result = client.update_scan_config request
607
+ #
608
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig.
609
+ # p result
610
+ #
522
611
  def update_scan_config request, options = nil
523
612
  raise ::ArgumentError, "request must be provided" if request.nil?
524
613
 
@@ -536,9 +625,11 @@ module Google
536
625
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
537
626
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
627
 
539
- header_params = {
540
- "scan_config.name" => request.scan_config.name
541
- }
628
+ header_params = {}
629
+ if request.scan_config&.name
630
+ header_params["scan_config.name"] = request.scan_config.name
631
+ end
632
+
542
633
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
543
634
  metadata[:"x-goog-request-params"] ||= request_params_header
544
635
 
@@ -588,6 +679,21 @@ module Google
588
679
  #
589
680
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
590
681
  #
682
+ # @example Basic example
683
+ # require "google/cloud/web_security_scanner/v1"
684
+ #
685
+ # # Create a client object. The client can be reused for multiple calls.
686
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
687
+ #
688
+ # # Create a request. To set request fields, pass in keyword arguments.
689
+ # request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new
690
+ #
691
+ # # Call the start_scan_run method.
692
+ # result = client.start_scan_run request
693
+ #
694
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun.
695
+ # p result
696
+ #
591
697
  def start_scan_run request, options = nil
592
698
  raise ::ArgumentError, "request must be provided" if request.nil?
593
699
 
@@ -605,9 +711,11 @@ module Google
605
711
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
606
712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
713
 
608
- header_params = {
609
- "name" => request.name
610
- }
714
+ header_params = {}
715
+ if request.name
716
+ header_params["name"] = request.name
717
+ end
718
+
611
719
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
612
720
  metadata[:"x-goog-request-params"] ||= request_params_header
613
721
 
@@ -658,6 +766,21 @@ module Google
658
766
  #
659
767
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
660
768
  #
769
+ # @example Basic example
770
+ # require "google/cloud/web_security_scanner/v1"
771
+ #
772
+ # # Create a client object. The client can be reused for multiple calls.
773
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
774
+ #
775
+ # # Create a request. To set request fields, pass in keyword arguments.
776
+ # request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new
777
+ #
778
+ # # Call the get_scan_run method.
779
+ # result = client.get_scan_run request
780
+ #
781
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun.
782
+ # p result
783
+ #
661
784
  def get_scan_run request, options = nil
662
785
  raise ::ArgumentError, "request must be provided" if request.nil?
663
786
 
@@ -675,9 +798,11 @@ module Google
675
798
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
676
799
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
677
800
 
678
- header_params = {
679
- "name" => request.name
680
- }
801
+ header_params = {}
802
+ if request.name
803
+ header_params["name"] = request.name
804
+ end
805
+
681
806
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
682
807
  metadata[:"x-goog-request-params"] ||= request_params_header
683
808
 
@@ -736,6 +861,27 @@ module Google
736
861
  #
737
862
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
738
863
  #
864
+ # @example Basic example
865
+ # require "google/cloud/web_security_scanner/v1"
866
+ #
867
+ # # Create a client object. The client can be reused for multiple calls.
868
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
869
+ #
870
+ # # Create a request. To set request fields, pass in keyword arguments.
871
+ # request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new
872
+ #
873
+ # # Call the list_scan_runs method.
874
+ # result = client.list_scan_runs request
875
+ #
876
+ # # The returned object is of type Gapic::PagedEnumerable. You can
877
+ # # iterate over all elements by calling #each, and the enumerable
878
+ # # will lazily make API calls to fetch subsequent pages. Other
879
+ # # methods are also available for managing paging directly.
880
+ # result.each do |response|
881
+ # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::ScanRun.
882
+ # p response
883
+ # end
884
+ #
739
885
  def list_scan_runs request, options = nil
740
886
  raise ::ArgumentError, "request must be provided" if request.nil?
741
887
 
@@ -753,9 +899,11 @@ module Google
753
899
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
754
900
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
755
901
 
756
- header_params = {
757
- "parent" => request.parent
758
- }
902
+ header_params = {}
903
+ if request.parent
904
+ header_params["parent"] = request.parent
905
+ end
906
+
759
907
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
760
908
  metadata[:"x-goog-request-params"] ||= request_params_header
761
909
 
@@ -807,6 +955,21 @@ module Google
807
955
  #
808
956
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
809
957
  #
958
+ # @example Basic example
959
+ # require "google/cloud/web_security_scanner/v1"
960
+ #
961
+ # # Create a client object. The client can be reused for multiple calls.
962
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
963
+ #
964
+ # # Create a request. To set request fields, pass in keyword arguments.
965
+ # request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new
966
+ #
967
+ # # Call the stop_scan_run method.
968
+ # result = client.stop_scan_run request
969
+ #
970
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun.
971
+ # p result
972
+ #
810
973
  def stop_scan_run request, options = nil
811
974
  raise ::ArgumentError, "request must be provided" if request.nil?
812
975
 
@@ -824,9 +987,11 @@ module Google
824
987
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
825
988
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
826
989
 
827
- header_params = {
828
- "name" => request.name
829
- }
990
+ header_params = {}
991
+ if request.name
992
+ header_params["name"] = request.name
993
+ end
994
+
830
995
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
831
996
  metadata[:"x-goog-request-params"] ||= request_params_header
832
997
 
@@ -885,6 +1050,27 @@ module Google
885
1050
  #
886
1051
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
887
1052
  #
1053
+ # @example Basic example
1054
+ # require "google/cloud/web_security_scanner/v1"
1055
+ #
1056
+ # # Create a client object. The client can be reused for multiple calls.
1057
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
1058
+ #
1059
+ # # Create a request. To set request fields, pass in keyword arguments.
1060
+ # request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new
1061
+ #
1062
+ # # Call the list_crawled_urls method.
1063
+ # result = client.list_crawled_urls request
1064
+ #
1065
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1066
+ # # iterate over all elements by calling #each, and the enumerable
1067
+ # # will lazily make API calls to fetch subsequent pages. Other
1068
+ # # methods are also available for managing paging directly.
1069
+ # result.each do |response|
1070
+ # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl.
1071
+ # p response
1072
+ # end
1073
+ #
888
1074
  def list_crawled_urls request, options = nil
889
1075
  raise ::ArgumentError, "request must be provided" if request.nil?
890
1076
 
@@ -902,9 +1088,11 @@ module Google
902
1088
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
903
1089
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
904
1090
 
905
- header_params = {
906
- "parent" => request.parent
907
- }
1091
+ header_params = {}
1092
+ if request.parent
1093
+ header_params["parent"] = request.parent
1094
+ end
1095
+
908
1096
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
909
1097
  metadata[:"x-goog-request-params"] ||= request_params_header
910
1098
 
@@ -956,6 +1144,21 @@ module Google
956
1144
  #
957
1145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
958
1146
  #
1147
+ # @example Basic example
1148
+ # require "google/cloud/web_security_scanner/v1"
1149
+ #
1150
+ # # Create a client object. The client can be reused for multiple calls.
1151
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
1152
+ #
1153
+ # # Create a request. To set request fields, pass in keyword arguments.
1154
+ # request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new
1155
+ #
1156
+ # # Call the get_finding method.
1157
+ # result = client.get_finding request
1158
+ #
1159
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding.
1160
+ # p result
1161
+ #
959
1162
  def get_finding request, options = nil
960
1163
  raise ::ArgumentError, "request must be provided" if request.nil?
961
1164
 
@@ -973,9 +1176,11 @@ module Google
973
1176
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
974
1177
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
975
1178
 
976
- header_params = {
977
- "name" => request.name
978
- }
1179
+ header_params = {}
1180
+ if request.name
1181
+ header_params["name"] = request.name
1182
+ end
1183
+
979
1184
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
980
1185
  metadata[:"x-goog-request-params"] ||= request_params_header
981
1186
 
@@ -1039,6 +1244,27 @@ module Google
1039
1244
  #
1040
1245
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1041
1246
  #
1247
+ # @example Basic example
1248
+ # require "google/cloud/web_security_scanner/v1"
1249
+ #
1250
+ # # Create a client object. The client can be reused for multiple calls.
1251
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
1252
+ #
1253
+ # # Create a request. To set request fields, pass in keyword arguments.
1254
+ # request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new
1255
+ #
1256
+ # # Call the list_findings method.
1257
+ # result = client.list_findings request
1258
+ #
1259
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1260
+ # # iterate over all elements by calling #each, and the enumerable
1261
+ # # will lazily make API calls to fetch subsequent pages. Other
1262
+ # # methods are also available for managing paging directly.
1263
+ # result.each do |response|
1264
+ # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding.
1265
+ # p response
1266
+ # end
1267
+ #
1042
1268
  def list_findings request, options = nil
1043
1269
  raise ::ArgumentError, "request must be provided" if request.nil?
1044
1270
 
@@ -1056,9 +1282,11 @@ module Google
1056
1282
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
1057
1283
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1058
1284
 
1059
- header_params = {
1060
- "parent" => request.parent
1061
- }
1285
+ header_params = {}
1286
+ if request.parent
1287
+ header_params["parent"] = request.parent
1288
+ end
1289
+
1062
1290
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1063
1291
  metadata[:"x-goog-request-params"] ||= request_params_header
1064
1292
 
@@ -1110,6 +1338,21 @@ module Google
1110
1338
  #
1111
1339
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1112
1340
  #
1341
+ # @example Basic example
1342
+ # require "google/cloud/web_security_scanner/v1"
1343
+ #
1344
+ # # Create a client object. The client can be reused for multiple calls.
1345
+ # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
1346
+ #
1347
+ # # Create a request. To set request fields, pass in keyword arguments.
1348
+ # request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new
1349
+ #
1350
+ # # Call the list_finding_type_stats method.
1351
+ # result = client.list_finding_type_stats request
1352
+ #
1353
+ # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.
1354
+ # p result
1355
+ #
1113
1356
  def list_finding_type_stats request, options = nil
1114
1357
  raise ::ArgumentError, "request must be provided" if request.nil?
1115
1358
 
@@ -1127,9 +1370,11 @@ module Google
1127
1370
  gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION
1128
1371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1129
1372
 
1130
- header_params = {
1131
- "parent" => request.parent
1132
- }
1373
+ header_params = {}
1374
+ if request.parent
1375
+ header_params["parent"] = request.parent
1376
+ end
1377
+
1133
1378
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1134
1379
  metadata[:"x-goog-request-params"] ||= request_params_header
1135
1380
 
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/web_security_scanner/v1"
29
31
  # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
30
32
  #
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/cloud/websecurityscanner/v1/finding_addon_pb'
9
+
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/websecurityscanner/v1/finding.proto", :syntax => :proto3) do
11
12
  add_message "google.cloud.websecurityscanner.v1.Finding" do
@@ -5,6 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/protobuf/timestamp_pb'
8
+
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("google/cloud/websecurityscanner/v1/scan_config.proto", :syntax => :proto3) do
10
11
  add_message "google.cloud.websecurityscanner.v1.ScanConfig" do
@@ -4,6 +4,7 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/cloud/websecurityscanner/v1/scan_config_error_pb'
7
+
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
9
  add_file("google/cloud/websecurityscanner/v1/scan_run_error_trace.proto", :syntax => :proto3) do
9
10
  add_message "google.cloud.websecurityscanner.v1.ScanRunErrorTrace" do
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/cloud/websecurityscanner/v1/scan_run_error_trace_pb'
7
7
  require 'google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb'
8
8
  require 'google/protobuf/timestamp_pb'
9
+
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/websecurityscanner/v1/scan_run.proto", :syntax => :proto3) do
11
12
  add_message "google.cloud.websecurityscanner.v1.ScanRun" do
@@ -12,6 +12,7 @@ require 'google/cloud/websecurityscanner/v1/scan_run_pb'
12
12
  require 'google/protobuf/empty_pb'
13
13
  require 'google/protobuf/field_mask_pb'
14
14
  require 'google/api/client_pb'
15
+
15
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  add_file("google/cloud/websecurityscanner/v1/web_security_scanner.proto", :syntax => :proto3) do
17
18
  add_message "google.cloud.websecurityscanner.v1.CreateScanConfigRequest" do
@@ -29,7 +29,7 @@ module Google
29
29
  # attempts to exercise as many user inputs and event handlers as possible.
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
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: 0.3.3
4
+ version: 0.4.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: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2022-07-08 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.7'
19
+ version: '0.10'
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.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -214,14 +214,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
214
  requirements:
215
215
  - - ">="
216
216
  - !ruby/object:Gem::Version
217
- version: '2.5'
217
+ version: '2.6'
218
218
  required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.2.17
224
+ rubygems_version: 3.3.14
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: API Client library for the Web Security Scanner V1 API