Package com.google.cloud.compute.v1
Class UrlRewrite.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
- com.google.cloud.compute.v1.UrlRewrite.Builder
-
- All Implemented Interfaces:
UrlRewriteOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- UrlRewrite
public static final class UrlRewrite.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder> implements UrlRewriteOrBuilder
The spec for modifying the path before sending the request to the matched backend service.
Protobuf typegoogle.cloud.compute.v1.UrlRewrite
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlRewrite.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
UrlRewrite
build()
UrlRewrite
buildPartial()
UrlRewrite.Builder
clear()
UrlRewrite.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
UrlRewrite.Builder
clearHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.UrlRewrite.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
UrlRewrite.Builder
clearPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.UrlRewrite.Builder
clearPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.UrlRewrite.Builder
clone()
UrlRewrite
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.com.google.protobuf.ByteString
getHostRewriteBytes()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.String
getPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.com.google.protobuf.ByteString
getPathPrefixRewriteBytes()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.String
getPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.com.google.protobuf.ByteString
getPathTemplateRewriteBytes()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.boolean
hasHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.boolean
hasPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.boolean
hasPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
UrlRewrite.Builder
mergeFrom(UrlRewrite other)
UrlRewrite.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
UrlRewrite.Builder
mergeFrom(com.google.protobuf.Message other)
UrlRewrite.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
UrlRewrite.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
UrlRewrite.Builder
setHostRewrite(String value)
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.UrlRewrite.Builder
setHostRewriteBytes(com.google.protobuf.ByteString value)
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.UrlRewrite.Builder
setPathPrefixRewrite(String value)
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.UrlRewrite.Builder
setPathPrefixRewriteBytes(com.google.protobuf.ByteString value)
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.UrlRewrite.Builder
setPathTemplateRewrite(String value)
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.UrlRewrite.Builder
setPathTemplateRewriteBytes(com.google.protobuf.ByteString value)
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.UrlRewrite.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
UrlRewrite.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
clear
public UrlRewrite.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
getDefaultInstanceForType
public UrlRewrite getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public UrlRewrite build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public UrlRewrite buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public UrlRewrite.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
setField
public UrlRewrite.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
clearField
public UrlRewrite.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
clearOneof
public UrlRewrite.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
setRepeatedField
public UrlRewrite.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
addRepeatedField
public UrlRewrite.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
mergeFrom
public UrlRewrite.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<UrlRewrite.Builder>
-
mergeFrom
public UrlRewrite.Builder mergeFrom(UrlRewrite other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
mergeFrom
public UrlRewrite.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<UrlRewrite.Builder>
- Throws:
IOException
-
hasHostRewrite
public boolean hasHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Specified by:
hasHostRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- Whether the hostRewrite field is set.
-
getHostRewrite
public String getHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Specified by:
getHostRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- The hostRewrite.
-
getHostRewriteBytes
public com.google.protobuf.ByteString getHostRewriteBytes()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Specified by:
getHostRewriteBytes
in interfaceUrlRewriteOrBuilder
- Returns:
- The bytes for hostRewrite.
-
setHostRewrite
public UrlRewrite.Builder setHostRewrite(String value)
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Parameters:
value
- The hostRewrite to set.- Returns:
- This builder for chaining.
-
clearHostRewrite
public UrlRewrite.Builder clearHostRewrite()
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Returns:
- This builder for chaining.
-
setHostRewriteBytes
public UrlRewrite.Builder setHostRewriteBytes(com.google.protobuf.ByteString value)
Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be from 1 to 255 characters.
optional string host_rewrite = 159819253;
- Parameters:
value
- The bytes for hostRewrite to set.- Returns:
- This builder for chaining.
-
hasPathPrefixRewrite
public boolean hasPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Specified by:
hasPathPrefixRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- Whether the pathPrefixRewrite field is set.
-
getPathPrefixRewrite
public String getPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Specified by:
getPathPrefixRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- The pathPrefixRewrite.
-
getPathPrefixRewriteBytes
public com.google.protobuf.ByteString getPathPrefixRewriteBytes()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Specified by:
getPathPrefixRewriteBytes
in interfaceUrlRewriteOrBuilder
- Returns:
- The bytes for pathPrefixRewrite.
-
setPathPrefixRewrite
public UrlRewrite.Builder setPathPrefixRewrite(String value)
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Parameters:
value
- The pathPrefixRewrite to set.- Returns:
- This builder for chaining.
-
clearPathPrefixRewrite
public UrlRewrite.Builder clearPathPrefixRewrite()
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Returns:
- This builder for chaining.
-
setPathPrefixRewriteBytes
public UrlRewrite.Builder setPathPrefixRewriteBytes(com.google.protobuf.ByteString value)
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;
- Parameters:
value
- The bytes for pathPrefixRewrite to set.- Returns:
- This builder for chaining.
-
hasPathTemplateRewrite
public boolean hasPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Specified by:
hasPathTemplateRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- Whether the pathTemplateRewrite field is set.
-
getPathTemplateRewrite
public String getPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Specified by:
getPathTemplateRewrite
in interfaceUrlRewriteOrBuilder
- Returns:
- The pathTemplateRewrite.
-
getPathTemplateRewriteBytes
public com.google.protobuf.ByteString getPathTemplateRewriteBytes()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Specified by:
getPathTemplateRewriteBytes
in interfaceUrlRewriteOrBuilder
- Returns:
- The bytes for pathTemplateRewrite.
-
setPathTemplateRewrite
public UrlRewrite.Builder setPathTemplateRewrite(String value)
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Parameters:
value
- The pathTemplateRewrite to set.- Returns:
- This builder for chaining.
-
clearPathTemplateRewrite
public UrlRewrite.Builder clearPathTemplateRewrite()
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Returns:
- This builder for chaining.
-
setPathTemplateRewriteBytes
public UrlRewrite.Builder setPathTemplateRewriteBytes(com.google.protobuf.ByteString value)
If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.
optional string path_template_rewrite = 423409569;
- Parameters:
value
- The bytes for pathTemplateRewrite to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final UrlRewrite.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
mergeUnknownFields
public final UrlRewrite.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>
-
-