Class HttpRoute.Redirect.Builder (0.11.0)

public static final class HttpRoute.Redirect.Builder extends GeneratedMessageV3.Builder<HttpRoute.Redirect.Builder> implements HttpRoute.RedirectOrBuilder

The specification for redirecting traffic.

Protobuf type google.cloud.networkservices.v1.HttpRoute.Redirect

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.Redirect.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

build()

public HttpRoute.Redirect build()
Returns
Type Description
HttpRoute.Redirect

buildPartial()

public HttpRoute.Redirect buildPartial()
Returns
Type Description
HttpRoute.Redirect

clear()

public HttpRoute.Redirect.Builder clear()
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public HttpRoute.Redirect.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

clearHostRedirect()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearHttpsRedirect()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpRoute.Redirect.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

clearPathRedirect()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearPortRedirect()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearPrefixRewrite()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearResponseCode()

public HttpRoute.Redirect.Builder clearResponseCode()

The HTTP Status code to use for the redirect.

.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clearStripQuery()

public HttpRoute.Redirect.Builder 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
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

clone()

public HttpRoute.Redirect.Builder clone()
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

getDefaultInstanceForType()

public HttpRoute.Redirect getDefaultInstanceForType()
Returns
Type Description
HttpRoute.Redirect

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHostRedirect()

public String 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;

Returns
Type Description
String

The hostRedirect.

getHostRedirectBytes()

public 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;

Returns
Type Description
ByteString

The bytes for hostRedirect.

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;

Returns
Type Description
boolean

The httpsRedirect.

getPathRedirect()

public String 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;

Returns
Type Description
String

The pathRedirect.

getPathRedirectBytes()

public 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;

Returns
Type Description
ByteString

The bytes for pathRedirect.

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;

Returns
Type Description
int

The portRedirect.

getPrefixRewrite()

public String 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;

Returns
Type Description
String

The prefixRewrite.

getPrefixRewriteBytes()

public 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;

Returns
Type Description
ByteString

The bytes for prefixRewrite.

getResponseCode()

public HttpRoute.Redirect.ResponseCode getResponseCode()

The HTTP Status code to use for the redirect.

.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;

Returns
Type Description
HttpRoute.Redirect.ResponseCode

The responseCode.

getResponseCodeValue()

public int getResponseCodeValue()

The HTTP Status code to use for the redirect.

.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;

Returns
Type Description
int

The enum numeric value on the wire for responseCode.

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;

Returns
Type Description
boolean

The stripQuery.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HttpRoute.Redirect other)

public HttpRoute.Redirect.Builder mergeFrom(HttpRoute.Redirect other)
Parameter
Name Description
other HttpRoute.Redirect
Returns
Type Description
HttpRoute.Redirect.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HttpRoute.Redirect.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HttpRoute.Redirect.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.Redirect.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.Redirect.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

setHostRedirect(String value)

public HttpRoute.Redirect.Builder setHostRedirect(String value)

The host that will be used in the redirect response instead of the one that was supplied in the request.

string host_redirect = 1;

Parameter
Name Description
value String

The hostRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setHostRedirectBytes(ByteString value)

public HttpRoute.Redirect.Builder setHostRedirectBytes(ByteString value)

The host that will be used in the redirect response instead of the one that was supplied in the request.

string host_redirect = 1;

Parameter
Name Description
value ByteString

The bytes for hostRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setHttpsRedirect(boolean value)

public HttpRoute.Redirect.Builder setHttpsRedirect(boolean value)

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;

Parameter
Name Description
value boolean

The httpsRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setPathRedirect(String value)

public HttpRoute.Redirect.Builder setPathRedirect(String value)

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;

Parameter
Name Description
value String

The pathRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setPathRedirectBytes(ByteString value)

public HttpRoute.Redirect.Builder setPathRedirectBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for pathRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setPortRedirect(int value)

public HttpRoute.Redirect.Builder setPortRedirect(int value)

The port that will be used in the redirected request instead of the one that was supplied in the request.

int32 port_redirect = 7;

Parameter
Name Description
value int

The portRedirect to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setPrefixRewrite(String value)

public HttpRoute.Redirect.Builder setPrefixRewrite(String value)

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;

Parameter
Name Description
value String

The prefixRewrite to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setPrefixRewriteBytes(ByteString value)

public HttpRoute.Redirect.Builder setPrefixRewriteBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for prefixRewrite to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public HttpRoute.Redirect.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

setResponseCode(HttpRoute.Redirect.ResponseCode value)

public HttpRoute.Redirect.Builder setResponseCode(HttpRoute.Redirect.ResponseCode value)

The HTTP Status code to use for the redirect.

.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;

Parameter
Name Description
value HttpRoute.Redirect.ResponseCode

The responseCode to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setResponseCodeValue(int value)

public HttpRoute.Redirect.Builder setResponseCodeValue(int value)

The HTTP Status code to use for the redirect.

.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for responseCode to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setStripQuery(boolean value)

public HttpRoute.Redirect.Builder setStripQuery(boolean value)

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;

Parameter
Name Description
value boolean

The stripQuery to set.

Returns
Type Description
HttpRoute.Redirect.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.Redirect.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides