Class Attachment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Attachment.Builder>
com.google.cloud.support.v2beta.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.GeneratedMessage.Builder<Attachment.Builder> implements AttachmentOrBuilder
 An Attachment contains metadata about a file that was uploaded to a
 case - it is NOT a file itself. That being said, the name of an Attachment
 object can be used to download its accompanying file through the
 `media.download` endpoint.

 While attachments can be uploaded in the console at the
 same time as a comment, they're associated on a "case" level, not a
 "comment" level.
 
Protobuf type google.cloud.support.v2beta.Attachment
  • 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<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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public Attachment.Builder mergeFrom(Attachment other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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. Identifier. The resource name of the attachment.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface AttachmentOrBuilder
      Returns:
      The name.
    • getNameBytes

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

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

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

      public Attachment.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Identifier. The resource name of the attachment.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
      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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.