Class RapidCache.Builder (2.71.0)

public static final class RapidCache.Builder extends GeneratedMessage.Builder<RapidCache.Builder> implements RapidCacheOrBuilder

A Rapid Cache Instance.

Protobuf type google.storage.control.v2.RapidCache

Implements

RapidCacheOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public RapidCache build()
Returns
Type Description
RapidCache

buildPartial()

public RapidCache buildPartial()
Returns
Type Description
RapidCache

clear()

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

clearAdmissionPolicy()

public RapidCache.Builder clearAdmissionPolicy()

Cache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.

string admission_policy = 5;

Returns
Type Description
RapidCache.Builder

This builder for chaining.

clearCacheType()

public RapidCache.Builder clearCacheType()

Immutable. The type of Rapid Cache this represents. Valid values include: 'rapid-cache' and 'rapid-cache-ultra'.

string cache_type = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
RapidCache.Builder

This builder for chaining.

clearCreateTime()

public RapidCache.Builder clearCreateTime()

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
RapidCache.Builder

clearName()

public RapidCache.Builder clearName()

Immutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
RapidCache.Builder

This builder for chaining.

clearPendingUpdate()

public RapidCache.Builder clearPendingUpdate()

Output only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.

bool pending_update = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
RapidCache.Builder

This builder for chaining.

clearState()

public RapidCache.Builder clearState()

Output only. Cache state including running, creating, and disabled.

string state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
RapidCache.Builder

This builder for chaining.

clearTtl()

public RapidCache.Builder clearTtl()

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Returns
Type Description
RapidCache.Builder

clearUpdateTime()

public RapidCache.Builder clearUpdateTime()

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
RapidCache.Builder

clearZone()

public RapidCache.Builder clearZone()

Immutable. The zone in which the cache instance is running. For example, us-central1-a.

string zone = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
RapidCache.Builder

This builder for chaining.

getAdmissionPolicy()

public String getAdmissionPolicy()

Cache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.

string admission_policy = 5;

Returns
Type Description
String

The admissionPolicy.

getAdmissionPolicyBytes()

public ByteString getAdmissionPolicyBytes()

Cache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.

string admission_policy = 5;

Returns
Type Description
ByteString

The bytes for admissionPolicy.

getCacheType()

public String getCacheType()

Immutable. The type of Rapid Cache this represents. Valid values include: 'rapid-cache' and 'rapid-cache-ultra'.

string cache_type = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The cacheType.

getCacheTypeBytes()

public ByteString getCacheTypeBytes()

Immutable. The type of Rapid Cache this represents. Valid values include: 'rapid-cache' and 'rapid-cache-ultra'.

string cache_type = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for cacheType.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public RapidCache getDefaultInstanceForType()
Returns
Type Description
RapidCache

getDescriptorForType()

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

getName()

public String getName()

Immutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getPendingUpdate()

public boolean getPendingUpdate()

Output only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.

bool pending_update = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The pendingUpdate.

getState()

public String getState()

Output only. Cache state including running, creating, and disabled.

string state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The state.

getStateBytes()

public ByteString getStateBytes()

Output only. Cache state including running, creating, and disabled.

string state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for state.

getTtl()

public Duration getTtl()

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Returns
Type Description
Duration

The ttl.

getTtlBuilder()

public Duration.Builder getTtlBuilder()

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Returns
Type Description
Builder

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Returns
Type Description
DurationOrBuilder

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getZone()

public String getZone()

Immutable. The zone in which the cache instance is running. For example, us-central1-a.

string zone = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

Immutable. The zone in which the cache instance is running. For example, us-central1-a.

string zone = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for zone.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasTtl()

public boolean hasTtl()

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Returns
Type Description
boolean

Whether the ttl field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public RapidCache.Builder mergeCreateTime(Timestamp value)

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
RapidCache.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(RapidCache other)

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

mergeTtl(Duration value)

public RapidCache.Builder mergeTtl(Duration value)

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Parameter
Name Description
value Duration
Returns
Type Description
RapidCache.Builder

mergeUpdateTime(Timestamp value)

public RapidCache.Builder mergeUpdateTime(Timestamp value)

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
RapidCache.Builder

setAdmissionPolicy(String value)

public RapidCache.Builder setAdmissionPolicy(String value)

Cache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.

string admission_policy = 5;

Parameter
Name Description
value String

The admissionPolicy to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setAdmissionPolicyBytes(ByteString value)

public RapidCache.Builder setAdmissionPolicyBytes(ByteString value)

Cache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.

string admission_policy = 5;

Parameter
Name Description
value ByteString

The bytes for admissionPolicy to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setCacheType(String value)

public RapidCache.Builder setCacheType(String value)

Immutable. The type of Rapid Cache this represents. Valid values include: 'rapid-cache' and 'rapid-cache-ultra'.

string cache_type = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The cacheType to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setCacheTypeBytes(ByteString value)

public RapidCache.Builder setCacheTypeBytes(ByteString value)

Immutable. The type of Rapid Cache this represents. Valid values include: 'rapid-cache' and 'rapid-cache-ultra'.

string cache_type = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for cacheType to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public RapidCache.Builder setCreateTime(Timestamp value)

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
RapidCache.Builder

setCreateTime(Timestamp.Builder builderForValue)

public RapidCache.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when Rapid cache instance is allocated.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
RapidCache.Builder

setName(String value)

public RapidCache.Builder setName(String value)

Immutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setNameBytes(ByteString value)

public RapidCache.Builder setNameBytes(ByteString value)

Immutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setPendingUpdate(boolean value)

public RapidCache.Builder setPendingUpdate(boolean value)

Output only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.

bool pending_update = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The pendingUpdate to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setState(String value)

public RapidCache.Builder setState(String value)

Output only. Cache state including running, creating, and disabled.

string state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The state to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setStateBytes(ByteString value)

public RapidCache.Builder setStateBytes(ByteString value)

Output only. Cache state including running, creating, and disabled.

string state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for state to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setTtl(Duration value)

public RapidCache.Builder setTtl(Duration value)

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Parameter
Name Description
value Duration
Returns
Type Description
RapidCache.Builder

setTtl(Duration.Builder builderForValue)

public RapidCache.Builder setTtl(Duration.Builder builderForValue)

Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.

.google.protobuf.Duration ttl = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
RapidCache.Builder

setUpdateTime(Timestamp value)

public RapidCache.Builder setUpdateTime(Timestamp value)

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
RapidCache.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public RapidCache.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Time when Rapid cache instance is last updated, including creation.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
RapidCache.Builder

setZone(String value)

public RapidCache.Builder setZone(String value)

Immutable. The zone in which the cache instance is running. For example, us-central1-a.

string zone = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The zone to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public RapidCache.Builder setZoneBytes(ByteString value)

Immutable. The zone in which the cache instance is running. For example, us-central1-a.

string zone = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for zone to set.

Returns
Type Description
RapidCache.Builder

This builder for chaining.