Class CustomErrorResponsePolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CustomErrorResponsePolicy.Builder>
com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder
All Implemented Interfaces:
CustomErrorResponsePolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CustomErrorResponsePolicy

public static final class CustomErrorResponsePolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<CustomErrorResponsePolicy.Builder> implements CustomErrorResponsePolicyOrBuilder
 Specifies the custom error response policy that must be applied when the
 backend service or backend bucket responds with an error.
 
Protobuf type google.cloud.compute.v1.CustomErrorResponsePolicy
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CustomErrorResponsePolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CustomErrorResponsePolicy.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.GeneratedMessage.Builder<CustomErrorResponsePolicy.Builder>
    • getDefaultInstanceForType

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

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

      public CustomErrorResponsePolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CustomErrorResponsePolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CustomErrorResponsePolicy.Builder>
    • mergeFrom

    • isInitialized

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

      public CustomErrorResponsePolicy.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<CustomErrorResponsePolicy.Builder>
      Throws:
      IOException
    • getErrorResponseRulesList

      public List<CustomErrorResponsePolicyCustomErrorResponseRule> getErrorResponseRulesList()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
      Specified by:
      getErrorResponseRulesList in interface CustomErrorResponsePolicyOrBuilder
    • getErrorResponseRulesCount

      public int getErrorResponseRulesCount()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
      Specified by:
      getErrorResponseRulesCount in interface CustomErrorResponsePolicyOrBuilder
    • getErrorResponseRules

      public CustomErrorResponsePolicyCustomErrorResponseRule getErrorResponseRules(int index)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
      Specified by:
      getErrorResponseRules in interface CustomErrorResponsePolicyOrBuilder
    • setErrorResponseRules

       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • setErrorResponseRules

      public CustomErrorResponsePolicy.Builder setErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addErrorResponseRules

       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addErrorResponseRules

       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addErrorResponseRules

       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addErrorResponseRules

      public CustomErrorResponsePolicy.Builder addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addAllErrorResponseRules

       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • clearErrorResponseRules

      public CustomErrorResponsePolicy.Builder clearErrorResponseRules()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • removeErrorResponseRules

      public CustomErrorResponsePolicy.Builder removeErrorResponseRules(int index)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • getErrorResponseRulesBuilder

      public CustomErrorResponsePolicyCustomErrorResponseRule.Builder getErrorResponseRulesBuilder(int index)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • getErrorResponseRulesOrBuilder

      public CustomErrorResponsePolicyCustomErrorResponseRuleOrBuilder getErrorResponseRulesOrBuilder(int index)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
      Specified by:
      getErrorResponseRulesOrBuilder in interface CustomErrorResponsePolicyOrBuilder
    • getErrorResponseRulesOrBuilderList

      public List<? extends CustomErrorResponsePolicyCustomErrorResponseRuleOrBuilder> getErrorResponseRulesOrBuilderList()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
      Specified by:
      getErrorResponseRulesOrBuilderList in interface CustomErrorResponsePolicyOrBuilder
    • addErrorResponseRulesBuilder

      public CustomErrorResponsePolicyCustomErrorResponseRule.Builder addErrorResponseRulesBuilder()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • addErrorResponseRulesBuilder

      public CustomErrorResponsePolicyCustomErrorResponseRule.Builder addErrorResponseRulesBuilder(int index)
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • getErrorResponseRulesBuilderList

      public List<CustomErrorResponsePolicyCustomErrorResponseRule.Builder> getErrorResponseRulesBuilderList()
       Specifies rules for returning error responses.
      
       In a given policy, if you specify rules for both a range of error codes
       as well as rules for specific error codes then rules with specific error
       codes have a higher priority. For example, assume that you configure a rule
       for 401 (Un-authorized) code, and another for all 4 series
       error codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.
       However if the backend service returns a 403, the rule for4xx takes effect.
       
      repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
    • hasErrorService

      public boolean hasErrorService()
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Specified by:
      hasErrorService in interface CustomErrorResponsePolicyOrBuilder
      Returns:
      Whether the errorService field is set.
    • getErrorService

      public String getErrorService()
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Specified by:
      getErrorService in interface CustomErrorResponsePolicyOrBuilder
      Returns:
      The errorService.
    • getErrorServiceBytes

      public com.google.protobuf.ByteString getErrorServiceBytes()
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Specified by:
      getErrorServiceBytes in interface CustomErrorResponsePolicyOrBuilder
      Returns:
      The bytes for errorService.
    • setErrorService

      public CustomErrorResponsePolicy.Builder setErrorService(String value)
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Parameters:
      value - The errorService to set.
      Returns:
      This builder for chaining.
    • clearErrorService

      public CustomErrorResponsePolicy.Builder clearErrorService()
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Returns:
      This builder for chaining.
    • setErrorServiceBytes

      public CustomErrorResponsePolicy.Builder setErrorServiceBytes(com.google.protobuf.ByteString value)
       The full or partial URL to the BackendBucket resource that
       contains the custom error content. Examples are:
      
      
       - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - compute/v1/projects/project/global/backendBuckets/myBackendBucket
       - global/backendBuckets/myBackendBucket
      
       If errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,
       an errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService.
      
       If load balancer cannot reach
       the backendBucket, a simple Not Found Error will
       be returned, with the original response code (oroverrideResponseCode if configured).
      
       errorService is not supported for internal or regionalHTTP/HTTPS load balancers.
       
      optional string error_service = 164214654;
      Parameters:
      value - The bytes for errorService to set.
      Returns:
      This builder for chaining.