Class WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder>
com.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder
All Implemented Interfaces:
WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk

public static final class WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder extends com.google.protobuf.GeneratedMessage.Builder<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder> implements WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
 A PersistentDirectory backed by a Compute Engine regional persistent
 disk. The
 [persistent_directories][google.cloud.workstations.v1beta.WorkstationConfig.persistent_directories]
 field is repeated, but it may contain only one entry. It creates a
 [persistent
 disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that
 mounts to the workstation VM at `/home` when the session starts and
 detaches when the session ends. If this field is empty, workstations
 created with this configuration do not have a persistent home
 directory.
 
Protobuf type google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.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<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.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<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder>
    • getDefaultInstanceForType

      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.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<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder>
    • mergeFrom

    • isInitialized

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

      public WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.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<WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder>
      Throws:
      IOException
    • getSizeGb

      public int getSizeGb()
       Optional. The GB capacity of a persistent home directory for each
       workstation created with this configuration. Must be empty if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set.
      
       Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
       Defaults to `200`. If less than `200` GB, the
       [disk_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.disk_type]
       must be
       `"pd-balanced"` or `"pd-ssd"`.
       
      int32 size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSizeGb in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The sizeGb.
    • setSizeGb

       Optional. The GB capacity of a persistent home directory for each
       workstation created with this configuration. Must be empty if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set.
      
       Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
       Defaults to `200`. If less than `200` GB, the
       [disk_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.disk_type]
       must be
       `"pd-balanced"` or `"pd-ssd"`.
       
      int32 size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sizeGb to set.
      Returns:
      This builder for chaining.
    • clearSizeGb

       Optional. The GB capacity of a persistent home directory for each
       workstation created with this configuration. Must be empty if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set.
      
       Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`.
       Defaults to `200`. If less than `200` GB, the
       [disk_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.disk_type]
       must be
       `"pd-balanced"` or `"pd-ssd"`.
       
      int32 size_gb = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getFsType

      public String getFsType()
       Optional. Type of file system that the disk should be formatted with.
       The workstation image must support this file system type. Must be empty
       if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set. Defaults to `"ext4"`.
       
      string fs_type = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFsType in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The fsType.
    • getFsTypeBytes

      public com.google.protobuf.ByteString getFsTypeBytes()
       Optional. Type of file system that the disk should be formatted with.
       The workstation image must support this file system type. Must be empty
       if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set. Defaults to `"ext4"`.
       
      string fs_type = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFsTypeBytes in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The bytes for fsType.
    • setFsType

       Optional. Type of file system that the disk should be formatted with.
       The workstation image must support this file system type. Must be empty
       if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set. Defaults to `"ext4"`.
       
      string fs_type = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The fsType to set.
      Returns:
      This builder for chaining.
    • clearFsType

       Optional. Type of file system that the disk should be formatted with.
       The workstation image must support this file system type. Must be empty
       if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set. Defaults to `"ext4"`.
       
      string fs_type = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setFsTypeBytes

      public WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder setFsTypeBytes(com.google.protobuf.ByteString value)
       Optional. Type of file system that the disk should be formatted with.
       The workstation image must support this file system type. Must be empty
       if
       [source_snapshot][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.source_snapshot]
       is set. Defaults to `"ext4"`.
       
      string fs_type = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for fsType to set.
      Returns:
      This builder for chaining.
    • getDiskType

      public String getDiskType()
       Optional. The [type of the persistent
       disk](https://cloud.google.com/compute/docs/disks#disk-types) for the
       home directory. Defaults to `"pd-standard"`.
       
      string disk_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDiskType in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The diskType.
    • getDiskTypeBytes

      public com.google.protobuf.ByteString getDiskTypeBytes()
       Optional. The [type of the persistent
       disk](https://cloud.google.com/compute/docs/disks#disk-types) for the
       home directory. Defaults to `"pd-standard"`.
       
      string disk_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDiskTypeBytes in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The bytes for diskType.
    • setDiskType

       Optional. The [type of the persistent
       disk](https://cloud.google.com/compute/docs/disks#disk-types) for the
       home directory. Defaults to `"pd-standard"`.
       
      string disk_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The diskType to set.
      Returns:
      This builder for chaining.
    • clearDiskType

       Optional. The [type of the persistent
       disk](https://cloud.google.com/compute/docs/disks#disk-types) for the
       home directory. Defaults to `"pd-standard"`.
       
      string disk_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDiskTypeBytes

      public WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder setDiskTypeBytes(com.google.protobuf.ByteString value)
       Optional. The [type of the persistent
       disk](https://cloud.google.com/compute/docs/disks#disk-types) for the
       home directory. Defaults to `"pd-standard"`.
       
      string disk_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for diskType to set.
      Returns:
      This builder for chaining.
    • getSourceSnapshot

      public String getSourceSnapshot()
       Optional. Name of the snapshot to use as the source for the disk. If
       set,
       [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb]
       and
       [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type]
       must be empty.
       
      string source_snapshot = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceSnapshot in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The sourceSnapshot.
    • getSourceSnapshotBytes

      public com.google.protobuf.ByteString getSourceSnapshotBytes()
       Optional. Name of the snapshot to use as the source for the disk. If
       set,
       [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb]
       and
       [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type]
       must be empty.
       
      string source_snapshot = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSourceSnapshotBytes in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The bytes for sourceSnapshot.
    • setSourceSnapshot

       Optional. Name of the snapshot to use as the source for the disk. If
       set,
       [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb]
       and
       [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type]
       must be empty.
       
      string source_snapshot = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The sourceSnapshot to set.
      Returns:
      This builder for chaining.
    • clearSourceSnapshot

       Optional. Name of the snapshot to use as the source for the disk. If
       set,
       [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb]
       and
       [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type]
       must be empty.
       
      string source_snapshot = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setSourceSnapshotBytes

      public WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.Builder setSourceSnapshotBytes(com.google.protobuf.ByteString value)
       Optional. Name of the snapshot to use as the source for the disk. If
       set,
       [size_gb][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.size_gb]
       and
       [fs_type][google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.fs_type]
       must be empty.
       
      string source_snapshot = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for sourceSnapshot to set.
      Returns:
      This builder for chaining.
    • getReclaimPolicyValue

      public int getReclaimPolicyValue()
       Optional. Whether the persistent disk should be deleted when the
       workstation is deleted. Valid values are `DELETE` and `RETAIN`.
       Defaults to `DELETE`.
       
      .google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy reclaim_policy = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getReclaimPolicyValue in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The enum numeric value on the wire for reclaimPolicy.
    • setReclaimPolicyValue

       Optional. Whether the persistent disk should be deleted when the
       workstation is deleted. Valid values are `DELETE` and `RETAIN`.
       Defaults to `DELETE`.
       
      .google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy reclaim_policy = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for reclaimPolicy to set.
      Returns:
      This builder for chaining.
    • getReclaimPolicy

       Optional. Whether the persistent disk should be deleted when the
       workstation is deleted. Valid values are `DELETE` and `RETAIN`.
       Defaults to `DELETE`.
       
      .google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy reclaim_policy = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getReclaimPolicy in interface WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskOrBuilder
      Returns:
      The reclaimPolicy.
    • setReclaimPolicy

       Optional. Whether the persistent disk should be deleted when the
       workstation is deleted. Valid values are `DELETE` and `RETAIN`.
       Defaults to `DELETE`.
       
      .google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy reclaim_policy = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The reclaimPolicy to set.
      Returns:
      This builder for chaining.
    • clearReclaimPolicy

       Optional. Whether the persistent disk should be deleted when the
       workstation is deleted. Valid values are `DELETE` and `RETAIN`.
       Defaults to `DELETE`.
       
      .google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy reclaim_policy = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.