public static final class CustomErrorResponsePolicy.Builder extends GeneratedMessage.Builder<CustomErrorResponsePolicy.Builder> implements CustomErrorResponsePolicyOrBuilderSpecifies 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CustomErrorResponsePolicy.BuilderImplements
CustomErrorResponsePolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllErrorResponseRules(Iterable<? extends CustomErrorResponsePolicyCustomErrorResponseRule> values)
public CustomErrorResponsePolicy.Builder addAllErrorResponseRules(Iterable<? extends CustomErrorResponsePolicyCustomErrorResponseRule> values)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;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule> |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule value)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
CustomErrorResponsePolicyCustomErrorResponseRule |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(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;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)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;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CustomErrorResponsePolicyCustomErrorResponseRule |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
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;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
|
addErrorResponseRulesBuilder(int index)
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;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
|
build()
public CustomErrorResponsePolicy build()| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy |
|
buildPartial()
public CustomErrorResponsePolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy |
|
clear()
public CustomErrorResponsePolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
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 | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public CustomErrorResponsePolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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 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;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicyCustomErrorResponseRule |
|
getErrorResponseRulesBuilder(int index)
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;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
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;
| 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 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;
| 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 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;
| 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 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;
| 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 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 | |
|---|---|
| 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 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 | |
|---|---|
| Type | Description |
ByteString |
The bytes for errorService. |
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;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the errorService field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CustomErrorResponsePolicy other)
public CustomErrorResponsePolicy.Builder mergeFrom(CustomErrorResponsePolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
CustomErrorResponsePolicy |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CustomErrorResponsePolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CustomErrorResponsePolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
removeErrorResponseRules(int index)
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;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
setErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)
public CustomErrorResponsePolicy.Builder setErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)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;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CustomErrorResponsePolicyCustomErrorResponseRule |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
setErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
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;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CustomErrorResponsePolicyCustomErrorResponseRule.Builder |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
|
setErrorService(String value)
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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe errorService to set. |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
This builder for chaining. |
setErrorServiceBytes(ByteString value)
public CustomErrorResponsePolicy.Builder setErrorServiceBytes(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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for errorService to set. |
| Returns | |
|---|---|
| Type | Description |
CustomErrorResponsePolicy.Builder |
This builder for chaining. |