Package io.envoyproxy.envoy.api.v2.route
Class RedirectAction
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.api.v2.route.RedirectAction
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RedirectActionOrBuilder,Serializable
public final class RedirectAction
extends com.google.protobuf.GeneratedMessageV3
implements RedirectActionOrBuilder
[#next-free-field: 9]Protobuf type
envoy.api.v2.route.RedirectAction- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class[#next-free-field: 9]static enumstatic enumProtobuf enumenvoy.api.v2.route.RedirectAction.RedirectResponseCodestatic 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 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 RedirectActionstatic final com.google.protobuf.Descriptors.DescriptorThe host portion of the URL will be swapped with this value.com.google.protobuf.ByteStringThe host portion of the URL will be swapped with this value.booleanThe scheme portion of the URL will be swapped with "https".com.google.protobuf.Parser<RedirectAction>The path portion of the URL will be swapped with this value.com.google.protobuf.ByteStringThe path portion of the URL will be swapped with this value.intThe port value of the URL will be swapped with this value.Indicates that during redirection, the matched prefix (or path) should be swapped with this value.com.google.protobuf.ByteStringIndicates that during redirection, the matched prefix (or path) should be swapped with this value.The HTTP status code to use in the redirect response.intThe HTTP status code to use in the redirect response.The scheme portion of the URL will be swapped with this value.com.google.protobuf.ByteStringThe scheme portion of the URL will be swapped with this value.intbooleanIndicates that during redirection, the query portion of the URL will be removed.inthashCode()booleanThe scheme portion of the URL will be swapped with "https".booleanThe path portion of the URL will be swapped with this value.booleanIndicates that during redirection, the matched prefix (or path) should be swapped with this value.booleanThe scheme portion of the URL will be swapped with this value.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic RedirectAction.Builderstatic RedirectAction.BuildernewBuilder(RedirectAction prototype) protected RedirectAction.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static RedirectActionparseDelimitedFrom(InputStream input) static RedirectActionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectActionparseFrom(byte[] data) static RedirectActionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectActionparseFrom(com.google.protobuf.ByteString data) static RedirectActionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectActionparseFrom(com.google.protobuf.CodedInputStream input) static RedirectActionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectActionparseFrom(InputStream input) static RedirectActionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static RedirectActionparseFrom(ByteBuffer data) static RedirectActionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<RedirectAction>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
-
HTTPS_REDIRECT_FIELD_NUMBER
public static final int HTTPS_REDIRECT_FIELD_NUMBER- See Also:
-
SCHEME_REDIRECT_FIELD_NUMBER
public static final int SCHEME_REDIRECT_FIELD_NUMBER- See Also:
-
HOST_REDIRECT_FIELD_NUMBER
public static final int HOST_REDIRECT_FIELD_NUMBER- See Also:
-
PORT_REDIRECT_FIELD_NUMBER
public static final int PORT_REDIRECT_FIELD_NUMBER- See Also:
-
PATH_REDIRECT_FIELD_NUMBER
public static final int PATH_REDIRECT_FIELD_NUMBER- See Also:
-
PREFIX_REWRITE_FIELD_NUMBER
public static final int PREFIX_REWRITE_FIELD_NUMBER- See Also:
-
RESPONSE_CODE_FIELD_NUMBER
public static final int RESPONSE_CODE_FIELD_NUMBER- See Also:
-
STRIP_QUERY_FIELD_NUMBER
public static final int STRIP_QUERY_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
-
getSchemeRewriteSpecifierCase
- Specified by:
getSchemeRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
getPathRewriteSpecifierCase
- Specified by:
getPathRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
hasHttpsRedirect
public boolean hasHttpsRedirect()The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;- Specified by:
hasHttpsRedirectin interfaceRedirectActionOrBuilder- Returns:
- Whether the httpsRedirect field is set.
-
getHttpsRedirect
public boolean getHttpsRedirect()The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;- Specified by:
getHttpsRedirectin interfaceRedirectActionOrBuilder- Returns:
- The httpsRedirect.
-
hasSchemeRedirect
public boolean hasSchemeRedirect()The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Specified by:
hasSchemeRedirectin interfaceRedirectActionOrBuilder- Returns:
- Whether the schemeRedirect field is set.
-
getSchemeRedirect
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Specified by:
getSchemeRedirectin interfaceRedirectActionOrBuilder- Returns:
- The schemeRedirect.
-
getSchemeRedirectBytes
public com.google.protobuf.ByteString getSchemeRedirectBytes()The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Specified by:
getSchemeRedirectBytesin interfaceRedirectActionOrBuilder- Returns:
- The bytes for schemeRedirect.
-
getHostRedirect
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }- Specified by:
getHostRedirectin interfaceRedirectActionOrBuilder- Returns:
- The hostRedirect.
-
getHostRedirectBytes
public com.google.protobuf.ByteString getHostRedirectBytes()The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }- Specified by:
getHostRedirectBytesin interfaceRedirectActionOrBuilder- Returns:
- The bytes for hostRedirect.
-
getPortRedirect
public int getPortRedirect()The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;- Specified by:
getPortRedirectin interfaceRedirectActionOrBuilder- Returns:
- The portRedirect.
-
hasPathRedirect
public boolean hasPathRedirect()The path portion of the URL will be swapped with this value. Please note that query string in path_redirect will override the request's query string and will not be stripped. For example, let's say we have the following routes: - match: { path: "/old-path-1" } redirect: { path_redirect: "/new-path-1" } - match: { path: "/old-path-2" } redirect: { path_redirect: "/new-path-2", strip-query: "true" } - match: { path: "/old-path-3" } redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1"string path_redirect = 2 [(.validate.rules) = { ... }- Specified by:
hasPathRedirectin interfaceRedirectActionOrBuilder- Returns:
- Whether the pathRedirect field is set.
-
getPathRedirect
The path portion of the URL will be swapped with this value. Please note that query string in path_redirect will override the request's query string and will not be stripped. For example, let's say we have the following routes: - match: { path: "/old-path-1" } redirect: { path_redirect: "/new-path-1" } - match: { path: "/old-path-2" } redirect: { path_redirect: "/new-path-2", strip-query: "true" } - match: { path: "/old-path-3" } redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1"string path_redirect = 2 [(.validate.rules) = { ... }- Specified by:
getPathRedirectin interfaceRedirectActionOrBuilder- Returns:
- The pathRedirect.
-
getPathRedirectBytes
public com.google.protobuf.ByteString getPathRedirectBytes()The path portion of the URL will be swapped with this value. Please note that query string in path_redirect will override the request's query string and will not be stripped. For example, let's say we have the following routes: - match: { path: "/old-path-1" } redirect: { path_redirect: "/new-path-1" } - match: { path: "/old-path-2" } redirect: { path_redirect: "/new-path-2", strip-query: "true" } - match: { path: "/old-path-3" } redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1"string path_redirect = 2 [(.validate.rules) = { ... }- Specified by:
getPathRedirectBytesin interfaceRedirectActionOrBuilder- Returns:
- The bytes for pathRedirect.
-
hasPrefixRewrite
public boolean hasPrefixRewrite()Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows redirect URLs be dynamically created based on the request. .. attention:: Pay attention to the use of trailing slashes as mentioned in :ref:`RouteAction's prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Specified by:
hasPrefixRewritein interfaceRedirectActionOrBuilder- Returns:
- Whether the prefixRewrite field is set.
-
getPrefixRewrite
Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows redirect URLs be dynamically created based on the request. .. attention:: Pay attention to the use of trailing slashes as mentioned in :ref:`RouteAction's prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Specified by:
getPrefixRewritein interfaceRedirectActionOrBuilder- Returns:
- The prefixRewrite.
-
getPrefixRewriteBytes
public com.google.protobuf.ByteString getPrefixRewriteBytes()Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows redirect URLs be dynamically created based on the request. .. attention:: Pay attention to the use of trailing slashes as mentioned in :ref:`RouteAction's prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Specified by:
getPrefixRewriteBytesin interfaceRedirectActionOrBuilder- Returns:
- The bytes for prefixRewrite.
-
getResponseCodeValue
public int getResponseCodeValue()The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.api.v2.route.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Specified by:
getResponseCodeValuein interfaceRedirectActionOrBuilder- Returns:
- The enum numeric value on the wire for responseCode.
-
getResponseCode
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.api.v2.route.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Specified by:
getResponseCodein interfaceRedirectActionOrBuilder- Returns:
- The responseCode.
-
getStripQuery
public boolean getStripQuery()Indicates that during redirection, the query portion of the URL will be removed. Default value is false.
bool strip_query = 6;- Specified by:
getStripQueryin interfaceRedirectActionOrBuilder- Returns:
- The stripQuery.
-
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 RedirectAction parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectAction parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectAction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectAction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RedirectAction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static RedirectAction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static RedirectAction parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static RedirectAction parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static RedirectAction 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 RedirectAction.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
-