Class BackendServiceCdnPolicyNegativeCachingPolicy.Builder (1.17.0)

public static final class BackendServiceCdnPolicyNegativeCachingPolicy.Builder extends GeneratedMessageV3.Builder<BackendServiceCdnPolicyNegativeCachingPolicy.Builder> implements BackendServiceCdnPolicyNegativeCachingPolicyOrBuilder

Specify CDN TTLs for response error codes.

Protobuf type google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BackendServiceCdnPolicyNegativeCachingPolicy build()
Returns

buildPartial()

public BackendServiceCdnPolicyNegativeCachingPolicy buildPartial()
Returns

clear()

public BackendServiceCdnPolicyNegativeCachingPolicy.Builder clear()
Returns Overrides

clearCode()

public BackendServiceCdnPolicyNegativeCachingPolicy.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
BackendServiceCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTtl()

public BackendServiceCdnPolicyNegativeCachingPolicy.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
BackendServiceCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

clone()

public BackendServiceCdnPolicyNegativeCachingPolicy.Builder clone()
Returns 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 BackendServiceCdnPolicyNegativeCachingPolicy getDefaultInstanceForType()
Returns

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(BackendServiceCdnPolicyNegativeCachingPolicy other)

public BackendServiceCdnPolicyNegativeCachingPolicy.Builder mergeFrom(BackendServiceCdnPolicyNegativeCachingPolicy other)
Parameter Returns

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCode(int value)

public BackendServiceCdnPolicyNegativeCachingPolicy.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
BackendServiceCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTtl(int value)

public BackendServiceCdnPolicyNegativeCachingPolicy.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
BackendServiceCdnPolicyNegativeCachingPolicy.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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