Class Snapshot.Builder

  • All Implemented Interfaces:
    SnapshotOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Snapshot

    public static final class Snapshot.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
    implements SnapshotOrBuilder
     Snapshot is a point-in-time version of a Volume's content.
     
    Protobuf type google.cloud.netapp.v1.Snapshot
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Snapshot.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

        public Snapshot.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<Snapshot.Builder>
      • setField

        public Snapshot.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<Snapshot.Builder>
      • clearField

        public Snapshot.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<Snapshot.Builder>
      • clearOneof

        public Snapshot.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<Snapshot.Builder>
      • setRepeatedField

        public Snapshot.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<Snapshot.Builder>
      • addRepeatedField

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

        public Snapshot.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<Snapshot.Builder>
      • isInitialized

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

        public Snapshot.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<Snapshot.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Output only. The resource name of the snapshot.
         Format:
         `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface SnapshotOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The resource name of the snapshot.
         Format:
         `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface SnapshotOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Snapshot.Builder setName​(String value)
         Output only. The resource name of the snapshot.
         Format:
         `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Snapshot.Builder clearName()
         Output only. The resource name of the snapshot.
         Format:
         `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Snapshot.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The resource name of the snapshot.
         Format:
         `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getStateValue

        public int getStateValue()
         Output only. The snapshot state.
         
        .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateValue in interface SnapshotOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • setStateValue

        public Snapshot.Builder setStateValue​(int value)
         Output only. The snapshot state.
         
        .google.cloud.netapp.v1.Snapshot.State state = 2 [(.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 Snapshot.State getState()
         Output only. The snapshot state.
         
        .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface SnapshotOrBuilder
        Returns:
        The state.
      • setState

        public Snapshot.Builder setState​(Snapshot.State value)
         Output only. The snapshot state.
         
        .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The state to set.
        Returns:
        This builder for chaining.
      • clearState

        public Snapshot.Builder clearState()
         Output only. The snapshot state.
         
        .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • getStateDetails

        public String getStateDetails()
         Output only. State details of the storage pool
         
        string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateDetails in interface SnapshotOrBuilder
        Returns:
        The stateDetails.
      • getStateDetailsBytes

        public com.google.protobuf.ByteString getStateDetailsBytes()
         Output only. State details of the storage pool
         
        string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateDetailsBytes in interface SnapshotOrBuilder
        Returns:
        The bytes for stateDetails.
      • setStateDetails

        public Snapshot.Builder setStateDetails​(String value)
         Output only. State details of the storage pool
         
        string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The stateDetails to set.
        Returns:
        This builder for chaining.
      • clearStateDetails

        public Snapshot.Builder clearStateDetails()
         Output only. State details of the storage pool
         
        string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setStateDetailsBytes

        public Snapshot.Builder setStateDetailsBytes​(com.google.protobuf.ByteString value)
         Output only. State details of the storage pool
         
        string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for stateDetails to set.
        Returns:
        This builder for chaining.
      • getDescription

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

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

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

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

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

        public double getUsedBytes()
         Output only. Current storage usage for the snapshot in bytes.
         
        double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUsedBytes in interface SnapshotOrBuilder
        Returns:
        The usedBytes.
      • setUsedBytes

        public Snapshot.Builder setUsedBytes​(double value)
         Output only. Current storage usage for the snapshot in bytes.
         
        double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The usedBytes to set.
        Returns:
        This builder for chaining.
      • clearUsedBytes

        public Snapshot.Builder clearUsedBytes()
         Output only. Current storage usage for the snapshot in bytes.
         
        double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • hasCreateTime

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Snapshot.Builder putAllLabels​(Map<String,​String> values)
         Resource labels to represent user provided metadata.
         
        map<string, string> labels = 7;
      • setUnknownFields

        public final Snapshot.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<Snapshot.Builder>
      • mergeUnknownFields

        public final Snapshot.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<Snapshot.Builder>