Class Attachment.Builder

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

    public static final class Attachment.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Attachment.Builder>
    implements AttachmentOrBuilder
     Represents a file attached to a support case.
     
    Protobuf type google.cloud.support.v2.Attachment
    • Method Detail

      • 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<Attachment.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         Output only. The resource name of the attachment.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getName in interface AttachmentOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. The resource name of the attachment.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getNameBytes in interface AttachmentOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Attachment.Builder setName​(String value)
         Output only. The resource name of the attachment.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Attachment.Builder clearName()
         Output only. The resource name of the attachment.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Attachment.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. The resource name of the attachment.
         
        string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasCreateTime

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

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface AttachmentOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Attachment.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Attachment.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Attachment.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Attachment.Builder clearCreateTime()
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The time at which the attachment was created.
         
        .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface AttachmentOrBuilder
      • hasCreator

        public boolean hasCreator()
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreator in interface AttachmentOrBuilder
        Returns:
        Whether the creator field is set.
      • getCreator

        public Actor getCreator()
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreator in interface AttachmentOrBuilder
        Returns:
        The creator.
      • setCreator

        public Attachment.Builder setCreator​(Actor value)
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreator

        public Attachment.Builder setCreator​(Actor.Builder builderForValue)
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreator

        public Attachment.Builder mergeCreator​(Actor value)
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreator

        public Attachment.Builder clearCreator()
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreatorBuilder

        public Actor.Builder getCreatorBuilder()
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreatorOrBuilder

        public ActorOrBuilder getCreatorOrBuilder()
         Output only. The user who uploaded the attachment. Note, the name and email
         will be obfuscated if the attachment was uploaded by Google support.
         
        .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreatorOrBuilder in interface AttachmentOrBuilder
      • getFilename

        public String getFilename()
         The filename of the attachment (e.g. `"graph.jpg"`).
         
        string filename = 4;
        Specified by:
        getFilename in interface AttachmentOrBuilder
        Returns:
        The filename.
      • getFilenameBytes

        public com.google.protobuf.ByteString getFilenameBytes()
         The filename of the attachment (e.g. `"graph.jpg"`).
         
        string filename = 4;
        Specified by:
        getFilenameBytes in interface AttachmentOrBuilder
        Returns:
        The bytes for filename.
      • setFilename

        public Attachment.Builder setFilename​(String value)
         The filename of the attachment (e.g. `"graph.jpg"`).
         
        string filename = 4;
        Parameters:
        value - The filename to set.
        Returns:
        This builder for chaining.
      • clearFilename

        public Attachment.Builder clearFilename()
         The filename of the attachment (e.g. `"graph.jpg"`).
         
        string filename = 4;
        Returns:
        This builder for chaining.
      • setFilenameBytes

        public Attachment.Builder setFilenameBytes​(com.google.protobuf.ByteString value)
         The filename of the attachment (e.g. `"graph.jpg"`).
         
        string filename = 4;
        Parameters:
        value - The bytes for filename to set.
        Returns:
        This builder for chaining.
      • getMimeType

        public String getMimeType()
         Output only. The MIME type of the attachment (e.g. text/plain).
         
        string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getMimeType in interface AttachmentOrBuilder
        Returns:
        The mimeType.
      • getMimeTypeBytes

        public com.google.protobuf.ByteString getMimeTypeBytes()
         Output only. The MIME type of the attachment (e.g. text/plain).
         
        string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getMimeTypeBytes in interface AttachmentOrBuilder
        Returns:
        The bytes for mimeType.
      • setMimeType

        public Attachment.Builder setMimeType​(String value)
         Output only. The MIME type of the attachment (e.g. text/plain).
         
        string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The mimeType to set.
        Returns:
        This builder for chaining.
      • clearMimeType

        public Attachment.Builder clearMimeType()
         Output only. The MIME type of the attachment (e.g. text/plain).
         
        string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setMimeTypeBytes

        public Attachment.Builder setMimeTypeBytes​(com.google.protobuf.ByteString value)
         Output only. The MIME type of the attachment (e.g. text/plain).
         
        string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for mimeType to set.
        Returns:
        This builder for chaining.
      • getSizeBytes

        public long getSizeBytes()
         Output only. The size of the attachment in bytes.
         
        int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSizeBytes in interface AttachmentOrBuilder
        Returns:
        The sizeBytes.
      • setSizeBytes

        public Attachment.Builder setSizeBytes​(long value)
         Output only. The size of the attachment in bytes.
         
        int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The sizeBytes to set.
        Returns:
        This builder for chaining.
      • clearSizeBytes

        public Attachment.Builder clearSizeBytes()
         Output only. The size of the attachment in bytes.
         
        int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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