google-cloud-web_security_scanner-v1beta 0.4.0 → 0.6.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/web_security_scanner/v1beta/rest.rb +37 -0
  5. data/lib/google/cloud/web_security_scanner/v1beta/version.rb +1 -1
  6. data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +18 -26
  7. data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb +1295 -0
  8. data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb +819 -0
  9. data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb +54 -0
  10. data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb +7 -1
  11. data/lib/google/cloud/web_security_scanner/v1beta.rb +7 -2
  12. data/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb +24 -6
  13. data/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb +24 -29
  14. data/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb +25 -19
  15. data/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb +24 -5
  16. data/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb +24 -49
  17. data/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb +26 -55
  18. data/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb +25 -15
  19. data/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb +27 -26
  20. data/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb +24 -11
  21. data/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb +30 -70
  22. data/proto_docs/google/api/client.rb +381 -0
  23. data/proto_docs/google/api/launch_stage.rb +71 -0
  24. data/proto_docs/google/protobuf/duration.rb +98 -0
  25. data/proto_docs/google/protobuf/empty.rb +0 -2
  26. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  27. metadata +15 -8
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/web_security_scanner/v1beta/version"
24
+
25
+ require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials"
26
+ require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths"
27
+ require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module WebSecurityScanner
32
+ module V1beta
33
+ ##
34
+ # Cloud Web Security Scanner Service identifies security vulnerabilities in web
35
+ # applications hosted on Google Cloud Platform. It crawls your application, and
36
+ # attempts to exercise as many user inputs and event handlers as possible.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest"
41
+ # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new
42
+ #
43
+ module WebSecurityScanner
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/web_security_scanner/v1beta/version"
25
25
  require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials"
26
26
  require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths"
27
27
  require "google/cloud/web_security_scanner/v1beta/web_security_scanner/client"
28
+ require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -35,11 +36,16 @@ module Google
35
36
  # applications hosted on Google Cloud Platform. It crawls your application, and
36
37
  # attempts to exercise as many user inputs and event handlers as possible.
37
38
  #
38
- # To load this service and instantiate a client:
39
+ # @example Load this service and instantiate a gRPC client
39
40
  #
40
41
  # require "google/cloud/web_security_scanner/v1beta/web_security_scanner"
41
42
  # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new
42
43
  #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest"
47
+ # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new
48
+ #
43
49
  module WebSecurityScanner
44
50
  end
45
51
  end
@@ -23,13 +23,18 @@ module Google
23
23
  module Cloud
24
24
  module WebSecurityScanner
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/web_security_scanner/v1beta"
31
31
  # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/web_security_scanner/v1beta"
36
+ # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new
37
+ #
33
38
  module V1beta
34
39
  end
35
40
  end
@@ -1,16 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/crawled_url.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/websecurityscanner/v1beta/crawled_url.proto", :syntax => :proto3) do
8
- add_message "google.cloud.websecurityscanner.v1beta.CrawledUrl" do
9
- optional :http_method, :string, 1
10
- optional :url, :string, 2
11
- optional :body, :string, 3
7
+
8
+ descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/crawled_url.proto\x12&google.cloud.websecurityscanner.v1beta\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0f\x43rawledUrlProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
12
28
  end
13
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
14
32
  end
15
33
 
16
34
  module Google
@@ -1,39 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/finding_addon.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/websecurityscanner/v1beta/finding_addon.proto", :syntax => :proto3) do
8
- add_message "google.cloud.websecurityscanner.v1beta.Form" do
9
- optional :action_uri, :string, 1
10
- repeated :fields, :string, 2
11
- end
12
- add_message "google.cloud.websecurityscanner.v1beta.OutdatedLibrary" do
13
- optional :library_name, :string, 1
14
- optional :version, :string, 2
15
- repeated :learn_more_urls, :string, 3
16
- end
17
- add_message "google.cloud.websecurityscanner.v1beta.ViolatingResource" do
18
- optional :content_type, :string, 1
19
- optional :resource_url, :string, 2
20
- end
21
- add_message "google.cloud.websecurityscanner.v1beta.VulnerableParameters" do
22
- repeated :parameter_names, :string, 1
23
- end
24
- add_message "google.cloud.websecurityscanner.v1beta.VulnerableHeaders" do
25
- repeated :headers, :message, 1, "google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header"
26
- repeated :missing_headers, :message, 2, "google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header"
27
- end
28
- add_message "google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header" do
29
- optional :name, :string, 1
30
- optional :value, :string, 2
31
- end
32
- add_message "google.cloud.websecurityscanner.v1beta.Xss" do
33
- repeated :stack_traces, :string, 1
34
- optional :error_message, :string, 2
7
+
8
+ descriptor_data = "\n:google/cloud/websecurityscanner/v1beta/finding_addon.proto\x12&google.cloud.websecurityscanner.v1beta\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe8\x01\n\x11VulnerableHeaders\x12Q\n\x07headers\x18\x01 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x12Y\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"2\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\tB\x9b\x02\n*com.google.cloud.websecurityscanner.v1betaB\x11\x46indingAddonProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
28
  end
36
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
37
32
  end
38
33
 
39
34
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/finding.proto
3
4
 
@@ -6,27 +7,32 @@ require 'google/protobuf'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/cloud/websecurityscanner/v1beta/finding_addon_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/websecurityscanner/v1beta/finding.proto", :syntax => :proto3) do
11
- add_message "google.cloud.websecurityscanner.v1beta.Finding" do
12
- optional :name, :string, 1
13
- optional :finding_type, :string, 2
14
- optional :http_method, :string, 3
15
- optional :fuzzed_url, :string, 4
16
- optional :body, :string, 5
17
- optional :description, :string, 6
18
- optional :reproduction_url, :string, 7
19
- optional :frame_url, :string, 8
20
- optional :final_url, :string, 9
21
- optional :tracking_id, :string, 10
22
- optional :form, :message, 16, "google.cloud.websecurityscanner.v1beta.Form"
23
- optional :outdated_library, :message, 11, "google.cloud.websecurityscanner.v1beta.OutdatedLibrary"
24
- optional :violating_resource, :message, 12, "google.cloud.websecurityscanner.v1beta.ViolatingResource"
25
- optional :vulnerable_headers, :message, 15, "google.cloud.websecurityscanner.v1beta.VulnerableHeaders"
26
- optional :vulnerable_parameters, :message, 13, "google.cloud.websecurityscanner.v1beta.VulnerableParameters"
27
- optional :xss, :message, 14, "google.cloud.websecurityscanner.v1beta.Xss"
10
+
11
+ descriptor_data = "\n4google/cloud/websecurityscanner/v1beta/finding.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a:google/cloud/websecurityscanner/v1beta/finding_addon.proto\"\xa9\x06\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12:\n\x04\x66orm\x18\x10 \x01(\x0b\x32,.google.cloud.websecurityscanner.v1beta.Form\x12Q\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.OutdatedLibrary\x12U\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ViolatingResource\x12U\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.VulnerableHeaders\x12[\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32<.google.cloud.websecurityscanner.v1beta.VulnerableParameters\x12\x38\n\x03xss\x18\x0e \x01(\x0b\x32+.google.cloud.websecurityscanner.v1beta.Xss:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0c\x46indingProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.cloud.websecurityscanner.v1beta.Form", "google/cloud/websecurityscanner/v1beta/finding_addon.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
32
  end
29
33
  end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
30
36
  end
31
37
 
32
38
  module Google
@@ -1,15 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/finding_type_stats.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/websecurityscanner/v1beta/finding_type_stats.proto", :syntax => :proto3) do
8
- add_message "google.cloud.websecurityscanner.v1beta.FindingTypeStats" do
9
- optional :finding_type, :string, 1
10
- optional :finding_count, :int32, 2
7
+
8
+ descriptor_data = "\n?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto\x12&google.cloud.websecurityscanner.v1beta\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x9f\x02\n*com.google.cloud.websecurityscanner.v1betaB\x15\x46indingTypeStatsProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
11
28
  end
12
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
13
32
  end
14
33
 
15
34
  module Google
@@ -1,59 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/scan_config_error.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/websecurityscanner/v1beta/scan_config_error.proto", :syntax => :proto3) do
8
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfigError" do
9
- optional :code, :enum, 1, "google.cloud.websecurityscanner.v1beta.ScanConfigError.Code"
10
- optional :field_name, :string, 2
11
- end
12
- add_enum "google.cloud.websecurityscanner.v1beta.ScanConfigError.Code" do
13
- value :CODE_UNSPECIFIED, 0
14
- value :OK, 0
15
- value :INTERNAL_ERROR, 1
16
- value :APPENGINE_API_BACKEND_ERROR, 2
17
- value :APPENGINE_API_NOT_ACCESSIBLE, 3
18
- value :APPENGINE_DEFAULT_HOST_MISSING, 4
19
- value :CANNOT_USE_GOOGLE_COM_ACCOUNT, 6
20
- value :CANNOT_USE_OWNER_ACCOUNT, 7
21
- value :COMPUTE_API_BACKEND_ERROR, 8
22
- value :COMPUTE_API_NOT_ACCESSIBLE, 9
23
- value :CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT, 10
24
- value :CUSTOM_LOGIN_URL_MALFORMED, 11
25
- value :CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS, 12
26
- value :CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS, 13
27
- value :CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS, 14
28
- value :CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS, 15
29
- value :DUPLICATE_SCAN_NAME, 16
30
- value :INVALID_FIELD_VALUE, 18
31
- value :FAILED_TO_AUTHENTICATE_TO_TARGET, 19
32
- value :FINDING_TYPE_UNSPECIFIED, 20
33
- value :FORBIDDEN_TO_SCAN_COMPUTE, 21
34
- value :FORBIDDEN_UPDATE_TO_MANAGED_SCAN, 43
35
- value :MALFORMED_FILTER, 22
36
- value :MALFORMED_RESOURCE_NAME, 23
37
- value :PROJECT_INACTIVE, 24
38
- value :REQUIRED_FIELD, 25
39
- value :RESOURCE_NAME_INCONSISTENT, 26
40
- value :SCAN_ALREADY_RUNNING, 27
41
- value :SCAN_NOT_RUNNING, 28
42
- value :SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT, 29
43
- value :SEED_URL_MALFORMED, 30
44
- value :SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS, 31
45
- value :SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS, 32
46
- value :SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS, 33
47
- value :SEED_URL_HAS_UNRESERVED_IP_ADDRESS, 35
48
- value :SERVICE_ACCOUNT_NOT_CONFIGURED, 36
49
- value :TOO_MANY_SCANS, 37
50
- value :UNABLE_TO_RESOLVE_PROJECT_INFO, 38
51
- value :UNSUPPORTED_BLACKLIST_PATTERN_FORMAT, 39
52
- value :UNSUPPORTED_FILTER, 40
53
- value :UNSUPPORTED_FINDING_TYPE, 41
54
- value :UNSUPPORTED_URL_SCHEME, 42
7
+
8
+ descriptor_data = "\n>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\x12&google.cloud.websecurityscanner.v1beta\"\xed\x0b\n\x0fScanConfigError\x12J\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x9e\x02\n*com.google.cloud.websecurityscanner.v1betaB\x14ScanConfigErrorProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
55
28
  end
56
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
57
32
  end
58
33
 
59
34
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/scan_config.proto
3
4
 
@@ -8,63 +9,33 @@ require 'google/api/resource_pb'
8
9
  require 'google/cloud/websecurityscanner/v1beta/scan_run_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/websecurityscanner/v1beta/scan_config.proto", :syntax => :proto3) do
13
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfig" do
14
- optional :name, :string, 1
15
- optional :display_name, :string, 2
16
- optional :max_qps, :int32, 3
17
- repeated :starting_urls, :string, 4
18
- optional :authentication, :message, 5, "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication"
19
- optional :user_agent, :enum, 6, "google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent"
20
- repeated :blacklist_patterns, :string, 7
21
- optional :schedule, :message, 8, "google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule"
22
- repeated :target_platforms, :enum, 9, "google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform"
23
- optional :export_to_security_command_center, :enum, 10, "google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter"
24
- optional :latest_run, :message, 11, "google.cloud.websecurityscanner.v1beta.ScanRun"
25
- optional :risk_level, :enum, 12, "google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel"
26
- end
27
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication" do
28
- oneof :authentication do
29
- optional :google_account, :message, 1, "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount"
30
- optional :custom_account, :message, 2, "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount"
31
- end
32
- end
33
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount" do
34
- optional :username, :string, 1
35
- optional :password, :string, 2
36
- end
37
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount" do
38
- optional :username, :string, 1
39
- optional :password, :string, 2
40
- optional :login_url, :string, 3
41
- end
42
- add_message "google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule" do
43
- optional :schedule_time, :message, 1, "google.protobuf.Timestamp"
44
- optional :interval_duration_days, :int32, 2
45
- end
46
- add_enum "google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent" do
47
- value :USER_AGENT_UNSPECIFIED, 0
48
- value :CHROME_LINUX, 1
49
- value :CHROME_ANDROID, 2
50
- value :SAFARI_IPHONE, 3
51
- end
52
- add_enum "google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform" do
53
- value :TARGET_PLATFORM_UNSPECIFIED, 0
54
- value :APP_ENGINE, 1
55
- value :COMPUTE, 2
56
- end
57
- add_enum "google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel" do
58
- value :RISK_LEVEL_UNSPECIFIED, 0
59
- value :NORMAL, 1
60
- value :LOW, 2
61
- end
62
- add_enum "google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter" do
63
- value :EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED, 0
64
- value :ENABLED, 1
65
- value :DISABLED, 2
12
+
13
+ descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/scan_config.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/websecurityscanner/v1beta/scan_run.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x1a\n\rstarting_urls\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12Y\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication\x12P\n\nuser_agent\x18\x06 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12M\n\x08schedule\x18\x08 \x01(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule\x12[\n\x10target_platforms\x18\t \x03(\x0e\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform\x12{\n!export_to_security_command_center\x18\n \x01(\x0e\x32P.google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter\x12\x43\n\nlatest_run\x18\x0b \x01(\x0b\x32/.google.cloud.websecurityscanner.v1beta.ScanRun\x12P\n\nrisk_level\x18\x0c \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel\x1a\x94\x03\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccountH\x00\x12i\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccountH\x00\x1a@\n\rGoogleAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x1aX\n\rCustomAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x16\n\tlogin_url\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x10\n\x0e\x61uthentication\x1a\x62\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12#\n\x16interval_duration_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"N\n\x0eTargetPlatform\x12\x1f\n\x1bTARGET_PLATFORM_UNSPECIFIED\x10\x00\x12\x0e\n\nAPP_ENGINE\x10\x01\x12\x0b\n\x07\x43OMPUTE\x10\x02\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:_\xea\x41\\\n,websecurityscanner.googleapis.com/ScanConfig\x12,projects/{project}/scanConfigs/{scan_config}B\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0fScanConfigProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.cloud.websecurityscanner.v1beta.ScanRun", "google/cloud/websecurityscanner/v1beta/scan_run.proto"],
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
66
35
  end
67
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
68
39
  end
69
40
 
70
41
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto
3
4
 
@@ -5,23 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/cloud/websecurityscanner/v1beta/scan_config_error_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto", :syntax => :proto3) do
10
- add_message "google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace" do
11
- optional :code, :enum, 1, "google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code"
12
- optional :scan_config_error, :message, 2, "google.cloud.websecurityscanner.v1beta.ScanConfigError"
13
- optional :most_common_http_error_code, :int32, 3
14
- end
15
- add_enum "google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code" do
16
- value :CODE_UNSPECIFIED, 0
17
- value :INTERNAL_ERROR, 1
18
- value :SCAN_CONFIG_ISSUE, 2
19
- value :AUTHENTICATION_CONFIG_ISSUE, 3
20
- value :TIMED_OUT_WHILE_SCANNING, 4
21
- value :TOO_MANY_REDIRECTS, 5
22
- value :TOO_MANY_HTTP_ERRORS, 6
9
+
10
+ descriptor_data = "\nAgoogle/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x12&google.cloud.websecurityscanner.v1beta\x1a>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\"\x95\x03\n\x11ScanRunErrorTrace\x12L\n\x04\x63ode\x18\x01 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code\x12R\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\xa0\x02\n*com.google.cloud.websecurityscanner.v1betaB\x16ScanRunErrorTraceProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.cloud.websecurityscanner.v1beta.ScanConfigError", "google/cloud/websecurityscanner/v1beta/scan_config_error.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
23
31
  end
24
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
25
35
  end
26
36
 
27
37
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/websecurityscanner/v1beta/scan_run.proto
3
4
 
@@ -8,34 +9,34 @@ require 'google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb'
8
9
  require 'google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/websecurityscanner/v1beta/scan_run.proto", :syntax => :proto3) do
13
- add_message "google.cloud.websecurityscanner.v1beta.ScanRun" do
14
- optional :name, :string, 1
15
- optional :execution_state, :enum, 2, "google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState"
16
- optional :result_state, :enum, 3, "google.cloud.websecurityscanner.v1beta.ScanRun.ResultState"
17
- optional :start_time, :message, 4, "google.protobuf.Timestamp"
18
- optional :end_time, :message, 5, "google.protobuf.Timestamp"
19
- optional :urls_crawled_count, :int64, 6
20
- optional :urls_tested_count, :int64, 7
21
- optional :has_vulnerabilities, :bool, 8
22
- optional :progress_percent, :int32, 9
23
- optional :error_trace, :message, 10, "google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace"
24
- repeated :warning_traces, :message, 11, "google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace"
25
- end
26
- add_enum "google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState" do
27
- value :EXECUTION_STATE_UNSPECIFIED, 0
28
- value :QUEUED, 1
29
- value :SCANNING, 2
30
- value :FINISHED, 3
31
- end
32
- add_enum "google.cloud.websecurityscanner.v1beta.ScanRun.ResultState" do
33
- value :RESULT_STATE_UNSPECIFIED, 0
34
- value :SUCCESS, 1
35
- value :ERROR, 2
36
- value :KILLED, 3
12
+
13
+ descriptor_data = "\n5google/cloud/websecurityscanner/v1beta/scan_run.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a\x41google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x1a\x43google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd2\x06\n\x07ScanRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12W\n\x0f\x65xecution_state\x18\x02 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState\x12Q\n\x0cresult_state\x18\x03 \x01(\x0e\x32;.google.cloud.websecurityscanner.v1beta.ScanRun.ResultState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12urls_crawled_count\x18\x06 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x07 \x01(\x03\x12\x1b\n\x13has_vulnerabilities\x18\x08 \x01(\x08\x12\x18\n\x10progress_percent\x18\t \x01(\x05\x12N\n\x0b\x65rror_trace\x18\n \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace\x12S\n\x0ewarning_traces\x18\x0b \x03(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace\"Y\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\"O\n\x0bResultState\x12\x1c\n\x18RESULT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\n\n\x06KILLED\x10\x03:p\xea\x41m\n)websecurityscanner.googleapis.com/ScanRun\x12@projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0cScanRunProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto"],
30
+ ["google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace", "google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto"],
31
+ ]
32
+ imports.each do |type_name, expected_filename|
33
+ import_file = pool.lookup(type_name).file_descriptor
34
+ if import_file.name != expected_filename
35
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
37
36
  end
38
37
  end
38
+ warn "Each proto file must use a consistent fully-qualified name."
39
+ warn "This will become an error in the next major version."
39
40
  end
40
41
 
41
42
  module Google