Class BackendBucketCdnPolicyNegativeCachingPolicy.Builder (1.31.0)

public static final class BackendBucketCdnPolicyNegativeCachingPolicy.Builder extends GeneratedMessageV3.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BackendBucketCdnPolicyNegativeCachingPolicy build()
Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy

buildPartial()

public BackendBucketCdnPolicyNegativeCachingPolicy buildPartial()
Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy

clear()

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder clear()
Returns
TypeDescription
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 are can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

This builder for chaining.

clone()

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

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 are can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Returns
TypeDescription
int

The code.

getDefaultInstanceForType()

public BackendBucketCdnPolicyNegativeCachingPolicy getDefaultInstanceForType()
Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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 are can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

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

Whether the ttl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(BackendBucketCdnPolicyNegativeCachingPolicy other)

public BackendBucketCdnPolicyNegativeCachingPolicy.Builder mergeFrom(BackendBucketCdnPolicyNegativeCachingPolicy other)
Parameter
NameDescription
otherBackendBucketCdnPolicyNegativeCachingPolicy
Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BackendBucketCdnPolicyNegativeCachingPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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 are can be specified as values, and you cannot specify a status code more than once.

optional int32 code = 3059181;

Parameter
NameDescription
valueint

The code to set.

Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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

The ttl to set.

Returns
TypeDescription
BackendBucketCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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