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 type
google.cloud.compute.v1.UrlRewrite| Modifier and Type | Method and 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(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
UrlRewrite.Builder |
mergeFrom(com.google.protobuf.Message other) |
UrlRewrite.Builder |
mergeFrom(UrlRewrite 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) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic UrlRewrite build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic UrlRewrite buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic UrlRewrite.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<UrlRewrite.Builder>public UrlRewrite.Builder mergeFrom(UrlRewrite other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public UrlRewrite.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<UrlRewrite.Builder>IOExceptionpublic 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;hasHostRewrite in interface UrlRewriteOrBuilderpublic 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;getHostRewrite in interface UrlRewriteOrBuilderpublic 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;getHostRewriteBytes in interface UrlRewriteOrBuilderpublic 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;value - The hostRewrite to set.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;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;value - The bytes for hostRewrite to set.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;hasPathPrefixRewrite in interface UrlRewriteOrBuilderpublic 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;getPathPrefixRewrite in interface UrlRewriteOrBuilderpublic 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;getPathPrefixRewriteBytes in interface UrlRewriteOrBuilderpublic 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;value - The pathPrefixRewrite to set.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;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;value - The bytes for pathPrefixRewrite to set.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;hasPathTemplateRewrite in interface UrlRewriteOrBuilderpublic 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;getPathTemplateRewrite in interface UrlRewriteOrBuilderpublic 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;getPathTemplateRewriteBytes in interface UrlRewriteOrBuilderpublic 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;value - The pathTemplateRewrite to set.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;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;value - The bytes for pathTemplateRewrite to set.public final UrlRewrite.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>public final UrlRewrite.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UrlRewrite.Builder>Copyright © 2025 Google LLC. All rights reserved.