Class UrlMapTest.Builder (1.49.0)

public static final class UrlMapTest.Builder extends GeneratedMessageV3.Builder<UrlMapTest.Builder> implements UrlMapTestOrBuilder

Message for the expected URL mappings.

Protobuf type google.cloud.compute.v1.UrlMapTest

Implements

UrlMapTestOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllHeaders(Iterable<? extends UrlMapTestHeader> values)

public UrlMapTest.Builder addAllHeaders(Iterable<? extends UrlMapTestHeader> values)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.UrlMapTestHeader>
Returns
TypeDescription
UrlMapTest.Builder

addHeaders(UrlMapTestHeader value)

public UrlMapTest.Builder addHeaders(UrlMapTestHeader value)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
valueUrlMapTestHeader
Returns
TypeDescription
UrlMapTest.Builder

addHeaders(UrlMapTestHeader.Builder builderForValue)

public UrlMapTest.Builder addHeaders(UrlMapTestHeader.Builder builderForValue)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
builderForValueUrlMapTestHeader.Builder
Returns
TypeDescription
UrlMapTest.Builder

addHeaders(int index, UrlMapTestHeader value)

public UrlMapTest.Builder addHeaders(int index, UrlMapTestHeader value)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameters
NameDescription
indexint
valueUrlMapTestHeader
Returns
TypeDescription
UrlMapTest.Builder

addHeaders(int index, UrlMapTestHeader.Builder builderForValue)

public UrlMapTest.Builder addHeaders(int index, UrlMapTestHeader.Builder builderForValue)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameters
NameDescription
indexint
builderForValueUrlMapTestHeader.Builder
Returns
TypeDescription
UrlMapTest.Builder

addHeadersBuilder()

public UrlMapTestHeader.Builder addHeadersBuilder()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
UrlMapTestHeader.Builder

addHeadersBuilder(int index)

public UrlMapTestHeader.Builder addHeadersBuilder(int index)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
indexint
Returns
TypeDescription
UrlMapTestHeader.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UrlMapTest build()
Returns
TypeDescription
UrlMapTest

buildPartial()

public UrlMapTest buildPartial()
Returns
TypeDescription
UrlMapTest

clear()

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

clearDescription()

public UrlMapTest.Builder clearDescription()

Description of this test case.

optional string description = 422937596;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clearExpectedOutputUrl()

public UrlMapTest.Builder clearExpectedOutputUrl()

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clearExpectedRedirectResponseCode()

public UrlMapTest.Builder clearExpectedRedirectResponseCode()

For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.

optional int32 expected_redirect_response_code = 18888047;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHeaders()

public UrlMapTest.Builder clearHeaders()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
UrlMapTest.Builder

clearHost()

public UrlMapTest.Builder clearHost()

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPath()

public UrlMapTest.Builder clearPath()

Path portion of the URL.

optional string path = 3433509;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clearService()

public UrlMapTest.Builder clearService()

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public UrlMapTest getDefaultInstanceForType()
Returns
TypeDescription
UrlMapTest

getDescription()

public String getDescription()

Description of this test case.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Description of this test case.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExpectedOutputUrl()

public String getExpectedOutputUrl()

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Returns
TypeDescription
String

The expectedOutputUrl.

getExpectedOutputUrlBytes()

public ByteString getExpectedOutputUrlBytes()

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Returns
TypeDescription
ByteString

The bytes for expectedOutputUrl.

getExpectedRedirectResponseCode()

public int getExpectedRedirectResponseCode()

For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.

optional int32 expected_redirect_response_code = 18888047;

Returns
TypeDescription
int

The expectedRedirectResponseCode.

getHeaders(int index)

public UrlMapTestHeader getHeaders(int index)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
indexint
Returns
TypeDescription
UrlMapTestHeader

getHeadersBuilder(int index)

public UrlMapTestHeader.Builder getHeadersBuilder(int index)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
indexint
Returns
TypeDescription
UrlMapTestHeader.Builder

getHeadersBuilderList()

public List<UrlMapTestHeader.Builder> getHeadersBuilderList()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
List<Builder>

getHeadersCount()

public int getHeadersCount()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
int

getHeadersList()

public List<UrlMapTestHeader> getHeadersList()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
List<UrlMapTestHeader>

getHeadersOrBuilder(int index)

public UrlMapTestHeaderOrBuilder getHeadersOrBuilder(int index)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
indexint
Returns
TypeDescription
UrlMapTestHeaderOrBuilder

getHeadersOrBuilderList()

public List<? extends UrlMapTestHeaderOrBuilder> getHeadersOrBuilderList()

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.UrlMapTestHeaderOrBuilder>

getHost()

public String getHost()

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Returns
TypeDescription
String

The host.

getHostBytes()

public ByteString getHostBytes()

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Returns
TypeDescription
ByteString

The bytes for host.

getPath()

public String getPath()

Path portion of the URL.

optional string path = 3433509;

Returns
TypeDescription
String

The path.

getPathBytes()

public ByteString getPathBytes()

Path portion of the URL.

optional string path = 3433509;

Returns
TypeDescription
ByteString

The bytes for path.

getService()

public String getService()

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Returns
TypeDescription
String

The service.

getServiceBytes()

public ByteString getServiceBytes()

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Returns
TypeDescription
ByteString

The bytes for service.

hasDescription()

public boolean hasDescription()

Description of this test case.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasExpectedOutputUrl()

public boolean hasExpectedOutputUrl()

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Returns
TypeDescription
boolean

Whether the expectedOutputUrl field is set.

hasExpectedRedirectResponseCode()

public boolean hasExpectedRedirectResponseCode()

For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.

optional int32 expected_redirect_response_code = 18888047;

Returns
TypeDescription
boolean

Whether the expectedRedirectResponseCode field is set.

hasHost()

public boolean hasHost()

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Returns
TypeDescription
boolean

Whether the host field is set.

hasPath()

public boolean hasPath()

Path portion of the URL.

optional string path = 3433509;

Returns
TypeDescription
boolean

Whether the path field is set.

hasService()

public boolean hasService()

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Returns
TypeDescription
boolean

Whether the service field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(UrlMapTest other)

public UrlMapTest.Builder mergeFrom(UrlMapTest other)
Parameter
NameDescription
otherUrlMapTest
Returns
TypeDescription
UrlMapTest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeHeaders(int index)

public UrlMapTest.Builder removeHeaders(int index)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameter
NameDescription
indexint
Returns
TypeDescription
UrlMapTest.Builder

setDescription(String value)

public UrlMapTest.Builder setDescription(String value)

Description of this test case.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public UrlMapTest.Builder setDescriptionBytes(ByteString value)

Description of this test case.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setExpectedOutputUrl(String value)

public UrlMapTest.Builder setExpectedOutputUrl(String value)

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Parameter
NameDescription
valueString

The expectedOutputUrl to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setExpectedOutputUrlBytes(ByteString value)

public UrlMapTest.Builder setExpectedOutputUrlBytes(ByteString value)

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional when service is specified.

optional string expected_output_url = 433967384;

Parameter
NameDescription
valueByteString

The bytes for expectedOutputUrl to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setExpectedRedirectResponseCode(int value)

public UrlMapTest.Builder setExpectedRedirectResponseCode(int value)

For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.

optional int32 expected_redirect_response_code = 18888047;

Parameter
NameDescription
valueint

The expectedRedirectResponseCode to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setHeaders(int index, UrlMapTestHeader value)

public UrlMapTest.Builder setHeaders(int index, UrlMapTestHeader value)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameters
NameDescription
indexint
valueUrlMapTestHeader
Returns
TypeDescription
UrlMapTest.Builder

setHeaders(int index, UrlMapTestHeader.Builder builderForValue)

public UrlMapTest.Builder setHeaders(int index, UrlMapTestHeader.Builder builderForValue)

HTTP headers for this request. If headers contains a host header, then host must also match the header value.

repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;

Parameters
NameDescription
indexint
builderForValueUrlMapTestHeader.Builder
Returns
TypeDescription
UrlMapTest.Builder

setHost(String value)

public UrlMapTest.Builder setHost(String value)

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Parameter
NameDescription
valueString

The host to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setHostBytes(ByteString value)

public UrlMapTest.Builder setHostBytes(ByteString value)

Host portion of the URL. If headers contains a host header, then host must also match the header value.

optional string host = 3208616;

Parameter
NameDescription
valueByteString

The bytes for host to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setPath(String value)

public UrlMapTest.Builder setPath(String value)

Path portion of the URL.

optional string path = 3433509;

Parameter
NameDescription
valueString

The path to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setPathBytes(ByteString value)

public UrlMapTest.Builder setPathBytes(ByteString value)

Path portion of the URL.

optional string path = 3433509;

Parameter
NameDescription
valueByteString

The bytes for path to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public UrlMapTest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UrlMapTest.Builder
Overrides

setService(String value)

public UrlMapTest.Builder setService(String value)

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Parameter
NameDescription
valueString

The service to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setServiceBytes(ByteString value)

public UrlMapTest.Builder setServiceBytes(ByteString value)

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.

optional string service = 373540533;

Parameter
NameDescription
valueByteString

The bytes for service to set.

Returns
TypeDescription
UrlMapTest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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