Class MethodConfig.RetryPolicy.Builder

    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • getDefaultInstanceForType

        public MethodConfig.RetryPolicy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public MethodConfig.RetryPolicy build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public MethodConfig.RetryPolicy buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public MethodConfig.RetryPolicy.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • addRepeatedField

        public MethodConfig.RetryPolicy.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • mergeFrom

        public MethodConfig.RetryPolicy.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MethodConfig.RetryPolicy.Builder>
        Throws:
        IOException
      • getMaxAttempts

        public int getMaxAttempts()
         The maximum number of RPC attempts, including the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Specified by:
        getMaxAttempts in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        The maxAttempts.
      • setMaxAttempts

        public MethodConfig.RetryPolicy.Builder setMaxAttempts​(int value)
         The maximum number of RPC attempts, including the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Parameters:
        value - The maxAttempts to set.
        Returns:
        This builder for chaining.
      • clearMaxAttempts

        public MethodConfig.RetryPolicy.Builder clearMaxAttempts()
         The maximum number of RPC attempts, including the original attempt.
         This field is required and must be greater than 1.
         Any value greater than 5 will be treated as if it were 5.
         
        uint32 max_attempts = 1;
        Returns:
        This builder for chaining.
      • hasInitialBackoff

        public boolean hasInitialBackoff()
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
        Specified by:
        hasInitialBackoff in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        Whether the initialBackoff field is set.
      • getInitialBackoff

        public com.google.protobuf.Duration getInitialBackoff()
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
        Specified by:
        getInitialBackoff in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        The initialBackoff.
      • setInitialBackoff

        public MethodConfig.RetryPolicy.Builder setInitialBackoff​(com.google.protobuf.Duration value)
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
      • setInitialBackoff

        public MethodConfig.RetryPolicy.Builder setInitialBackoff​(com.google.protobuf.Duration.Builder builderForValue)
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
      • mergeInitialBackoff

        public MethodConfig.RetryPolicy.Builder mergeInitialBackoff​(com.google.protobuf.Duration value)
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
      • clearInitialBackoff

        public MethodConfig.RetryPolicy.Builder clearInitialBackoff()
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
      • getInitialBackoffBuilder

        public com.google.protobuf.Duration.Builder getInitialBackoffBuilder()
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
      • getInitialBackoffOrBuilder

        public com.google.protobuf.DurationOrBuilder getInitialBackoffOrBuilder()
         Exponential backoff parameters. The initial retry attempt will occur at
         random(0, initial_backoff). In general, the nth attempt will occur at
         random(0,
           min(initial_backoff*backoff_multiplier**(n-1), max_backoff)).
         Required. Must be greater than zero.
         
        .google.protobuf.Duration initial_backoff = 2;
        Specified by:
        getInitialBackoffOrBuilder in interface MethodConfig.RetryPolicyOrBuilder
      • hasMaxBackoff

        public boolean hasMaxBackoff()
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
        Specified by:
        hasMaxBackoff in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        Whether the maxBackoff field is set.
      • getMaxBackoff

        public com.google.protobuf.Duration getMaxBackoff()
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
        Specified by:
        getMaxBackoff in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        The maxBackoff.
      • setMaxBackoff

        public MethodConfig.RetryPolicy.Builder setMaxBackoff​(com.google.protobuf.Duration value)
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
      • setMaxBackoff

        public MethodConfig.RetryPolicy.Builder setMaxBackoff​(com.google.protobuf.Duration.Builder builderForValue)
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
      • mergeMaxBackoff

        public MethodConfig.RetryPolicy.Builder mergeMaxBackoff​(com.google.protobuf.Duration value)
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
      • getMaxBackoffBuilder

        public com.google.protobuf.Duration.Builder getMaxBackoffBuilder()
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
      • setBackoffMultiplier

        public MethodConfig.RetryPolicy.Builder setBackoffMultiplier​(float value)
         Required. Must be greater than zero.
         
        float backoff_multiplier = 4;
        Parameters:
        value - The backoffMultiplier to set.
        Returns:
        This builder for chaining.
      • clearBackoffMultiplier

        public MethodConfig.RetryPolicy.Builder clearBackoffMultiplier()
         Required. Must be greater than zero.
         
        float backoff_multiplier = 4;
        Returns:
        This builder for chaining.
      • getRetryableStatusCodesList

        public List<com.google.rpc.Code> getRetryableStatusCodesList()
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Specified by:
        getRetryableStatusCodesList in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        A list containing the retryableStatusCodes.
      • getRetryableStatusCodesCount

        public int getRetryableStatusCodesCount()
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Specified by:
        getRetryableStatusCodesCount in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        The count of retryableStatusCodes.
      • getRetryableStatusCodes

        public com.google.rpc.Code getRetryableStatusCodes​(int index)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Specified by:
        getRetryableStatusCodes in interface MethodConfig.RetryPolicyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The retryableStatusCodes at the given index.
      • setRetryableStatusCodes

        public MethodConfig.RetryPolicy.Builder setRetryableStatusCodes​(int index,
                                                                        com.google.rpc.Code value)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        index - The index to set the value at.
        value - The retryableStatusCodes to set.
        Returns:
        This builder for chaining.
      • addRetryableStatusCodes

        public MethodConfig.RetryPolicy.Builder addRetryableStatusCodes​(com.google.rpc.Code value)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        value - The retryableStatusCodes to add.
        Returns:
        This builder for chaining.
      • addAllRetryableStatusCodes

        public MethodConfig.RetryPolicy.Builder addAllRetryableStatusCodes​(Iterable<? extends com.google.rpc.Code> values)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        values - The retryableStatusCodes to add.
        Returns:
        This builder for chaining.
      • clearRetryableStatusCodes

        public MethodConfig.RetryPolicy.Builder clearRetryableStatusCodes()
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Returns:
        This builder for chaining.
      • getRetryableStatusCodesValueList

        public List<Integer> getRetryableStatusCodesValueList()
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Specified by:
        getRetryableStatusCodesValueList in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for retryableStatusCodes.
      • getRetryableStatusCodesValue

        public int getRetryableStatusCodesValue​(int index)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Specified by:
        getRetryableStatusCodesValue in interface MethodConfig.RetryPolicyOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of retryableStatusCodes at the given index.
      • setRetryableStatusCodesValue

        public MethodConfig.RetryPolicy.Builder setRetryableStatusCodesValue​(int index,
                                                                             int value)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        index - The index to set the value at.
        value - The enum numeric value on the wire for retryableStatusCodes to set.
        Returns:
        This builder for chaining.
      • addRetryableStatusCodesValue

        public MethodConfig.RetryPolicy.Builder addRetryableStatusCodesValue​(int value)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        value - The enum numeric value on the wire for retryableStatusCodes to add.
        Returns:
        This builder for chaining.
      • addAllRetryableStatusCodesValue

        public MethodConfig.RetryPolicy.Builder addAllRetryableStatusCodesValue​(Iterable<Integer> values)
         The set of status codes which may be retried.
         This field is required and must be non-empty.
         
        repeated .google.rpc.Code retryable_status_codes = 5;
        Parameters:
        values - The enum numeric values on the wire for retryableStatusCodes to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final MethodConfig.RetryPolicy.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>
      • mergeUnknownFields

        public final MethodConfig.RetryPolicy.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.RetryPolicy.Builder>