From 99c5a635e0a7dba4f1461571999f44100ef23b2c Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Fri, 12 Jun 2020 03:31:39 -0700 Subject: [PATCH] fix: migrate phishingprotection/v1beta1 to grpc_service_config PiperOrigin-RevId: 316023184 Source-Author: Google APIs Source-Date: Thu Jun 11 19:06:21 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 500ecc44a7af925bd13b5ca0df5f87f223dcbfcc Source-Link: https://github.com/googleapis/googleapis/commit/500ecc44a7af925bd13b5ca0df5f87f223dcbfcc --- ...gProtectionServiceV1Beta1StubSettings.java | 22 ++++++++----------- synth.metadata | 6 ++--- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java index dd1a7c31..1ad0cb80 100644 --- a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java +++ b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java @@ -177,12 +177,9 @@ public static class Builder static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( - "idempotent", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -191,17 +188,16 @@ public static class Builder static { ImmutableMap.Builder definitions = ImmutableMap.builder(); RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); settings = RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) .setTotalTimeout(Duration.ofMillis(600000L)) .build(); - definitions.put("default", settings); + definitions.put("no_retry_1_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } @@ -233,8 +229,8 @@ private static Builder initDefaults(Builder builder) { builder .reportPhishingSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); return builder; } diff --git a/synth.metadata b/synth.metadata index 86d4e992..c16d43ab 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-phishingprotection.git", - "sha": "02b0f926e8d9f42ff392f211a6758074d4f9b5b2" + "sha": "8002a6bd69a344682aaa900ca08c9bb0e62a99ec" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c4e37010d74071851ff24121f522e802231ac86e", - "internalRef": "313460921" + "sha": "500ecc44a7af925bd13b5ca0df5f87f223dcbfcc", + "internalRef": "316023184" } }, {