Class RedirectAction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<RedirectAction.Builder>
com.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
io.envoyproxy.envoy.config.route.v3.RedirectAction.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RedirectActionOrBuilder,Cloneable
- Enclosing class:
RedirectAction
public static final class RedirectAction.Builder
extends com.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
implements RedirectActionOrBuilder
[#next-free-field: 10]Protobuf type
envoy.config.route.v3.RedirectAction-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Objectprivate Objectprivate intprivate intprivate com.google.protobuf.SingleFieldBuilder<RegexMatchAndSubstitute, RegexMatchAndSubstitute.Builder, RegexMatchAndSubstituteOrBuilder> private intprivate Objectprivate intprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()private voidbuildPartial0(RedirectAction result) private voidbuildPartialOneofs(RedirectAction result) clear()The host portion of the URL will be swapped with this value.The scheme portion of the URL will be swapped with "https".The path portion of the URL will be swapped with this value.The 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.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.The HTTP status code to use in the redirect response.The scheme portion of the URL will be swapped with this value.Indicates that during redirection, the query portion of the URL will be removed.static final com.google.protobuf.Descriptors.Descriptorcom.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".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.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.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.private com.google.protobuf.SingleFieldBuilder<RegexMatchAndSubstitute, RegexMatchAndSubstitute.Builder, RegexMatchAndSubstituteOrBuilder> 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.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.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.booleanIndicates that during redirection, the query portion of the URL will be removed.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.booleanIndicates 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.booleanThe scheme portion of the URL will be swapped with this value.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(RedirectAction other) 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.setHostRedirect(String value) The host portion of the URL will be swapped with this value.setHostRedirectBytes(com.google.protobuf.ByteString value) The host portion of the URL will be swapped with this value.setHttpsRedirect(boolean value) The scheme portion of the URL will be swapped with "https".setPathRedirect(String value) The path portion of the URL will be swapped with this value.setPathRedirectBytes(com.google.protobuf.ByteString value) The path portion of the URL will be swapped with this value.setPortRedirect(int value) The port value of the URL will be swapped with this value.setPrefixRewrite(String value) Indicates that during redirection, the matched prefix (or path) should be swapped with this value.setPrefixRewriteBytes(com.google.protobuf.ByteString value) Indicates that during redirection, the matched prefix (or path) should be swapped with this value.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.setRegexRewrite(RegexMatchAndSubstitute.Builder builderForValue) 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.The HTTP status code to use in the redirect response.setResponseCodeValue(int value) The HTTP status code to use in the redirect response.setSchemeRedirect(String value) The scheme portion of the URL will be swapped with this value.setSchemeRedirectBytes(com.google.protobuf.ByteString value) The scheme portion of the URL will be swapped with this value.setStripQuery(boolean value) Indicates that during redirection, the query portion of the URL will be removed.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
schemeRewriteSpecifierCase_
private int schemeRewriteSpecifierCase_ -
schemeRewriteSpecifier_
-
pathRewriteSpecifierCase_
private int pathRewriteSpecifierCase_ -
pathRewriteSpecifier_
-
bitField0_
private int bitField0_ -
hostRedirect_
-
portRedirect_
private int portRedirect_ -
regexRewriteBuilder_
private com.google.protobuf.SingleFieldBuilder<RegexMatchAndSubstitute,RegexMatchAndSubstitute.Builder, regexRewriteBuilder_RegexMatchAndSubstituteOrBuilder> -
responseCode_
private int responseCode_ -
stripQuery_
private boolean stripQuery_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
-
buildPartialOneofs
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RedirectAction.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<RedirectAction.Builder>
-
mergeFrom
public RedirectAction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RedirectAction.Builder>- Throws:
IOException
-
getSchemeRewriteSpecifierCase
- Specified by:
getSchemeRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
clearSchemeRewriteSpecifier
-
getPathRewriteSpecifierCase
- Specified by:
getPathRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
clearPathRewriteSpecifier
-
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.
-
setHttpsRedirect
The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;- Parameters:
value- The httpsRedirect to set.- Returns:
- This builder for chaining.
-
clearHttpsRedirect
The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;- Returns:
- This builder for chaining.
-
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.
-
setSchemeRedirect
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Parameters:
value- The schemeRedirect to set.- Returns:
- This builder for chaining.
-
clearSchemeRedirect
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Returns:
- This builder for chaining.
-
setSchemeRedirectBytes
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Parameters:
value- The bytes for schemeRedirect to set.- Returns:
- This builder for chaining.
-
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.
-
setHostRedirect
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }- Parameters:
value- The hostRedirect to set.- Returns:
- This builder for chaining.
-
clearHostRedirect
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setHostRedirectBytes
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for hostRedirect to set.- Returns:
- This builder for chaining.
-
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.
-
setPortRedirect
The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;- Parameters:
value- The portRedirect to set.- Returns:
- This builder for chaining.
-
clearPortRedirect
The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;- Returns:
- This builder for chaining.
-
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.
-
setPathRedirect
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) = { ... }- Parameters:
value- The pathRedirect to set.- Returns:
- This builder for chaining.
-
clearPathRedirect
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) = { ... }- Returns:
- This builder for chaining.
-
setPathRedirectBytes
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) = { ... }- Parameters:
value- The bytes for pathRedirect to set.- Returns:
- This builder for chaining.
-
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_v3_api_field_config.route.v3.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_v3_api_field_config.route.v3.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_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Specified by:
getPrefixRewriteBytesin interfaceRedirectActionOrBuilder- Returns:
- The bytes for prefixRewrite.
-
setPrefixRewrite
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_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Parameters:
value- The prefixRewrite to set.- Returns:
- This builder for chaining.
-
clearPrefixRewrite
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_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setPrefixRewriteBytes
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_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Parameters:
value- The bytes for prefixRewrite to set.- Returns:
- This builder for chaining.
-
hasRegexRewrite
public 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.v3.RegexMatchAndSubstitute regex_rewrite = 9;- Specified by:
hasRegexRewritein interfaceRedirectActionOrBuilder- Returns:
- Whether the regexRewrite field is set.
-
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.v3.RegexMatchAndSubstitute regex_rewrite = 9;- Specified by:
getRegexRewritein interfaceRedirectActionOrBuilder- Returns:
- The regexRewrite.
-
setRegexRewrite
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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
setRegexRewrite
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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
mergeRegexRewrite
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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
clearRegexRewrite
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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
getRegexRewriteBuilder
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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
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.v3.RegexMatchAndSubstitute regex_rewrite = 9;- Specified by:
getRegexRewriteOrBuilderin interfaceRedirectActionOrBuilder
-
getRegexRewriteFieldBuilder
private com.google.protobuf.SingleFieldBuilder<RegexMatchAndSubstitute,RegexMatchAndSubstitute.Builder, getRegexRewriteFieldBuilder()RegexMatchAndSubstituteOrBuilder> 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.v3.RegexMatchAndSubstitute regex_rewrite = 9; -
getResponseCodeValue
public int getResponseCodeValue()The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v3.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Specified by:
getResponseCodeValuein interfaceRedirectActionOrBuilder- Returns:
- The enum numeric value on the wire for responseCode.
-
setResponseCodeValue
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v3.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Parameters:
value- The enum numeric value on the wire for responseCode to set.- Returns:
- This builder for chaining.
-
getResponseCode
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v3.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Specified by:
getResponseCodein interfaceRedirectActionOrBuilder- Returns:
- The responseCode.
-
setResponseCode
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v3.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Parameters:
value- The responseCode to set.- Returns:
- This builder for chaining.
-
clearResponseCode
The HTTP status code to use in the redirect response. The default response code is MOVED_PERMANENTLY (301).
.envoy.config.route.v3.RedirectAction.RedirectResponseCode response_code = 3 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
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.
-
setStripQuery
Indicates that during redirection, the query portion of the URL will be removed. Default value is false.
bool strip_query = 6;- Parameters:
value- The stripQuery to set.- Returns:
- This builder for chaining.
-
clearStripQuery
Indicates that during redirection, the query portion of the URL will be removed. Default value is false.
bool strip_query = 6;- Returns:
- This builder for chaining.
-