Class CustomErrorResponsePolicyCustomErrorResponseRule (1.64.0)

public final class CustomErrorResponsePolicyCustomErrorResponseRule extends GeneratedMessageV3 implements CustomErrorResponsePolicyCustomErrorResponseRuleOrBuilder

Specifies the mapping between the response code that will be returned along with the custom error content and the response code returned by the backend service.

Protobuf type google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > CustomErrorResponsePolicyCustomErrorResponseRule

Static Fields

MATCH_RESPONSE_CODES_FIELD_NUMBER

public static final int MATCH_RESPONSE_CODES_FIELD_NUMBER
Field Value
Type Description
int

OVERRIDE_RESPONSE_CODE_FIELD_NUMBER

public static final int OVERRIDE_RESPONSE_CODE_FIELD_NUMBER
Field Value
Type Description
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CustomErrorResponsePolicyCustomErrorResponseRule getDefaultInstance()
Returns
Type Description
CustomErrorResponsePolicyCustomErrorResponseRule

getDescriptor()

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

newBuilder()

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

newBuilder(CustomErrorResponsePolicyCustomErrorResponseRule prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public CustomErrorResponsePolicyCustomErrorResponseRule getDefaultInstanceForType()
Returns
Type Description
CustomErrorResponsePolicyCustomErrorResponseRule

getMatchResponseCodes(int index)

public String getMatchResponseCodes(int index)

Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy.

repeated string match_response_codes = 104973410;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The matchResponseCodes at the given index.

getMatchResponseCodesBytes(int index)

public ByteString getMatchResponseCodesBytes(int index)

Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy.

repeated string match_response_codes = 104973410;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the matchResponseCodes at the given index.

getMatchResponseCodesCount()

public int getMatchResponseCodesCount()

Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy.

repeated string match_response_codes = 104973410;

Returns
Type Description
int

The count of matchResponseCodes.

getMatchResponseCodesList()

public ProtocolStringList getMatchResponseCodesList()

Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy.

repeated string match_response_codes = 104973410;

Returns
Type Description
ProtocolStringList

A list containing the matchResponseCodes.

getOverrideResponseCode()

public int getOverrideResponseCode()

The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client.

optional int32 override_response_code = 530328568;

Returns
Type Description
int

The overrideResponseCode.

getParserForType()

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

getPath()

public String getPath()

The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters

optional string path = 3433509;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters

optional string path = 3433509;

Returns
Type Description
ByteString

The bytes for path.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasOverrideResponseCode()

public boolean hasOverrideResponseCode()

The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client.

optional int32 override_response_code = 530328568;

Returns
Type Description
boolean

Whether the overrideResponseCode field is set.

hasPath()

public boolean hasPath()

The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters

optional string path = 3433509;

Returns
Type Description
boolean

Whether the path 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 CustomErrorResponsePolicyCustomErrorResponseRule.Builder newBuilderForType()
Returns
Type Description
CustomErrorResponsePolicyCustomErrorResponseRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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