Class RedirectPolicy
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.http.custom_response.redirect_policy.v3.RedirectPolicy
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RedirectPolicyOrBuilder,Serializable
public final class RedirectPolicy
extends com.google.protobuf.GeneratedMessageV3
implements RedirectPolicyOrBuilder
Custom response policy to internally redirect the original response to a different upstream. [#next-free-field: 7]Protobuf type
envoy.extensions.http.custom_response.redirect_policy.v3.RedirectPolicy- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCustom response policy to internally redirect the original response to a different upstream.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RedirectPolicystatic final com.google.protobuf.Descriptors.DescriptorCustom action to modify request headers before selection of the redirected route.Custom action to modify request headers before selection of the redirected route.com.google.protobuf.Parser<RedirectPolicy>Specify elements of the redirect url individually.Specify elements of the redirect url individually.getRequestHeadersToAdd(int index) HTTP headers to add to the request before it is internally redirected.intHTTP headers to add to the request before it is internally redirected.HTTP headers to add to the request before it is internally redirected.getRequestHeadersToAddOrBuilder(int index) HTTP headers to add to the request before it is internally redirected.List<? extends HeaderValueOptionOrBuilder>HTTP headers to add to the request before it is internally redirected.getResponseHeadersToAdd(int index) HTTP headers to add to the response.intHTTP headers to add to the response.HTTP headers to add to the response.getResponseHeadersToAddOrBuilder(int index) HTTP headers to add to the response.List<? extends HeaderValueOptionOrBuilder>HTTP headers to add to the response.intcom.google.protobuf.UInt32ValueThe new response status code if specified.com.google.protobuf.UInt32ValueOrBuilderThe new response status code if specified.getUri()The Http URI to redirect the original request to, to get the custom response.com.google.protobuf.ByteStringThe Http URI to redirect the original request to, to get the custom response.inthashCode()booleanCustom action to modify request headers before selection of the redirected route.booleanSpecify elements of the redirect url individually.booleanThe new response status code if specified.booleanhasUri()The Http URI to redirect the original request to, to get the custom response.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic RedirectPolicy.Builderstatic RedirectPolicy.BuildernewBuilder(RedirectPolicy prototype) protected RedirectPolicy.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static RedirectPolicyparseDelimitedFrom(InputStream input) static RedirectPolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectPolicyparseFrom(byte[] data) static RedirectPolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectPolicyparseFrom(com.google.protobuf.ByteString data) static RedirectPolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectPolicyparseFrom(com.google.protobuf.CodedInputStream input) static RedirectPolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectPolicyparseFrom(InputStream input) static RedirectPolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectPolicyparseFrom(ByteBuffer data) static RedirectPolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RedirectPolicy>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
URI_FIELD_NUMBER
public static final int URI_FIELD_NUMBER- See Also:
-
REDIRECT_ACTION_FIELD_NUMBER
public static final int REDIRECT_ACTION_FIELD_NUMBER- See Also:
-
STATUS_CODE_FIELD_NUMBER
public static final int STATUS_CODE_FIELD_NUMBER- See Also:
-
RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER
public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER- See Also:
-
REQUEST_HEADERS_TO_ADD_FIELD_NUMBER
public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER- See Also:
-
MODIFY_REQUEST_HEADERS_ACTION_FIELD_NUMBER
public static final int MODIFY_REQUEST_HEADERS_ACTION_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRedirectActionSpecifierCase
- Specified by:
getRedirectActionSpecifierCasein interfaceRedirectPolicyOrBuilder
-
hasUri
public boolean hasUri()The Http URI to redirect the original request to, to get the custom response. It should be a full FQDN with protocol, host and path. Example: .. code-block:: yaml uri: https://www.mydomain.com/path/to/404.txtstring uri = 1 [(.validate.rules) = { ... }- Specified by:
hasUriin interfaceRedirectPolicyOrBuilder- Returns:
- Whether the uri field is set.
-
getUri
The Http URI to redirect the original request to, to get the custom response. It should be a full FQDN with protocol, host and path. Example: .. code-block:: yaml uri: https://www.mydomain.com/path/to/404.txtstring uri = 1 [(.validate.rules) = { ... }- Specified by:
getUriin interfaceRedirectPolicyOrBuilder- Returns:
- The uri.
-
getUriBytes
public com.google.protobuf.ByteString getUriBytes()The Http URI to redirect the original request to, to get the custom response. It should be a full FQDN with protocol, host and path. Example: .. code-block:: yaml uri: https://www.mydomain.com/path/to/404.txtstring uri = 1 [(.validate.rules) = { ... }- Specified by:
getUriBytesin interfaceRedirectPolicyOrBuilder- Returns:
- The bytes for uri.
-
hasRedirectAction
public boolean hasRedirectAction()Specify elements of the redirect url individually. Note: Do not specify the ``response_code`` field in ``redirect_action``, use ``status_code`` instead. The following fields in ``redirect_action`` are currently not supported, and specifying them will cause the config to be rejected: - ``prefix_rewrite`` - ``regex_rewrite``
.envoy.config.route.v3.RedirectAction redirect_action = 2;- Specified by:
hasRedirectActionin interfaceRedirectPolicyOrBuilder- Returns:
- Whether the redirectAction field is set.
-
getRedirectAction
Specify elements of the redirect url individually. Note: Do not specify the ``response_code`` field in ``redirect_action``, use ``status_code`` instead. The following fields in ``redirect_action`` are currently not supported, and specifying them will cause the config to be rejected: - ``prefix_rewrite`` - ``regex_rewrite``
.envoy.config.route.v3.RedirectAction redirect_action = 2;- Specified by:
getRedirectActionin interfaceRedirectPolicyOrBuilder- Returns:
- The redirectAction.
-
getRedirectActionOrBuilder
Specify elements of the redirect url individually. Note: Do not specify the ``response_code`` field in ``redirect_action``, use ``status_code`` instead. The following fields in ``redirect_action`` are currently not supported, and specifying them will cause the config to be rejected: - ``prefix_rewrite`` - ``regex_rewrite``
.envoy.config.route.v3.RedirectAction redirect_action = 2;- Specified by:
getRedirectActionOrBuilderin interfaceRedirectPolicyOrBuilder
-
hasStatusCode
public boolean hasStatusCode()The new response status code if specified. This is used to override the status code of the response from the new upstream if it is not an error status.
.google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }- Specified by:
hasStatusCodein interfaceRedirectPolicyOrBuilder- Returns:
- Whether the statusCode field is set.
-
getStatusCode
public com.google.protobuf.UInt32Value getStatusCode()The new response status code if specified. This is used to override the status code of the response from the new upstream if it is not an error status.
.google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }- Specified by:
getStatusCodein interfaceRedirectPolicyOrBuilder- Returns:
- The statusCode.
-
getStatusCodeOrBuilder
public com.google.protobuf.UInt32ValueOrBuilder getStatusCodeOrBuilder()The new response status code if specified. This is used to override the status code of the response from the new upstream if it is not an error status.
.google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }- Specified by:
getStatusCodeOrBuilderin interfaceRedirectPolicyOrBuilder
-
getResponseHeadersToAddList
HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }- Specified by:
getResponseHeadersToAddListin interfaceRedirectPolicyOrBuilder
-
getResponseHeadersToAddOrBuilderList
HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }- Specified by:
getResponseHeadersToAddOrBuilderListin interfaceRedirectPolicyOrBuilder
-
getResponseHeadersToAddCount
public int getResponseHeadersToAddCount()HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }- Specified by:
getResponseHeadersToAddCountin interfaceRedirectPolicyOrBuilder
-
getResponseHeadersToAdd
HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }- Specified by:
getResponseHeadersToAddin interfaceRedirectPolicyOrBuilder
-
getResponseHeadersToAddOrBuilder
HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }- Specified by:
getResponseHeadersToAddOrBuilderin interfaceRedirectPolicyOrBuilder
-
getRequestHeadersToAddList
HTTP headers to add to the request before it is internally redirected.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 5 [(.validate.rules) = { ... }- Specified by:
getRequestHeadersToAddListin interfaceRedirectPolicyOrBuilder
-
getRequestHeadersToAddOrBuilderList
HTTP headers to add to the request before it is internally redirected.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 5 [(.validate.rules) = { ... }- Specified by:
getRequestHeadersToAddOrBuilderListin interfaceRedirectPolicyOrBuilder
-
getRequestHeadersToAddCount
public int getRequestHeadersToAddCount()HTTP headers to add to the request before it is internally redirected.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 5 [(.validate.rules) = { ... }- Specified by:
getRequestHeadersToAddCountin interfaceRedirectPolicyOrBuilder
-
getRequestHeadersToAdd
HTTP headers to add to the request before it is internally redirected.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 5 [(.validate.rules) = { ... }- Specified by:
getRequestHeadersToAddin interfaceRedirectPolicyOrBuilder
-
getRequestHeadersToAddOrBuilder
HTTP headers to add to the request before it is internally redirected.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add = 5 [(.validate.rules) = { ... }- Specified by:
getRequestHeadersToAddOrBuilderin interfaceRedirectPolicyOrBuilder
-
hasModifyRequestHeadersAction
public boolean hasModifyRequestHeadersAction()Custom action to modify request headers before selection of the redirected route. [#comment: TODO(pradeepcrao) add an extension category.]
.envoy.config.core.v3.TypedExtensionConfig modify_request_headers_action = 6;- Specified by:
hasModifyRequestHeadersActionin interfaceRedirectPolicyOrBuilder- Returns:
- Whether the modifyRequestHeadersAction field is set.
-
getModifyRequestHeadersAction
Custom action to modify request headers before selection of the redirected route. [#comment: TODO(pradeepcrao) add an extension category.]
.envoy.config.core.v3.TypedExtensionConfig modify_request_headers_action = 6;- Specified by:
getModifyRequestHeadersActionin interfaceRedirectPolicyOrBuilder- Returns:
- The modifyRequestHeadersAction.
-
getModifyRequestHeadersActionOrBuilder
Custom action to modify request headers before selection of the redirected route. [#comment: TODO(pradeepcrao) add an extension category.]
.envoy.config.core.v3.TypedExtensionConfig modify_request_headers_action = 6;- Specified by:
getModifyRequestHeadersActionOrBuilderin interfaceRedirectPolicyOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RedirectPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RedirectPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RedirectPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static RedirectPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static RedirectPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RedirectPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-