1 // Copyright 2020 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package com.google.api.generator.gapic.model; 16 17 import com.google.auto.value.AutoValue; 18 19 /** Represents the LRO retry settings in a gapic.yaml file. */ 20 @AutoValue 21 public abstract class GapicLroRetrySettings { protoPakkage()22 public abstract String protoPakkage(); 23 serviceName()24 public abstract String serviceName(); 25 methodName()26 public abstract String methodName(); 27 initialPollDelayMillis()28 public abstract long initialPollDelayMillis(); 29 pollDelayMultiplier()30 public abstract double pollDelayMultiplier(); 31 maxPollDelayMillis()32 public abstract long maxPollDelayMillis(); 33 totalPollTimeoutMillis()34 public abstract long totalPollTimeoutMillis(); 35 builder()36 public static Builder builder() { 37 return new AutoValue_GapicLroRetrySettings.Builder(); 38 } 39 40 @AutoValue.Builder 41 public abstract static class Builder { setProtoPakkage(String protoPakkage)42 public abstract Builder setProtoPakkage(String protoPakkage); 43 setServiceName(String serviceName)44 public abstract Builder setServiceName(String serviceName); 45 setMethodName(String methodName)46 public abstract Builder setMethodName(String methodName); 47 setInitialPollDelayMillis(long initialPollDelayMillis)48 public abstract Builder setInitialPollDelayMillis(long initialPollDelayMillis); 49 setPollDelayMultiplier(double pollDelayMultiplier)50 public abstract Builder setPollDelayMultiplier(double pollDelayMultiplier); 51 setMaxPollDelayMillis(long maxPollDelayMillis)52 public abstract Builder setMaxPollDelayMillis(long maxPollDelayMillis); 53 setTotalPollTimeoutMillis(long totalPollTimeoutMillis)54 public abstract Builder setTotalPollTimeoutMillis(long totalPollTimeoutMillis); 55 build()56 public abstract GapicLroRetrySettings build(); 57 } 58 } 59