Class HttpRoute.Redirect (0.1.0)

public static final class HttpRoute.Redirect extends GeneratedMessageV3 implements HttpRoute.RedirectOrBuilder

The specification for redirecting traffic.

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

Static Fields

HOST_REDIRECT_FIELD_NUMBER

public static final int HOST_REDIRECT_FIELD_NUMBER
Field Value
Type Description
int

HTTPS_REDIRECT_FIELD_NUMBER

public static final int HTTPS_REDIRECT_FIELD_NUMBER
Field Value
Type Description
int

PATH_REDIRECT_FIELD_NUMBER

public static final int PATH_REDIRECT_FIELD_NUMBER
Field Value
Type Description
int

PORT_REDIRECT_FIELD_NUMBER

public static final int PORT_REDIRECT_FIELD_NUMBER
Field Value
Type Description
int

PREFIX_REWRITE_FIELD_NUMBER

public static final int PREFIX_REWRITE_FIELD_NUMBER
Field Value
Type Description
int

RESPONSE_CODE_FIELD_NUMBER

public static final int RESPONSE_CODE_FIELD_NUMBER
Field Value
Type Description
int

STRIP_QUERY_FIELD_NUMBER

public static final int STRIP_QUERY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static HttpRoute.Redirect getDefaultInstance()
Returns
Type Description
HttpRoute.Redirect

getDescriptor()

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

newBuilder()

public static HttpRoute.Redirect.Builder newBuilder()
Returns
Type Description
HttpRoute.Redirect.Builder

newBuilder(HttpRoute.Redirect prototype)

public static HttpRoute.Redirect.Builder newBuilder(HttpRoute.Redirect prototype)
Parameter
Name Description
prototype HttpRoute.Redirect
Returns
Type Description
HttpRoute.Redirect.Builder

parseDelimitedFrom(InputStream input)

public static HttpRoute.Redirect parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static HttpRoute.Redirect parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HttpRoute.Redirect parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HttpRoute.Redirect parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static HttpRoute.Redirect parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static HttpRoute.Redirect parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.Redirect
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<HttpRoute.Redirect> parser()
Returns
Type Description
Parser<Redirect>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

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

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.

getParserForType()

public Parser<HttpRoute.Redirect> getParserForType()
Returns
Type Description
Parser<Redirect>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public HttpRoute.Redirect.Builder newBuilderForType()
Returns
Type Description
HttpRoute.Redirect.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HttpRoute.Redirect.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
HttpRoute.Redirect.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public HttpRoute.Redirect.Builder toBuilder()
Returns
Type Description
HttpRoute.Redirect.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException