From 8fca1cdaf063d914042a678848331d7d6211ee13 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 8 Oct 2019 07:24:04 -0700 Subject: [PATCH] Synchronize new proto/yaml changes. PiperOrigin-RevId: 273514424 --- .../cloud/webrisk/artman_webrisk_v1beta1.yaml | 3 +- google/cloud/webrisk/v1beta1/webrisk.proto | 29 +++++++++++------- .../v1beta1/webrisk_grpc_service_config.json | 30 +++++++++++++++++++ .../webrisk_v1beta1.yaml} | 4 +-- 4 files changed, 52 insertions(+), 14 deletions(-) create mode 100755 google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json rename google/cloud/webrisk/{webrisk.yaml => v1beta1/webrisk_v1beta1.yaml} (63%) diff --git a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml index 4e27f041..47ac5d2c 100644 --- a/google/cloud/webrisk/artman_webrisk_v1beta1.yaml +++ b/google/cloud/webrisk/artman_webrisk_v1beta1.yaml @@ -6,8 +6,9 @@ common: - name: google-common-protos src_proto_paths: - v1beta1 - service_yaml: webrisk.yaml + service_yaml: v1beta1/webrisk_v1beta1.yaml gapic_yaml: v1beta1/webrisk_gapic.yaml + proto_package: google.cloud.webrisk.v1beta1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/cloud/webrisk/v1beta1/webrisk.proto b/google/cloud/webrisk/v1beta1/webrisk.proto index c6b5f7c9..7f8021d1 100644 --- a/google/cloud/webrisk/v1beta1/webrisk.proto +++ b/google/cloud/webrisk/v1beta1/webrisk.proto @@ -18,6 +18,8 @@ syntax = "proto3"; package google.cloud.webrisk.v1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.WebRisk.V1Beta1"; @@ -31,12 +33,15 @@ option php_namespace = "Google\\Cloud\\WebRisk\\V1beta1"; // Web Risk v1beta1 API defines an interface to detect malicious URLs on your // website and in client applications. service WebRiskServiceV1Beta1 { + option (google.api.default_host) = "webrisk.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + // Gets the most recent threat list diffs. - rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) - returns (ComputeThreatListDiffResponse) { + rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) returns (ComputeThreatListDiffResponse) { option (google.api.http) = { get: "/v1beta1/threatLists:computeDiff" }; + option (google.api.method_signature) = "threat_type,version_token,constraints"; } // This method is used to check whether a URI is on a given threatList. @@ -44,6 +49,7 @@ service WebRiskServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/uris:search" }; + option (google.api.method_signature) = "uri,threat_types"; } // Gets the full hashes that match the requested hash prefix. @@ -55,6 +61,7 @@ service WebRiskServiceV1Beta1 { option (google.api.http) = { get: "/v1beta1/hashes:search" }; + option (google.api.method_signature) = "hash_prefix,threat_types"; } } @@ -76,15 +83,15 @@ message ComputeThreatListDiffRequest { repeated CompressionType supported_compressions = 3; } - // Required. The ThreatList to update. - ThreatType threat_type = 1; + // The ThreatList to update. + ThreatType threat_type = 1 [(google.api.field_behavior) = REQUIRED]; // The current version token of the client for the requested list (the // client version that was received from the last successful diff). bytes version_token = 2; - // The constraints associated with this request. - Constraints constraints = 3; + // Required. The constraints associated with this request. + Constraints constraints = 3 [(google.api.field_behavior) = REQUIRED]; } message ComputeThreatListDiffResponse { @@ -109,7 +116,7 @@ message ComputeThreatListDiffResponse { RESET = 2; } - // The type of response. This may indicate that an action is required by the + // The type of response. This may indicate that an action must be taken by the // client when the response is received. ResponseType response_type = 4; @@ -138,11 +145,11 @@ message ComputeThreatListDiffResponse { // Request to check URI entries against threatLists. message SearchUrisRequest { - // The URI to be checked for matches. - string uri = 1; + // Required. The URI to be checked for matches. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The ThreatLists to search in. - repeated ThreatType threat_types = 2; + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } message SearchUrisResponse { @@ -167,7 +174,7 @@ message SearchHashesRequest { bytes hash_prefix = 1; // Required. The ThreatLists to search in. - repeated ThreatType threat_types = 2; + repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } message SearchHashesResponse { diff --git a/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json b/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json new file mode 100755 index 00000000..49792797 --- /dev/null +++ b/google/cloud/webrisk/v1beta1/webrisk_grpc_service_config.json @@ -0,0 +1,30 @@ +{ + "methodConfig": [ + { + "name": [ + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "ComputeThreatListDiff" + }, + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "SearchUris" + }, + { + "service": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1", + "method": "SearchHashes" + } + ], + "timeout": "600s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + } + } + ] +} diff --git a/google/cloud/webrisk/webrisk.yaml b/google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml similarity index 63% rename from google/cloud/webrisk/webrisk.yaml rename to google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml index f4311967..d9891ccb 100644 --- a/google/cloud/webrisk/webrisk.yaml +++ b/google/cloud/webrisk/v1beta1/webrisk_v1beta1.yaml @@ -4,11 +4,11 @@ name: webrisk.googleapis.com title: Web Risk API apis: - - name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 +- name: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 authentication: rules: - - selector: '*' + - selector: 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform