Package io.envoyproxy.envoy.api.v2.route
Class RedirectAction.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
- io.envoyproxy.envoy.api.v2.route.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.GeneratedMessageV3.Builder<RedirectAction.Builder> implements RedirectActionOrBuilder
[#next-free-field: 9]
Protobuf typeenvoy.api.v2.route.RedirectAction
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RedirectAction.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RedirectActionbuild()RedirectActionbuildPartial()RedirectAction.Builderclear()RedirectAction.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)RedirectAction.BuilderclearHostRedirect()The host portion of the URL will be swapped with this value.RedirectAction.BuilderclearHttpsRedirect()The scheme portion of the URL will be swapped with "https".RedirectAction.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)RedirectAction.BuilderclearPathRedirect()The path portion of the URL will be swapped with this value.RedirectAction.BuilderclearPathRewriteSpecifier()RedirectAction.BuilderclearPortRedirect()The port value of the URL will be swapped with this value.RedirectAction.BuilderclearPrefixRewrite()Indicates that during redirection, the matched prefix (or path) should be swapped with this value.RedirectAction.BuilderclearResponseCode()The HTTP status code to use in the redirect response.RedirectAction.BuilderclearSchemeRedirect()The scheme portion of the URL will be swapped with this value.RedirectAction.BuilderclearSchemeRewriteSpecifier()RedirectAction.BuilderclearStripQuery()Indicates that during redirection, the query portion of the URL will be removed.RedirectAction.Builderclone()RedirectActiongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetHostRedirect()The host portion of the URL will be swapped with this value.com.google.protobuf.ByteStringgetHostRedirectBytes()The host portion of the URL will be swapped with this value.booleangetHttpsRedirect()The scheme portion of the URL will be swapped with "https".StringgetPathRedirect()The path portion of the URL will be swapped with this value.com.google.protobuf.ByteStringgetPathRedirectBytes()The path portion of the URL will be swapped with this value.RedirectAction.PathRewriteSpecifierCasegetPathRewriteSpecifierCase()intgetPortRedirect()The port value of the URL will be swapped with this value.StringgetPrefixRewrite()Indicates that during redirection, the matched prefix (or path) should be swapped with this value.com.google.protobuf.ByteStringgetPrefixRewriteBytes()Indicates that during redirection, the matched prefix (or path) should be swapped with this value.RedirectAction.RedirectResponseCodegetResponseCode()The HTTP status code to use in the redirect response.intgetResponseCodeValue()The HTTP status code to use in the redirect response.StringgetSchemeRedirect()The scheme portion of the URL will be swapped with this value.com.google.protobuf.ByteStringgetSchemeRedirectBytes()The scheme portion of the URL will be swapped with this value.RedirectAction.SchemeRewriteSpecifierCasegetSchemeRewriteSpecifierCase()booleangetStripQuery()Indicates that during redirection, the query portion of the URL will be removed.booleanhasHttpsRedirect()The scheme portion of the URL will be swapped with "https".booleanhasPathRedirect()The path portion of the URL will be swapped with this value.booleanhasPrefixRewrite()Indicates that during redirection, the matched prefix (or path) should be swapped with this value.booleanhasSchemeRedirect()The scheme portion of the URL will be swapped with this value.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()RedirectAction.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)RedirectAction.BuildermergeFrom(com.google.protobuf.Message other)RedirectAction.BuildermergeFrom(RedirectAction other)RedirectAction.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RedirectAction.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RedirectAction.BuildersetHostRedirect(String value)The host portion of the URL will be swapped with this value.RedirectAction.BuildersetHostRedirectBytes(com.google.protobuf.ByteString value)The host portion of the URL will be swapped with this value.RedirectAction.BuildersetHttpsRedirect(boolean value)The scheme portion of the URL will be swapped with "https".RedirectAction.BuildersetPathRedirect(String value)The path portion of the URL will be swapped with this value.RedirectAction.BuildersetPathRedirectBytes(com.google.protobuf.ByteString value)The path portion of the URL will be swapped with this value.RedirectAction.BuildersetPortRedirect(int value)The port value of the URL will be swapped with this value.RedirectAction.BuildersetPrefixRewrite(String value)Indicates that during redirection, the matched prefix (or path) should be swapped with this value.RedirectAction.BuildersetPrefixRewriteBytes(com.google.protobuf.ByteString value)Indicates that during redirection, the matched prefix (or path) should be swapped with this value.RedirectAction.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)RedirectAction.BuildersetResponseCode(RedirectAction.RedirectResponseCode value)The HTTP status code to use in the redirect response.RedirectAction.BuildersetResponseCodeValue(int value)The HTTP status code to use in the redirect response.RedirectAction.BuildersetSchemeRedirect(String value)The scheme portion of the URL will be swapped with this value.RedirectAction.BuildersetSchemeRedirectBytes(com.google.protobuf.ByteString value)The scheme portion of the URL will be swapped with this value.RedirectAction.BuildersetStripQuery(boolean value)Indicates that during redirection, the query portion of the URL will be removed.RedirectAction.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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.Builder<RedirectAction.Builder>
-
clear
public RedirectAction.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
getDefaultInstanceForType
public RedirectAction getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public RedirectAction build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RedirectAction buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RedirectAction.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
setField
public RedirectAction.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
clearField
public RedirectAction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
clearOneof
public RedirectAction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
setRepeatedField
public RedirectAction.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
addRepeatedField
public RedirectAction.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
mergeFrom
public RedirectAction.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RedirectAction.Builder>
-
mergeFrom
public RedirectAction.Builder mergeFrom(RedirectAction other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public RedirectAction.SchemeRewriteSpecifierCase getSchemeRewriteSpecifierCase()
- Specified by:
getSchemeRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
clearSchemeRewriteSpecifier
public RedirectAction.Builder clearSchemeRewriteSpecifier()
-
getPathRewriteSpecifierCase
public RedirectAction.PathRewriteSpecifierCase getPathRewriteSpecifierCase()
- Specified by:
getPathRewriteSpecifierCasein interfaceRedirectActionOrBuilder
-
clearPathRewriteSpecifier
public RedirectAction.Builder 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
public RedirectAction.Builder setHttpsRedirect(boolean value)
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
public RedirectAction.Builder 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
public String 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
public RedirectAction.Builder setSchemeRedirect(String value)
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
public RedirectAction.Builder clearSchemeRedirect()
The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;- Returns:
- This builder for chaining.
-
setSchemeRedirectBytes
public RedirectAction.Builder setSchemeRedirectBytes(com.google.protobuf.ByteString value)
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
public String 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
public RedirectAction.Builder setHostRedirect(String value)
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
public RedirectAction.Builder 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
public RedirectAction.Builder setHostRedirectBytes(com.google.protobuf.ByteString value)
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
public RedirectAction.Builder setPortRedirect(int value)
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
public RedirectAction.Builder 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
public 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) = { ... }- 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
public RedirectAction.Builder setPathRedirect(String value)
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
public RedirectAction.Builder 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
public RedirectAction.Builder setPathRedirectBytes(com.google.protobuf.ByteString value)
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_api_field_route.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Specified by:
hasPrefixRewritein interfaceRedirectActionOrBuilder- Returns:
- Whether the prefixRewrite field is set.
-
getPrefixRewrite
public 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_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.
-
setPrefixRewrite
public RedirectAction.Builder setPrefixRewrite(String value)
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) = { ... }- Parameters:
value- The prefixRewrite to set.- Returns:
- This builder for chaining.
-
clearPrefixRewrite
public RedirectAction.Builder 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_api_field_route.RouteAction.prefix_rewrite>`.
string prefix_rewrite = 5 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setPrefixRewriteBytes
public RedirectAction.Builder setPrefixRewriteBytes(com.google.protobuf.ByteString value)
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) = { ... }- Parameters:
value- The bytes for prefixRewrite to set.- Returns:
- This builder for chaining.
-
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.
-
setResponseCodeValue
public RedirectAction.Builder setResponseCodeValue(int value)
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) = { ... }- Parameters:
value- The enum numeric value on the wire for responseCode to set.- Returns:
- This builder for chaining.
-
getResponseCode
public RedirectAction.RedirectResponseCode 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.
-
setResponseCode
public RedirectAction.Builder setResponseCode(RedirectAction.RedirectResponseCode value)
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) = { ... }- Parameters:
value- The responseCode to set.- Returns:
- This builder for chaining.
-
clearResponseCode
public RedirectAction.Builder clearResponseCode()
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) = { ... }- 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
public RedirectAction.Builder setStripQuery(boolean value)
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
public RedirectAction.Builder 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.
-
setUnknownFields
public final RedirectAction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
mergeUnknownFields
public final RedirectAction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RedirectAction.Builder>
-
-