Class HttpRoute.Redirect.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Redirect.Builder>
com.google.cloud.networkservices.v1.HttpRoute.Redirect.Builder
- All Implemented Interfaces:
HttpRoute.RedirectOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- HttpRoute.Redirect
public static final class HttpRoute.Redirect.Builder
extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Redirect.Builder>
implements HttpRoute.RedirectOrBuilder
The specification for redirecting traffic.Protobuf type
google.cloud.networkservices.v1.HttpRoute.Redirect-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The host that will be used in the redirect response instead of the one that was supplied in the request.If set to true, the URL scheme in the redirected request is set to https.The path that will be used in the redirect response instead of the one that was supplied in the request.The port that will be used in the redirected request instead of the one that was supplied in the request.Indicates that during redirection, the matched prefix (or path) should be swapped with this value.The HTTP Status code to use for the redirect.if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe host that will be used in the redirect response instead of the one that was supplied in the request.com.google.protobuf.ByteStringThe host that will be used in the redirect response instead of the one that was supplied in the request.booleanIf set to true, the URL scheme in the redirected request is set to https.The path that will be used in the redirect response instead of the one that was supplied in the request.com.google.protobuf.ByteStringThe path that will be used in the redirect response instead of the one that was supplied in the request.intThe port that will be used in the redirected request instead of the one that was supplied in the request.Indicates that during redirection, the matched prefix (or path) should be swapped with this value.com.google.protobuf.ByteStringIndicates that during redirection, the matched prefix (or path) should be swapped with this value.The HTTP Status code to use for the redirect.intThe HTTP Status code to use for the redirect.booleanif set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(HttpRoute.Redirect other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setHostRedirect(String value) The host that will be used in the redirect response instead of the one that was supplied in the request.setHostRedirectBytes(com.google.protobuf.ByteString value) The host that will be used in the redirect response instead of the one that was supplied in the request.setHttpsRedirect(boolean value) If set to true, the URL scheme in the redirected request is set to https.setPathRedirect(String value) The path that will be used in the redirect response instead of the one that was supplied in the request.setPathRedirectBytes(com.google.protobuf.ByteString value) The path that will be used in the redirect response instead of the one that was supplied in the request.setPortRedirect(int value) The port that will be used in the redirected request instead of the one that was supplied in the request.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.The HTTP Status code to use for the redirect.setResponseCodeValue(int value) The HTTP Status code to use for the redirect.setStripQuery(boolean value) if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.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
-
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<HttpRoute.Redirect.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<HttpRoute.Redirect.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<HttpRoute.Redirect.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
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpRoute.Redirect.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.Redirect.Builder>
-
mergeFrom
public HttpRoute.Redirect.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<HttpRoute.Redirect.Builder>- Throws:
IOException
-
getHostRedirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
string host_redirect = 1;- Specified by:
getHostRedirectin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The hostRedirect.
-
getHostRedirectBytes
public com.google.protobuf.ByteString getHostRedirectBytes()The host that will be used in the redirect response instead of the one that was supplied in the request.
string host_redirect = 1;- Specified by:
getHostRedirectBytesin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The bytes for hostRedirect.
-
setHostRedirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
string host_redirect = 1;- Parameters:
value- The hostRedirect to set.- Returns:
- This builder for chaining.
-
clearHostRedirect
The host that will be used in the redirect response instead of the one that was supplied in the request.
string host_redirect = 1;- Returns:
- This builder for chaining.
-
setHostRedirectBytes
The host that will be used in the redirect response instead of the one that was supplied in the request.
string host_redirect = 1;- Parameters:
value- The bytes for hostRedirect to set.- Returns:
- This builder for chaining.
-
getPathRedirect
The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
string path_redirect = 2;- Specified by:
getPathRedirectin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The pathRedirect.
-
getPathRedirectBytes
public com.google.protobuf.ByteString getPathRedirectBytes()The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
string path_redirect = 2;- Specified by:
getPathRedirectBytesin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The bytes for pathRedirect.
-
setPathRedirect
The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
string path_redirect = 2;- Parameters:
value- The pathRedirect to set.- Returns:
- This builder for chaining.
-
clearPathRedirect
The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
string path_redirect = 2;- Returns:
- This builder for chaining.
-
setPathRedirectBytes
The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
string path_redirect = 2;- Parameters:
value- The bytes for pathRedirect to set.- Returns:
- This builder for chaining.
-
getPrefixRewrite
Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.
string prefix_rewrite = 3;- Specified by:
getPrefixRewritein interfaceHttpRoute.RedirectOrBuilder- 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 URLs be dynamically created based on the request.
string prefix_rewrite = 3;- Specified by:
getPrefixRewriteBytesin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The bytes for prefixRewrite.
-
setPrefixRewrite
Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.
string prefix_rewrite = 3;- 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 URLs be dynamically created based on the request.
string prefix_rewrite = 3;- Returns:
- This builder for chaining.
-
setPrefixRewriteBytes
Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.
string prefix_rewrite = 3;- Parameters:
value- The bytes for prefixRewrite to set.- Returns:
- This builder for chaining.
-
getResponseCodeValue
public int getResponseCodeValue()The HTTP Status code to use for the redirect.
.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;- Specified by:
getResponseCodeValuein interfaceHttpRoute.RedirectOrBuilder- Returns:
- The enum numeric value on the wire for responseCode.
-
setResponseCodeValue
The HTTP Status code to use for the redirect.
.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;- 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 for the redirect.
.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;- Specified by:
getResponseCodein interfaceHttpRoute.RedirectOrBuilder- Returns:
- The responseCode.
-
setResponseCode
The HTTP Status code to use for the redirect.
.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;- Parameters:
value- The responseCode to set.- Returns:
- This builder for chaining.
-
clearResponseCode
The HTTP Status code to use for the redirect.
.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;- Returns:
- This builder for chaining.
-
getHttpsRedirect
public boolean getHttpsRedirect()If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.
bool https_redirect = 5;- Specified by:
getHttpsRedirectin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The httpsRedirect.
-
setHttpsRedirect
If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.
bool https_redirect = 5;- Parameters:
value- The httpsRedirect to set.- Returns:
- This builder for chaining.
-
clearHttpsRedirect
If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.
bool https_redirect = 5;- Returns:
- This builder for chaining.
-
getStripQuery
public boolean getStripQuery()if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.
bool strip_query = 6;- Specified by:
getStripQueryin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The stripQuery.
-
setStripQuery
if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.
bool strip_query = 6;- Parameters:
value- The stripQuery to set.- Returns:
- This builder for chaining.
-
clearStripQuery
if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.
bool strip_query = 6;- Returns:
- This builder for chaining.
-
getPortRedirect
public int getPortRedirect()The port that will be used in the redirected request instead of the one that was supplied in the request.
int32 port_redirect = 7;- Specified by:
getPortRedirectin interfaceHttpRoute.RedirectOrBuilder- Returns:
- The portRedirect.
-
setPortRedirect
The port that will be used in the redirected request instead of the one that was supplied in the request.
int32 port_redirect = 7;- Parameters:
value- The portRedirect to set.- Returns:
- This builder for chaining.
-
clearPortRedirect
The port that will be used in the redirected request instead of the one that was supplied in the request.
int32 port_redirect = 7;- Returns:
- This builder for chaining.
-