public final class HttpRedirectAction extends GeneratedMessageV3 implements HttpRedirectActionOrBuilder
Specifies settings for an HTTP redirect.
Protobuf type google.cloud.compute.v1.HttpRedirectAction
Fields
HOST_REDIRECT_FIELD_NUMBER
public static final int HOST_REDIRECT_FIELD_NUMBER
Field Value
HTTPS_REDIRECT_FIELD_NUMBER
public static final int HTTPS_REDIRECT_FIELD_NUMBER
Field Value
PATH_REDIRECT_FIELD_NUMBER
public static final int PATH_REDIRECT_FIELD_NUMBER
Field Value
PREFIX_REDIRECT_FIELD_NUMBER
public static final int PREFIX_REDIRECT_FIELD_NUMBER
Field Value
REDIRECT_RESPONSE_CODE_FIELD_NUMBER
public static final int REDIRECT_RESPONSE_CODE_FIELD_NUMBER
Field Value
STRIP_QUERY_FIELD_NUMBER
public static final int STRIP_QUERY_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstance()
public static HttpRedirectAction getDefaultInstance()
Returns
getDefaultInstanceForType()
public HttpRedirectAction getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getHostRedirect()
public String getHostRedirect()
The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.
optional string host_redirect = 107417747;
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. The value must be between 1 and 255 characters.
optional string host_redirect = 107417747;
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. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.
optional bool https_redirect = 170260656;
Returns
Type | Description |
boolean | The httpsRedirect.
|
getParserForType()
public Parser<HttpRedirectAction> getParserForType()
Returns
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. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string path_redirect = 272342710;
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. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string path_redirect = 272342710;
Returns
Type | Description |
ByteString | The bytes for pathRedirect.
|
getPrefixRedirect()
public String getPrefixRedirect()
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string prefix_redirect = 446184169;
Returns
Type | Description |
String | The prefixRedirect.
|
getPrefixRedirectBytes()
public ByteString getPrefixRedirectBytes()
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string prefix_redirect = 446184169;
Returns
Type | Description |
ByteString | The bytes for prefixRedirect.
|
getRedirectResponseCode()
public String getRedirectResponseCode()
The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
Check the RedirectResponseCode enum for the list of possible values.
optional string redirect_response_code = 436710408;
Returns
Type | Description |
String | The redirectResponseCode.
|
getRedirectResponseCodeBytes()
public ByteString getRedirectResponseCodeBytes()
The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
Check the RedirectResponseCode enum for the list of possible values.
optional string redirect_response_code = 436710408;
Returns
Type | Description |
ByteString | The bytes for redirectResponseCode.
|
getSerializedSize()
public int getSerializedSize()
Returns
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.
optional bool strip_query = 52284641;
Returns
Type | Description |
boolean | The stripQuery.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasHostRedirect()
public boolean hasHostRedirect()
The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters.
optional string host_redirect = 107417747;
Returns
Type | Description |
boolean | Whether the hostRedirect field is set.
|
hasHttpsRedirect()
public boolean hasHttpsRedirect()
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. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false.
optional bool https_redirect = 170260656;
Returns
Type | Description |
boolean | Whether the httpsRedirect field is set.
|
hasPathRedirect()
public boolean hasPathRedirect()
The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string path_redirect = 272342710;
Returns
Type | Description |
boolean | Whether the pathRedirect field is set.
|
hasPrefixRedirect()
public boolean hasPrefixRedirect()
The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters.
optional string prefix_redirect = 446184169;
Returns
Type | Description |
boolean | Whether the prefixRedirect field is set.
|
hasRedirectResponseCode()
public boolean hasRedirectResponseCode()
The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.
Check the RedirectResponseCode enum for the list of possible values.
optional string redirect_response_code = 436710408;
Returns
Type | Description |
boolean | Whether the redirectResponseCode field is set.
|
hasStripQuery()
public boolean hasStripQuery()
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.
optional bool strip_query = 52284641;
Returns
Type | Description |
boolean | Whether the stripQuery field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static HttpRedirectAction.Builder newBuilder()
Returns
newBuilder(HttpRedirectAction prototype)
public static HttpRedirectAction.Builder newBuilder(HttpRedirectAction prototype)
Parameter
Returns
newBuilderForType()
public HttpRedirectAction.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected HttpRedirectAction.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static HttpRedirectAction parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static HttpRedirectAction parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static HttpRedirectAction parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static HttpRedirectAction parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static HttpRedirectAction parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static HttpRedirectAction parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static HttpRedirectAction parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static HttpRedirectAction parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static HttpRedirectAction parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static HttpRedirectAction parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static HttpRedirectAction parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static HttpRedirectAction parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<HttpRedirectAction> parser()
Returns
toBuilder()
public HttpRedirectAction.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions