Class BackendBucketCdnPolicyNegativeCachingPolicy.Builder (1.93.0)

public static final class BackendBucketCdnPolicyNegativeCachingPolicy.Builder extends GeneratedMessage.Builder<BackendBucketCdnPolicyNegativeCachingPolicy.Builder> implements BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder

Specify CDN TTLs for response error codes.

Protobuf type google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public BackendBucketCdnPolicyNegativeCachingPolicy build()
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy

buildPartial()

public BackendBucketCdnPolicyNegativeCachingPolicy buildPartial()
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy

clear()

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder clear()
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder
Overrides

clearCode()

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder clearCode()

The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

clearTtl()

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder clearTtl()

The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.

optional int32 ttl = 115180;

Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

getCode()

public int getCode()

The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Returns
Type Description
int

The code.

getDefaultInstanceForType()

public BackendBucketCdnPolicyNegativeCachingPolicy getDefaultInstanceForType()
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getTtl()

public int getTtl()

The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.

optional int32 ttl = 115180;

Returns
Type Description
int

The ttl.

hasCode()

public boolean hasCode()

The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Returns
Type Description
boolean

Whether the code field is set.

hasTtl()

public boolean hasTtl()

The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.

optional int32 ttl = 115180;

Returns
Type Description
boolean

Whether the ttl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BackendBucketCdnPolicyNegativeCachingPolicy other)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder mergeFrom(BackendBucketCdnPolicyNegativeCachingPolicy other)
Parameter
Name Description
other BackendBucketCdnPolicyNegativeCachingPolicy
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder
Overrides

setCode(int value)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder setCode(int value)

The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Parameter
Name Description
value int

The code to set.

Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

setTtl(int value)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder setTtl(int value)

The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.

optional int32 ttl = 115180;

Parameter
Name Description
value int

The ttl to set.

Returns
Type Description
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.