public final class RedirectAction extends com.google.protobuf.GeneratedMessageV3 implements RedirectActionOrBuilder
[#next-free-field: 10]Protobuf type
envoy.config.route.v4alpha.RedirectAction| Modifier and Type | Class and Description |
|---|---|
static class |
RedirectAction.Builder
[#next-free-field: 10]
Protobuf type
envoy.config.route.v4alpha.RedirectAction |
static class |
RedirectAction.PathRewriteSpecifierCase |
static class |
RedirectAction.RedirectResponseCode
Protobuf enum
envoy.config.route.v4alpha.RedirectAction.RedirectResponseCode |
static class |
RedirectAction.SchemeRewriteSpecifierCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
HOST_REDIRECT_FIELD_NUMBER |
static int |
HTTPS_REDIRECT_FIELD_NUMBER |
static int |
PATH_REDIRECT_FIELD_NUMBER |
static int |
PORT_REDIRECT_FIELD_NUMBER |
static int |
PREFIX_REWRITE_FIELD_NUMBER |
static int |
REGEX_REWRITE_FIELD_NUMBER |
static int |
RESPONSE_CODE_FIELD_NUMBER |
static int |
SCHEME_REDIRECT_FIELD_NUMBER |
static int |
STRIP_QUERY_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RedirectAction |
getDefaultInstance() |
RedirectAction |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getHostRedirect()
The host portion of the URL will be swapped with this value.
|
com.google.protobuf.ByteString |
getHostRedirectBytes()
The host portion of the URL will be swapped with this value.
|
boolean |
getHttpsRedirect()
The scheme portion of the URL will be swapped with "https".
|
com.google.protobuf.Parser<RedirectAction> |
getParserForType() |
String |
getPathRedirect()
The path portion of the URL will be swapped with this value.
|
com.google.protobuf.ByteString |
getPathRedirectBytes()
The path portion of the URL will be swapped with this value.
|
RedirectAction.PathRewriteSpecifierCase |
getPathRewriteSpecifierCase() |
int |
getPortRedirect()
The port value of the URL will be swapped with this value.
|
String |
getPrefixRewrite()
Indicates that during redirection, the matched prefix (or path)
should be swapped with this value.
|
com.google.protobuf.ByteString |
getPrefixRewriteBytes()
Indicates that during redirection, the matched prefix (or path)
should be swapped with this value.
|
RegexMatchAndSubstitute |
getRegexRewrite()
Indicates that during redirect, portions of the path that match the
pattern should be rewritten, even allowing the substitution of capture
groups from the pattern into the new path as specified by the rewrite
substitution string.
|
RegexMatchAndSubstituteOrBuilder |
getRegexRewriteOrBuilder()
Indicates that during redirect, portions of the path that match the
pattern should be rewritten, even allowing the substitution of capture
groups from the pattern into the new path as specified by the rewrite
substitution string.
|
RedirectAction.RedirectResponseCode |
getResponseCode()
The HTTP status code to use in the redirect response.
|
int |
getResponseCodeValue()
The HTTP status code to use in the redirect response.
|
String |
getSchemeRedirect()
The scheme portion of the URL will be swapped with this value.
|
com.google.protobuf.ByteString |
getSchemeRedirectBytes()
The scheme portion of the URL will be swapped with this value.
|
RedirectAction.SchemeRewriteSpecifierCase |
getSchemeRewriteSpecifierCase() |
int |
getSerializedSize() |
boolean |
getStripQuery()
Indicates that during redirection, the query portion of the URL will
be removed.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasRegexRewrite()
Indicates that during redirect, portions of the path that match the
pattern should be rewritten, even allowing the substitution of capture
groups from the pattern into the new path as specified by the rewrite
substitution string.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RedirectAction.Builder |
newBuilder() |
static RedirectAction.Builder |
newBuilder(RedirectAction prototype) |
RedirectAction.Builder |
newBuilderForType() |
protected RedirectAction.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RedirectAction |
parseDelimitedFrom(InputStream input) |
static RedirectAction |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RedirectAction |
parseFrom(byte[] data) |
static RedirectAction |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RedirectAction |
parseFrom(ByteBuffer data) |
static RedirectAction |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RedirectAction |
parseFrom(com.google.protobuf.ByteString data) |
static RedirectAction |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RedirectAction |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RedirectAction |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RedirectAction |
parseFrom(InputStream input) |
static RedirectAction |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RedirectAction> |
parser() |
RedirectAction.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int HTTPS_REDIRECT_FIELD_NUMBER
public static final int SCHEME_REDIRECT_FIELD_NUMBER
public static final int HOST_REDIRECT_FIELD_NUMBER
public static final int PORT_REDIRECT_FIELD_NUMBER
public static final int PATH_REDIRECT_FIELD_NUMBER
public static final int PREFIX_REWRITE_FIELD_NUMBER
public static final int REGEX_REWRITE_FIELD_NUMBER
public static final int RESPONSE_CODE_FIELD_NUMBER
public static final int STRIP_QUERY_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public RedirectAction.SchemeRewriteSpecifierCase getSchemeRewriteSpecifierCase()
getSchemeRewriteSpecifierCase in interface RedirectActionOrBuilderpublic RedirectAction.PathRewriteSpecifierCase getPathRewriteSpecifierCase()
getPathRewriteSpecifierCase in interface RedirectActionOrBuilderpublic boolean getHttpsRedirect()
The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;getHttpsRedirect in interface RedirectActionOrBuilderpublic String getSchemeRedirect()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;getSchemeRedirect in interface RedirectActionOrBuilderpublic com.google.protobuf.ByteString getSchemeRedirectBytes()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;getSchemeRedirectBytes in interface RedirectActionOrBuilderpublic String getHostRedirect()
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }getHostRedirect in interface RedirectActionOrBuilderpublic com.google.protobuf.ByteString getHostRedirectBytes()
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }getHostRedirectBytes in interface RedirectActionOrBuilderpublic int getPortRedirect()
The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;getPortRedirect in interface RedirectActionOrBuilderpublic String 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) = { ... }getPathRedirect in interface RedirectActionOrBuilderpublic 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) = { ... }getPathRedirectBytes in interface RedirectActionOrBuilderpublic String 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_config.route.v4alpha.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }getPrefixRewrite in interface RedirectActionOrBuilderpublic 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_config.route.v4alpha.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }getPrefixRewriteBytes in interface RedirectActionOrBuilderpublic boolean hasRegexRewrite()
Indicates that during redirect, portions of the path that match the pattern should be rewritten, even allowing the substitution of capture groups from the pattern into the new path as specified by the rewrite substitution string. This is useful to allow application paths to be rewritten in a way that is aware of segments with variable content like identifiers. Examples using Google's `RE2 <https://github.com/google/re2>`_ engine: * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` into ``/v1/api/instance/foo``. * The pattern ``one`` paired with a substitution string of ``two`` would transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of ``\1two\2`` would replace only the first occurrence of ``one``, transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to ``/aaa/yyy/bbb``.
.envoy.type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 9;hasRegexRewrite in interface RedirectActionOrBuilderpublic RegexMatchAndSubstitute getRegexRewrite()
Indicates that during redirect, portions of the path that match the pattern should be rewritten, even allowing the substitution of capture groups from the pattern into the new path as specified by the rewrite substitution string. This is useful to allow application paths to be rewritten in a way that is aware of segments with variable content like identifiers. Examples using Google's `RE2 <https://github.com/google/re2>`_ engine: * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` into ``/v1/api/instance/foo``. * The pattern ``one`` paired with a substitution string of ``two`` would transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of ``\1two\2`` would replace only the first occurrence of ``one``, transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to ``/aaa/yyy/bbb``.
.envoy.type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 9;getRegexRewrite in interface RedirectActionOrBuilderpublic RegexMatchAndSubstituteOrBuilder getRegexRewriteOrBuilder()
Indicates that during redirect, portions of the path that match the pattern should be rewritten, even allowing the substitution of capture groups from the pattern into the new path as specified by the rewrite substitution string. This is useful to allow application paths to be rewritten in a way that is aware of segments with variable content like identifiers. Examples using Google's `RE2 <https://github.com/google/re2>`_ engine: * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` into ``/v1/api/instance/foo``. * The pattern ``one`` paired with a substitution string of ``two`` would transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of ``\1two\2`` would replace only the first occurrence of ``one``, transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to ``/aaa/yyy/bbb``.
.envoy.type.matcher.v4alpha.RegexMatchAndSubstitute regex_rewrite = 9;getRegexRewriteOrBuilder in interface RedirectActionOrBuilderpublic int getResponseCodeValue()
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v4alpha.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }getResponseCodeValue in interface RedirectActionOrBuilderpublic RedirectAction.RedirectResponseCode getResponseCode()
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v4alpha.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }getResponseCode in interface RedirectActionOrBuilderpublic boolean getStripQuery()
Indicates that during redirection, the query portion of the URL will be removed. Default value is false.
bool strip_query = 6;getStripQuery in interface RedirectActionOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RedirectAction parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RedirectAction parseFrom(InputStream input) throws IOException
IOExceptionpublic static RedirectAction parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RedirectAction parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RedirectAction parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RedirectAction parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RedirectAction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RedirectAction.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RedirectAction.Builder newBuilder()
public static RedirectAction.Builder newBuilder(RedirectAction prototype)
public RedirectAction.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RedirectAction.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RedirectAction getDefaultInstance()
public static com.google.protobuf.Parser<RedirectAction> parser()
public com.google.protobuf.Parser<RedirectAction> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RedirectAction getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.