Class HttpRoute.Redirect (0.15.0)

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

The specification for redirecting traffic.

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

Static Fields

HOST_REDIRECT_FIELD_NUMBER

public static final int HOST_REDIRECT_FIELD_NUMBER
Field Value
TypeDescription
int

HTTPS_REDIRECT_FIELD_NUMBER

public static final int HTTPS_REDIRECT_FIELD_NUMBER
Field Value
TypeDescription
int

PATH_REDIRECT_FIELD_NUMBER

public static final int PATH_REDIRECT_FIELD_NUMBER
Field Value
TypeDescription
int

PORT_REDIRECT_FIELD_NUMBER

public static final int PORT_REDIRECT_FIELD_NUMBER
Field Value
TypeDescription
int

PREFIX_REWRITE_FIELD_NUMBER

public static final int PREFIX_REWRITE_FIELD_NUMBER
Field Value
TypeDescription
int

RESPONSE_CODE_FIELD_NUMBER

public static final int RESPONSE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

STRIP_QUERY_FIELD_NUMBER

public static final int STRIP_QUERY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static HttpRoute.Redirect getDefaultInstance()
Returns
TypeDescription
HttpRoute.Redirect

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static HttpRoute.Redirect.Builder newBuilder()
Returns
TypeDescription
HttpRoute.Redirect.Builder

newBuilder(HttpRoute.Redirect prototype)

public static HttpRoute.Redirect.Builder newBuilder(HttpRoute.Redirect prototype)
Parameter
NameDescription
prototypeHttpRoute.Redirect
Returns
TypeDescription
HttpRoute.Redirect.Builder

parseDelimitedFrom(InputStream input)

public static HttpRoute.Redirect parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static HttpRoute.Redirect parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HttpRoute.Redirect parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HttpRoute.Redirect parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static HttpRoute.Redirect parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static HttpRoute.Redirect parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.Redirect parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.Redirect
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public HttpRoute.Redirect getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The httpsRedirect.

getParserForType()

public Parser<HttpRoute.Redirect> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for prefixRewrite.

getResponseCode()

public HttpRoute.Redirect.ResponseCode getResponseCode()

The HTTP Status code to use for the redirect.

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

Returns
TypeDescription
HttpRoute.Redirect.ResponseCode

The responseCode.

getResponseCodeValue()

public int getResponseCodeValue()

The HTTP Status code to use for the redirect.

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

Returns
TypeDescription
int

The enum numeric value on the wire for responseCode.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
boolean

The stripQuery.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public HttpRoute.Redirect.Builder newBuilderForType()
Returns
TypeDescription
HttpRoute.Redirect.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HttpRoute.Redirect.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
HttpRoute.Redirect.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public HttpRoute.Redirect.Builder toBuilder()
Returns
TypeDescription
HttpRoute.Redirect.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException