Class Document.BlobAsset.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.BlobAsset.Builder>
com.google.cloud.documentai.v1.Document.BlobAsset.Builder
All Implemented Interfaces:
Document.BlobAssetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Document.BlobAsset

public static final class Document.BlobAsset.Builder extends com.google.protobuf.GeneratedMessage.Builder<Document.BlobAsset.Builder> implements Document.BlobAssetOrBuilder
 Represents a blob asset. It's used to store the content of the inline blob
 in this document, for example, image bytes, such that it can be referenced
 by other fields in the document via asset ID.
 
Protobuf type google.cloud.documentai.v1.Document.BlobAsset
  • 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<Document.BlobAsset.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<Document.BlobAsset.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<Document.BlobAsset.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Document.BlobAsset.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<Document.BlobAsset.Builder>
      Throws:
      IOException
    • getAssetId

      public String getAssetId()
       Optional. The id of the blob asset.
       
      string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAssetId in interface Document.BlobAssetOrBuilder
      Returns:
      The assetId.
    • getAssetIdBytes

      public com.google.protobuf.ByteString getAssetIdBytes()
       Optional. The id of the blob asset.
       
      string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAssetIdBytes in interface Document.BlobAssetOrBuilder
      Returns:
      The bytes for assetId.
    • setAssetId

      public Document.BlobAsset.Builder setAssetId(String value)
       Optional. The id of the blob asset.
       
      string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The assetId to set.
      Returns:
      This builder for chaining.
    • clearAssetId

      public Document.BlobAsset.Builder clearAssetId()
       Optional. The id of the blob asset.
       
      string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setAssetIdBytes

      public Document.BlobAsset.Builder setAssetIdBytes(com.google.protobuf.ByteString value)
       Optional. The id of the blob asset.
       
      string asset_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for assetId to set.
      Returns:
      This builder for chaining.
    • getContent

      public com.google.protobuf.ByteString getContent()
       Optional. The content of the blob asset, for example, image bytes.
       
      bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getContent in interface Document.BlobAssetOrBuilder
      Returns:
      The content.
    • setContent

      public Document.BlobAsset.Builder setContent(com.google.protobuf.ByteString value)
       Optional. The content of the blob asset, for example, image bytes.
       
      bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

      public Document.BlobAsset.Builder clearContent()
       Optional. The content of the blob asset, for example, image bytes.
       
      bytes content = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getMimeType

      public String getMimeType()
       The mime type of the blob asset.
       An IANA published [media type (MIME
       type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
       
      string mime_type = 3;
      Specified by:
      getMimeType in interface Document.BlobAssetOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       The mime type of the blob asset.
       An IANA published [media type (MIME
       type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
       
      string mime_type = 3;
      Specified by:
      getMimeTypeBytes in interface Document.BlobAssetOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public Document.BlobAsset.Builder setMimeType(String value)
       The mime type of the blob asset.
       An IANA published [media type (MIME
       type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
       
      string mime_type = 3;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public Document.BlobAsset.Builder clearMimeType()
       The mime type of the blob asset.
       An IANA published [media type (MIME
       type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
       
      string mime_type = 3;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public Document.BlobAsset.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       The mime type of the blob asset.
       An IANA published [media type (MIME
       type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
       
      string mime_type = 3;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.