Interface RedirectActionOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
RedirectAction
,RedirectAction.Builder
public interface RedirectActionOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.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".java.lang.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.java.lang.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.java.lang.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()
boolean
getStripQuery()
Indicates that during redirection, the query portion of the URL will be removed.boolean
hasHttpsRedirect()
The scheme portion of the URL will be swapped with "https".boolean
hasPathRedirect()
The path portion of the URL will be swapped with this value.boolean
hasPrefixRewrite()
Indicates that during redirection, the matched prefix (or path) should be swapped with this value.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.boolean
hasSchemeRedirect()
The scheme portion of the URL will be swapped with this value.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
hasHttpsRedirect
boolean hasHttpsRedirect()
The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;
- Returns:
- Whether the httpsRedirect field is set.
-
getHttpsRedirect
boolean getHttpsRedirect()
The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;
- Returns:
- The httpsRedirect.
-
hasSchemeRedirect
boolean hasSchemeRedirect()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;
- Returns:
- Whether the schemeRedirect field is set.
-
getSchemeRedirect
java.lang.String getSchemeRedirect()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;
- Returns:
- The schemeRedirect.
-
getSchemeRedirectBytes
com.google.protobuf.ByteString getSchemeRedirectBytes()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;
- Returns:
- The bytes for schemeRedirect.
-
getHostRedirect
java.lang.String getHostRedirect()
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }
- Returns:
- The hostRedirect.
-
getHostRedirectBytes
com.google.protobuf.ByteString getHostRedirectBytes()
The host portion of the URL will be swapped with this value.
string host_redirect = 1 [(.validate.rules) = { ... }
- Returns:
- The bytes for hostRedirect.
-
getPortRedirect
int getPortRedirect()
The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;
- Returns:
- The portRedirect.
-
hasPathRedirect
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) = { ... }
- Returns:
- Whether the pathRedirect field is set.
-
getPathRedirect
java.lang.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) = { ... }
- Returns:
- The pathRedirect.
-
getPathRedirectBytes
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) = { ... }
- Returns:
- The bytes for pathRedirect.
-
hasPrefixRewrite
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) = { ... }
- Returns:
- Whether the prefixRewrite field is set.
-
getPrefixRewrite
java.lang.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_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }
- Returns:
- The prefixRewrite.
-
getPrefixRewriteBytes
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) = { ... }
- Returns:
- The bytes for prefixRewrite.
-
hasRegexRewrite
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;
- Returns:
- Whether the regexRewrite field is set.
-
getRegexRewrite
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.v3.RegexMatchAndSubstitute regex_rewrite = 9;
- Returns:
- The regexRewrite.
-
getRegexRewriteOrBuilder
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.v3.RegexMatchAndSubstitute regex_rewrite = 9;
-
getResponseCodeValue
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) = { ... }
- Returns:
- The enum numeric value on the wire for responseCode.
-
getResponseCode
RedirectAction.RedirectResponseCode 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) = { ... }
- Returns:
- The responseCode.
-
getStripQuery
boolean getStripQuery()
Indicates that during redirection, the query portion of the URL will be removed. Default value is false.
bool strip_query = 6;
- Returns:
- The stripQuery.
-
getSchemeRewriteSpecifierCase
RedirectAction.SchemeRewriteSpecifierCase getSchemeRewriteSpecifierCase()
-
getPathRewriteSpecifierCase
RedirectAction.PathRewriteSpecifierCase getPathRewriteSpecifierCase()
-
-