Class CustomErrorResponsePolicy (1.64.0)

public final class CustomErrorResponsePolicy extends GeneratedMessageV3 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

Static Fields

ERROR_RESPONSE_RULES_FIELD_NUMBER

public static final int ERROR_RESPONSE_RULES_FIELD_NUMBER
Field Value
Type Description
int

ERROR_SERVICE_FIELD_NUMBER

public static final int ERROR_SERVICE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CustomErrorResponsePolicy getDefaultInstance()
Returns
Type Description
CustomErrorResponsePolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CustomErrorResponsePolicy.Builder newBuilder()
Returns
Type Description
CustomErrorResponsePolicy.Builder

newBuilder(CustomErrorResponsePolicy prototype)

public static CustomErrorResponsePolicy.Builder newBuilder(CustomErrorResponsePolicy prototype)
Parameter
Name Description
prototype CustomErrorResponsePolicy
Returns
Type Description
CustomErrorResponsePolicy.Builder

parseDelimitedFrom(InputStream input)

public static CustomErrorResponsePolicy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CustomErrorResponsePolicy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CustomErrorResponsePolicy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CustomErrorResponsePolicy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CustomErrorResponsePolicy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CustomErrorResponsePolicy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CustomErrorResponsePolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomErrorResponsePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CustomErrorResponsePolicy> parser()
Returns
Type Description
Parser<CustomErrorResponsePolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public CustomErrorResponsePolicy getDefaultInstanceForType()
Returns
Type Description
CustomErrorResponsePolicy

getErrorResponseRules(int index)

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 a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.

repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;

Parameter
Name Description
index int
Returns
Type Description
CustomErrorResponsePolicyCustomErrorResponseRule

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 a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.

repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;

Returns
Type Description
int

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 a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.

repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;

Returns
Type Description
List<CustomErrorResponsePolicyCustomErrorResponseRule>

getErrorResponseRulesOrBuilder(int index)

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 a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.

repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;

Parameter
Name Description
index int
Returns
Type Description
CustomErrorResponsePolicyCustomErrorResponseRuleOrBuilder

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 a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.

repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRuleOrBuilder>

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 like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers.

optional string error_service = 164214654;

Returns
Type Description
String

The errorService.

getErrorServiceBytes()

public 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 like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers.

optional string error_service = 164214654;

Returns
Type Description
ByteString

The bytes for errorService.

getParserForType()

public Parser<CustomErrorResponsePolicy> getParserForType()
Returns
Type Description
Parser<CustomErrorResponsePolicy>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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 like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers.

optional string error_service = 164214654;

Returns
Type Description
boolean

Whether the errorService field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CustomErrorResponsePolicy.Builder newBuilderForType()
Returns
Type Description
CustomErrorResponsePolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CustomErrorResponsePolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CustomErrorResponsePolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CustomErrorResponsePolicy.Builder toBuilder()
Returns
Type Description
CustomErrorResponsePolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException