Class Share.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Share.Builder>
com.google.cloud.filestore.v1beta1.Share.Builder
All Implemented Interfaces:
ShareOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Share

public static final class Share.Builder extends com.google.protobuf.GeneratedMessage.Builder<Share.Builder> implements ShareOrBuilder
 A Filestore share.
 
Protobuf type google.cloud.filestore.v1beta1.Share
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Share.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Share.Builder>
    • internalGetFieldAccessorTable

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

      public Share.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.GeneratedMessage.Builder<Share.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.GeneratedMessage.Builder<Share.Builder>
    • getDefaultInstanceForType

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

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

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

      public Share.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<Share.Builder>
    • mergeFrom

      public Share.Builder mergeFrom(Share other)
    • isInitialized

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

      public Share.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<Share.Builder>
      Throws:
      IOException
    • getSourceCase

      public Share.SourceCase getSourceCase()
      Specified by:
      getSourceCase in interface ShareOrBuilder
    • clearSource

      public Share.Builder clearSource()
    • getName

      public String getName()
       Output only. The resource name of the share, in the format
       `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface ShareOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The resource name of the share, in the format
       `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface ShareOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Share.Builder setName(String value)
       Output only. The resource name of the share, in the format
       `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Share.Builder clearName()
       Output only. The resource name of the share, in the format
       `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Share.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. The resource name of the share, in the format
       `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getMountName

      public String getMountName()
       The mount name of the share. Must be 63 characters or less and consist of
       uppercase or lowercase letters, numbers, and underscores.
       
      string mount_name = 2;
      Specified by:
      getMountName in interface ShareOrBuilder
      Returns:
      The mountName.
    • getMountNameBytes

      public com.google.protobuf.ByteString getMountNameBytes()
       The mount name of the share. Must be 63 characters or less and consist of
       uppercase or lowercase letters, numbers, and underscores.
       
      string mount_name = 2;
      Specified by:
      getMountNameBytes in interface ShareOrBuilder
      Returns:
      The bytes for mountName.
    • setMountName

      public Share.Builder setMountName(String value)
       The mount name of the share. Must be 63 characters or less and consist of
       uppercase or lowercase letters, numbers, and underscores.
       
      string mount_name = 2;
      Parameters:
      value - The mountName to set.
      Returns:
      This builder for chaining.
    • clearMountName

      public Share.Builder clearMountName()
       The mount name of the share. Must be 63 characters or less and consist of
       uppercase or lowercase letters, numbers, and underscores.
       
      string mount_name = 2;
      Returns:
      This builder for chaining.
    • setMountNameBytes

      public Share.Builder setMountNameBytes(com.google.protobuf.ByteString value)
       The mount name of the share. Must be 63 characters or less and consist of
       uppercase or lowercase letters, numbers, and underscores.
       
      string mount_name = 2;
      Parameters:
      value - The bytes for mountName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       A description of the share with 2048 characters or less. Requests with
       longer descriptions will be rejected.
       
      string description = 3;
      Specified by:
      getDescription in interface ShareOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A description of the share with 2048 characters or less. Requests with
       longer descriptions will be rejected.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface ShareOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Share.Builder setDescription(String value)
       A description of the share with 2048 characters or less. Requests with
       longer descriptions will be rejected.
       
      string description = 3;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Share.Builder clearDescription()
       A description of the share with 2048 characters or less. Requests with
       longer descriptions will be rejected.
       
      string description = 3;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Share.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       A description of the share with 2048 characters or less. Requests with
       longer descriptions will be rejected.
       
      string description = 3;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getCapacityGb

      public long getCapacityGb()
       File share capacity in gigabytes (GB). Filestore defines 1 GB as
       1024^3 bytes. Must be greater than 0.
       
      int64 capacity_gb = 4;
      Specified by:
      getCapacityGb in interface ShareOrBuilder
      Returns:
      The capacityGb.
    • setCapacityGb

      public Share.Builder setCapacityGb(long value)
       File share capacity in gigabytes (GB). Filestore defines 1 GB as
       1024^3 bytes. Must be greater than 0.
       
      int64 capacity_gb = 4;
      Parameters:
      value - The capacityGb to set.
      Returns:
      This builder for chaining.
    • clearCapacityGb

      public Share.Builder clearCapacityGb()
       File share capacity in gigabytes (GB). Filestore defines 1 GB as
       1024^3 bytes. Must be greater than 0.
       
      int64 capacity_gb = 4;
      Returns:
      This builder for chaining.
    • getNfsExportOptionsList

      public List<NfsExportOptions> getNfsExportOptionsList()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
      Specified by:
      getNfsExportOptionsList in interface ShareOrBuilder
    • getNfsExportOptionsCount

      public int getNfsExportOptionsCount()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
      Specified by:
      getNfsExportOptionsCount in interface ShareOrBuilder
    • getNfsExportOptions

      public NfsExportOptions getNfsExportOptions(int index)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
      Specified by:
      getNfsExportOptions in interface ShareOrBuilder
    • setNfsExportOptions

      public Share.Builder setNfsExportOptions(int index, NfsExportOptions value)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • setNfsExportOptions

      public Share.Builder setNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addNfsExportOptions

      public Share.Builder addNfsExportOptions(NfsExportOptions value)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addNfsExportOptions

      public Share.Builder addNfsExportOptions(int index, NfsExportOptions value)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addNfsExportOptions

      public Share.Builder addNfsExportOptions(NfsExportOptions.Builder builderForValue)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addNfsExportOptions

      public Share.Builder addNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addAllNfsExportOptions

      public Share.Builder addAllNfsExportOptions(Iterable<? extends NfsExportOptions> values)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • clearNfsExportOptions

      public Share.Builder clearNfsExportOptions()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • removeNfsExportOptions

      public Share.Builder removeNfsExportOptions(int index)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • getNfsExportOptionsBuilder

      public NfsExportOptions.Builder getNfsExportOptionsBuilder(int index)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • getNfsExportOptionsOrBuilder

      public NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder(int index)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
      Specified by:
      getNfsExportOptionsOrBuilder in interface ShareOrBuilder
    • getNfsExportOptionsOrBuilderList

      public List<? extends NfsExportOptionsOrBuilder> getNfsExportOptionsOrBuilderList()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
      Specified by:
      getNfsExportOptionsOrBuilderList in interface ShareOrBuilder
    • addNfsExportOptionsBuilder

      public NfsExportOptions.Builder addNfsExportOptionsBuilder()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • addNfsExportOptionsBuilder

      public NfsExportOptions.Builder addNfsExportOptionsBuilder(int index)
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • getNfsExportOptionsBuilderList

      public List<NfsExportOptions.Builder> getNfsExportOptionsBuilderList()
       Nfs Export Options.
       There is a limit of 10 export options per file share.
       
      repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;
    • getStateValue

      public int getStateValue()
       Output only. The share state.
       
      .google.cloud.filestore.v1beta1.Share.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface ShareOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Share.Builder setStateValue(int value)
       Output only. The share state.
       
      .google.cloud.filestore.v1beta1.Share.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public Share.State getState()
       Output only. The share state.
       
      .google.cloud.filestore.v1beta1.Share.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface ShareOrBuilder
      Returns:
      The state.
    • setState

      public Share.Builder setState(Share.State value)
       Output only. The share state.
       
      .google.cloud.filestore.v1beta1.Share.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Share.Builder clearState()
       Output only. The share state.
       
      .google.cloud.filestore.v1beta1.Share.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ShareOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ShareOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Share.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Share.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Share.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Share.Builder clearCreateTime()
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time when the share was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ShareOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: ShareOrBuilder
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsCount in interface ShareOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
      Specified by:
      containsLabels in interface ShareOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface ShareOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsMap in interface ShareOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrDefault in interface ShareOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrThrow in interface ShareOrBuilder
    • clearLabels

      public Share.Builder clearLabels()
    • removeLabels

      public Share.Builder removeLabels(String key)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public Share.Builder putLabels(String key, String value)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
    • putAllLabels

      public Share.Builder putAllLabels(Map<String,String> values)
       Resource labels to represent user provided metadata.
       
      map<string, string> labels = 8;
    • hasBackup

      public boolean hasBackup()
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      hasBackup in interface ShareOrBuilder
      Returns:
      Whether the backup field is set.
    • getBackup

      public String getBackup()
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getBackup in interface ShareOrBuilder
      Returns:
      The backup.
    • getBackupBytes

      public com.google.protobuf.ByteString getBackupBytes()
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Specified by:
      getBackupBytes in interface ShareOrBuilder
      Returns:
      The bytes for backup.
    • setBackup

      public Share.Builder setBackup(String value)
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The backup to set.
      Returns:
      This builder for chaining.
    • clearBackup

      public Share.Builder clearBackup()
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setBackupBytes

      public Share.Builder setBackupBytes(com.google.protobuf.ByteString value)
       Immutable. Full name of the Cloud Filestore Backup resource that this
       Share is restored from, in the format of
       projects/{project_id}/locations/{location_id}/backups/{backup_id}.
       Empty, if the Share is created from scratch and not restored from a
       backup.
       
      string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for backup to set.
      Returns:
      This builder for chaining.