Class Document.Content.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.Content.Builder>
com.google.cloud.discoveryengine.v1beta.Document.Content.Builder
All Implemented Interfaces:
Document.ContentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Document.Content

public static final class Document.Content.Builder extends com.google.protobuf.GeneratedMessage.Builder<Document.Content.Builder> implements Document.ContentOrBuilder
 Unstructured data linked to this document.
 
Protobuf type google.cloud.discoveryengine.v1beta.Document.Content
  • 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.Content.Builder>
    • clear

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

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

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

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

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

      public Document.Content.Builder mergeFrom(Document.Content other)
    • isInitialized

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

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

      public Document.Content.ContentCase getContentCase()
      Specified by:
      getContentCase in interface Document.ContentOrBuilder
    • clearContent

      public Document.Content.Builder clearContent()
    • hasRawBytes

      public boolean hasRawBytes()
       The content represented as a stream of bytes. The maximum length is
       1,000,000 bytes (1 MB / ~0.95 MiB).
      
       Note: As with all `bytes` fields, this field is represented as pure
       binary in Protocol Buffers and base64-encoded string in JSON. For
       example, `abc123!?$*&()'-=@~` should be represented as
       `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
       https://developers.google.com/protocol-buffers/docs/proto3#json.
       
      bytes raw_bytes = 2;
      Specified by:
      hasRawBytes in interface Document.ContentOrBuilder
      Returns:
      Whether the rawBytes field is set.
    • getRawBytes

      public com.google.protobuf.ByteString getRawBytes()
       The content represented as a stream of bytes. The maximum length is
       1,000,000 bytes (1 MB / ~0.95 MiB).
      
       Note: As with all `bytes` fields, this field is represented as pure
       binary in Protocol Buffers and base64-encoded string in JSON. For
       example, `abc123!?$*&()'-=@~` should be represented as
       `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
       https://developers.google.com/protocol-buffers/docs/proto3#json.
       
      bytes raw_bytes = 2;
      Specified by:
      getRawBytes in interface Document.ContentOrBuilder
      Returns:
      The rawBytes.
    • setRawBytes

      public Document.Content.Builder setRawBytes(com.google.protobuf.ByteString value)
       The content represented as a stream of bytes. The maximum length is
       1,000,000 bytes (1 MB / ~0.95 MiB).
      
       Note: As with all `bytes` fields, this field is represented as pure
       binary in Protocol Buffers and base64-encoded string in JSON. For
       example, `abc123!?$*&()'-=@~` should be represented as
       `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
       https://developers.google.com/protocol-buffers/docs/proto3#json.
       
      bytes raw_bytes = 2;
      Parameters:
      value - The rawBytes to set.
      Returns:
      This builder for chaining.
    • clearRawBytes

      public Document.Content.Builder clearRawBytes()
       The content represented as a stream of bytes. The maximum length is
       1,000,000 bytes (1 MB / ~0.95 MiB).
      
       Note: As with all `bytes` fields, this field is represented as pure
       binary in Protocol Buffers and base64-encoded string in JSON. For
       example, `abc123!?$*&()'-=@~` should be represented as
       `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
       https://developers.google.com/protocol-buffers/docs/proto3#json.
       
      bytes raw_bytes = 2;
      Returns:
      This builder for chaining.
    • hasUri

      public boolean hasUri()
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Specified by:
      hasUri in interface Document.ContentOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public String getUri()
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Specified by:
      getUri in interface Document.ContentOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Specified by:
      getUriBytes in interface Document.ContentOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public Document.Content.Builder setUri(String value)
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public Document.Content.Builder clearUri()
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Returns:
      This builder for chaining.
    • setUriBytes

      public Document.Content.Builder setUriBytes(com.google.protobuf.ByteString value)
       The URI of the content. Only Cloud Storage URIs (e.g.
       `gs://bucket-name/path/to/file`) are supported. The maximum file size
       is 2.5 MB for text-based formats, 200 MB for other formats.
       
      string uri = 3;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • getMimeType

      public String getMimeType()
       The MIME type of the content. Supported types:
      
       * `application/pdf` (PDF, only native PDFs are supported for now)
       * `text/html` (HTML)
       * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
       * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
       * `text/plain` (TXT)
      
       See https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 1;
      Specified by:
      getMimeType in interface Document.ContentOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       The MIME type of the content. Supported types:
      
       * `application/pdf` (PDF, only native PDFs are supported for now)
       * `text/html` (HTML)
       * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
       * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
       * `text/plain` (TXT)
      
       See https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 1;
      Specified by:
      getMimeTypeBytes in interface Document.ContentOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public Document.Content.Builder setMimeType(String value)
       The MIME type of the content. Supported types:
      
       * `application/pdf` (PDF, only native PDFs are supported for now)
       * `text/html` (HTML)
       * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
       * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
       * `text/plain` (TXT)
      
       See https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 1;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public Document.Content.Builder clearMimeType()
       The MIME type of the content. Supported types:
      
       * `application/pdf` (PDF, only native PDFs are supported for now)
       * `text/html` (HTML)
       * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
       * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
       * `text/plain` (TXT)
      
       See https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 1;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public Document.Content.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       The MIME type of the content. Supported types:
      
       * `application/pdf` (PDF, only native PDFs are supported for now)
       * `text/html` (HTML)
       * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
       * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
       * `text/plain` (TXT)
      
       See https://www.iana.org/assignments/media-types/media-types.xhtml.
       
      string mime_type = 1;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.