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.GeneratedMessage.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.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite.If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorBefore forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.com.google.protobuf.ByteStringBefore forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite.com.google.protobuf.ByteStringBefore forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite.If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.com.google.protobuf.ByteStringIf specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.booleanBefore forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.booleanBefore forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite.booleanIf specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(UrlRewrite other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setHostRewrite(String value) Before forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.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.setPathPrefixRewrite(String value) Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite.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 bypathPrefixRewrite.setPathTemplateRewrite(String value) If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.setPathTemplateRewriteBytes(com.google.protobuf.ByteString value) If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<UrlRewrite.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<UrlRewrite.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<UrlRewrite.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<UrlRewrite.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<UrlRewrite.Builder>
-
mergeFrom
public UrlRewrite.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
hasHostRewritein interfaceUrlRewriteOrBuilder- Returns:
- Whether the hostRewrite field is set.
-
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:
getHostRewritein 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:
getHostRewriteBytesin interfaceUrlRewriteOrBuilder- Returns:
- The bytes for hostRewrite.
-
setHostRewrite
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
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
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 bypathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;- Specified by:
hasPathPrefixRewritein interfaceUrlRewriteOrBuilder- Returns:
- Whether the pathPrefixRewrite field is set.
-
getPathPrefixRewrite
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;- Specified by:
getPathPrefixRewritein 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 bypathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;- Specified by:
getPathPrefixRewriteBytesin interfaceUrlRewriteOrBuilder- Returns:
- The bytes for pathPrefixRewrite.
-
setPathPrefixRewrite
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite. 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
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite. The value must be from 1 to 1024 characters.
optional string path_prefix_rewrite = 41186361;- Returns:
- This builder for chaining.
-
setPathPrefixRewriteBytes
Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced bypathPrefixRewrite. 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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Specified by:
hasPathTemplateRewritein interfaceUrlRewriteOrBuilder- Returns:
- Whether the pathTemplateRewrite field is set.
-
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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Specified by:
getPathTemplateRewritein 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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Specified by:
getPathTemplateRewriteBytesin interfaceUrlRewriteOrBuilder- Returns:
- The bytes for pathTemplateRewrite.
-
setPathTemplateRewrite
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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Parameters:
value- The pathTemplateRewrite to set.- Returns:
- This builder for chaining.
-
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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Returns:
- This builder for chaining.
-
setPathTemplateRewriteBytes
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 orpath_template_rewrite may be specified.optional string path_template_rewrite = 423409569;- Parameters:
value- The bytes for pathTemplateRewrite to set.- Returns:
- This builder for chaining.
-