Class UrlRewrite.Builder (1.24.0)

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

Implements

UrlRewriteOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public UrlRewrite.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UrlRewrite.Builder
Overrides

build()

public UrlRewrite build()
Returns
TypeDescription
UrlRewrite

buildPartial()

public UrlRewrite buildPartial()
Returns
TypeDescription
UrlRewrite

clear()

public UrlRewrite.Builder clear()
Returns
TypeDescription
UrlRewrite.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public UrlRewrite.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
UrlRewrite.Builder
Overrides

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
TypeDescription
UrlRewrite.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public UrlRewrite.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
UrlRewrite.Builder
Overrides

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
TypeDescription
UrlRewrite.Builder

This builder for chaining.

clone()

public UrlRewrite.Builder clone()
Returns
TypeDescription
UrlRewrite.Builder
Overrides

getDefaultInstanceForType()

public UrlRewrite getDefaultInstanceForType()
Returns
TypeDescription
UrlRewrite

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for pathPrefixRewrite.

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
TypeDescription
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
TypeDescription
boolean

Whether the pathPrefixRewrite field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(UrlRewrite other)

public UrlRewrite.Builder mergeFrom(UrlRewrite other)
Parameter
NameDescription
otherUrlRewrite
Returns
TypeDescription
UrlRewrite.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public UrlRewrite.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UrlRewrite.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public UrlRewrite.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
UrlRewrite.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UrlRewrite.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UrlRewrite.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public UrlRewrite.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UrlRewrite.Builder
Overrides

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
NameDescription
valueString

The hostRewrite to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for hostRewrite to set.

Returns
TypeDescription
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
NameDescription
valueString

The pathPrefixRewrite to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for pathPrefixRewrite to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UrlRewrite.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final UrlRewrite.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UrlRewrite.Builder
Overrides