Class AnywhereCache.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
com.google.storage.control.v2.AnywhereCache.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AnywhereCacheOrBuilder, Cloneable
Enclosing class:
AnywhereCache

public static final class AnywhereCache.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder> implements AnywhereCacheOrBuilder
 An Anywhere Cache Instance.
 
Protobuf type google.storage.control.v2.AnywhereCache
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • clear

      public AnywhereCache.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • getDefaultInstanceForType

      public AnywhereCache getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public AnywhereCache build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AnywhereCache buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public AnywhereCache.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • setField

      public AnywhereCache.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • clearField

      public AnywhereCache.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • clearOneof

      public AnywhereCache.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • setRepeatedField

      public AnywhereCache.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • addRepeatedField

      public AnywhereCache.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • mergeFrom

      public AnywhereCache.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnywhereCache.Builder>
    • mergeFrom

      public AnywhereCache.Builder mergeFrom(AnywhereCache other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • mergeFrom

      public AnywhereCache.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnywhereCache.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Immutable. The resource name of this AnywhereCache.
       Format:
       `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface AnywhereCacheOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Immutable. The resource name of this AnywhereCache.
       Format:
       `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getNameBytes in interface AnywhereCacheOrBuilder
      Returns:
      The bytes for name.
    • setName

      public AnywhereCache.Builder setName(String value)
       Immutable. The resource name of this AnywhereCache.
       Format:
       `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public AnywhereCache.Builder clearName()
       Immutable. The resource name of this AnywhereCache.
       Format:
       `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • setNameBytes

      public AnywhereCache.Builder setNameBytes(com.google.protobuf.ByteString value)
       Immutable. The resource name of this AnywhereCache.
       Format:
       `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getZone

      public String getZone()
       Immutable. The zone in which the cache instance is running. For example,
       us-central1-a.
       
      string zone = 10 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getZone in interface AnywhereCacheOrBuilder
      Returns:
      The zone.
    • getZoneBytes

      public com.google.protobuf.ByteString getZoneBytes()
       Immutable. The zone in which the cache instance is running. For example,
       us-central1-a.
       
      string zone = 10 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getZoneBytes in interface AnywhereCacheOrBuilder
      Returns:
      The bytes for zone.
    • setZone

      public AnywhereCache.Builder setZone(String value)
       Immutable. The zone in which the cache instance is running. For example,
       us-central1-a.
       
      string zone = 10 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The zone to set.
      Returns:
      This builder for chaining.
    • clearZone

      public AnywhereCache.Builder clearZone()
       Immutable. The zone in which the cache instance is running. For example,
       us-central1-a.
       
      string zone = 10 [(.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • setZoneBytes

      public AnywhereCache.Builder setZoneBytes(com.google.protobuf.ByteString value)
       Immutable. The zone in which the cache instance is running. For example,
       us-central1-a.
       
      string zone = 10 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for zone to set.
      Returns:
      This builder for chaining.
    • 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 = 3;
      Specified by:
      hasTtl in interface AnywhereCacheOrBuilder
      Returns:
      Whether the ttl field is set.
    • getTtl

      public com.google.protobuf.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 = 3;
      Specified by:
      getTtl in interface AnywhereCacheOrBuilder
      Returns:
      The ttl.
    • setTtl

      public AnywhereCache.Builder setTtl(com.google.protobuf.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 = 3;
    • setTtl

      public AnywhereCache.Builder setTtl(com.google.protobuf.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 = 3;
    • mergeTtl

      public AnywhereCache.Builder mergeTtl(com.google.protobuf.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 = 3;
    • clearTtl

      public AnywhereCache.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 = 3;
    • getTtlBuilder

      public com.google.protobuf.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 = 3;
    • getTtlOrBuilder

      public com.google.protobuf.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 = 3;
      Specified by:
      getTtlOrBuilder in interface AnywhereCacheOrBuilder
    • getAdmissionPolicy

      public String getAdmissionPolicy()
       Cache admission policy. Valid policies includes:
       `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
       `admit-on-first-miss`. Default value is applied if not specified in the
       create request.
       
      string admission_policy = 9;
      Specified by:
      getAdmissionPolicy in interface AnywhereCacheOrBuilder
      Returns:
      The admissionPolicy.
    • getAdmissionPolicyBytes

      public com.google.protobuf.ByteString getAdmissionPolicyBytes()
       Cache admission policy. Valid policies includes:
       `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
       `admit-on-first-miss`. Default value is applied if not specified in the
       create request.
       
      string admission_policy = 9;
      Specified by:
      getAdmissionPolicyBytes in interface AnywhereCacheOrBuilder
      Returns:
      The bytes for admissionPolicy.
    • setAdmissionPolicy

      public AnywhereCache.Builder setAdmissionPolicy(String value)
       Cache admission policy. Valid policies includes:
       `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
       `admit-on-first-miss`. Default value is applied if not specified in the
       create request.
       
      string admission_policy = 9;
      Parameters:
      value - The admissionPolicy to set.
      Returns:
      This builder for chaining.
    • clearAdmissionPolicy

      public AnywhereCache.Builder clearAdmissionPolicy()
       Cache admission policy. Valid policies includes:
       `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
       `admit-on-first-miss`. Default value is applied if not specified in the
       create request.
       
      string admission_policy = 9;
      Returns:
      This builder for chaining.
    • setAdmissionPolicyBytes

      public AnywhereCache.Builder setAdmissionPolicyBytes(com.google.protobuf.ByteString value)
       Cache admission policy. Valid policies includes:
       `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
       `admit-on-first-miss`. Default value is applied if not specified in the
       create request.
       
      string admission_policy = 9;
      Parameters:
      value - The bytes for admissionPolicy to set.
      Returns:
      This builder for chaining.
    • getState

      public String getState()
       Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
       
      string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface AnywhereCacheOrBuilder
      Returns:
      The state.
    • getStateBytes

      public com.google.protobuf.ByteString getStateBytes()
       Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
       
      string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateBytes in interface AnywhereCacheOrBuilder
      Returns:
      The bytes for state.
    • setState

      public AnywhereCache.Builder setState(String value)
       Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
       
      string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public AnywhereCache.Builder clearState()
       Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
       
      string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setStateBytes

      public AnywhereCache.Builder setStateBytes(com.google.protobuf.ByteString value)
       Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
       
      string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for state to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface AnywhereCacheOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface AnywhereCacheOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public AnywhereCache.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public AnywhereCache.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public AnywhereCache.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public AnywhereCache.Builder clearCreateTime()
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Time when Anywhere cache instance is allocated.
       
      .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface AnywhereCacheOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface AnywhereCacheOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface AnywhereCacheOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public AnywhereCache.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public AnywhereCache.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public AnywhereCache.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public AnywhereCache.Builder clearUpdateTime()
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Time when Anywhere cache instance is last updated, including
       creation.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface AnywhereCacheOrBuilder
    • 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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPendingUpdate in interface AnywhereCacheOrBuilder
      Returns:
      The pendingUpdate.
    • setPendingUpdate

      public AnywhereCache.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The pendingUpdate to set.
      Returns:
      This builder for chaining.
    • clearPendingUpdate

      public AnywhereCache.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final AnywhereCache.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>
    • mergeUnknownFields

      public final AnywhereCache.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnywhereCache.Builder>