Class CustomErrorResponsePolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.compute.v1.CustomErrorResponsePolicy
All Implemented Interfaces:
CustomErrorResponsePolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class CustomErrorResponsePolicy extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

    • ERROR_RESPONSE_RULES_FIELD_NUMBER

      public static final int ERROR_RESPONSE_RULES_FIELD_NUMBER
      See Also:
    • ERROR_SERVICE_FIELD_NUMBER

      public static final int ERROR_SERVICE_FIELD_NUMBER
      See Also:
  • 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
    • 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
    • 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
    • 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
    • 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
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomErrorResponsePolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CustomErrorResponsePolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CustomErrorResponsePolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static CustomErrorResponsePolicy.Builder newBuilder()
    • newBuilder

      public static CustomErrorResponsePolicy.Builder newBuilder(CustomErrorResponsePolicy prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CustomErrorResponsePolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static CustomErrorResponsePolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CustomErrorResponsePolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<CustomErrorResponsePolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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