- 1.62.0 (latest)
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public static final class UrlRewrite.Builder extends 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > UrlRewrite.BuilderImplements
UrlRewriteOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public UrlRewrite.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
build()
public UrlRewrite build()
Returns | |
---|---|
Type | Description |
UrlRewrite |
buildPartial()
public UrlRewrite buildPartial()
Returns | |
---|---|
Type | Description |
UrlRewrite |
clear()
public UrlRewrite.Builder clear()
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
clearField(Descriptors.FieldDescriptor field)
public UrlRewrite.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
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 | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public UrlRewrite.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
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 | |
---|---|
Type | Description |
UrlRewrite.Builder |
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 | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
clone()
public UrlRewrite.Builder clone()
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
getDefaultInstanceForType()
public UrlRewrite getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
UrlRewrite |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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;
Returns | |
---|---|
Type | Description |
String |
The hostRewrite. |
getHostRewriteBytes()
public 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;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for hostRewrite. |
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;
Returns | |
---|---|
Type | Description |
String |
The pathPrefixRewrite. |
getPathPrefixRewriteBytes()
public 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;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for pathPrefixRewrite. |
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;
Returns | |
---|---|
Type | Description |
String |
The pathTemplateRewrite. |
getPathTemplateRewriteBytes()
public 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;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for pathTemplateRewrite. |
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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the hostRewrite field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the pathPrefixRewrite field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the pathTemplateRewrite field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(UrlRewrite other)
public UrlRewrite.Builder mergeFrom(UrlRewrite other)
Parameter | |
---|---|
Name | Description |
other |
UrlRewrite |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public UrlRewrite.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public UrlRewrite.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final UrlRewrite.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public UrlRewrite.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
setHostRewrite(String value)
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;
Parameter | |
---|---|
Name | Description |
value |
String The hostRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setHostRewriteBytes(ByteString value)
public UrlRewrite.Builder setHostRewriteBytes(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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for hostRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setPathPrefixRewrite(String value)
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;
Parameter | |
---|---|
Name | Description |
value |
String The pathPrefixRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setPathPrefixRewriteBytes(ByteString value)
public UrlRewrite.Builder setPathPrefixRewriteBytes(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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for pathPrefixRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setPathTemplateRewrite(String value)
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;
Parameter | |
---|---|
Name | Description |
value |
String The pathTemplateRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setPathTemplateRewriteBytes(ByteString value)
public UrlRewrite.Builder setPathTemplateRewriteBytes(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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for pathTemplateRewrite to set. |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public UrlRewrite.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final UrlRewrite.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
UrlRewrite.Builder |