Interface Document.ContentOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    Document.Content, Document.Content.Builder
    Enclosing class:
    Document

    public static interface Document.ContentOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Document.Content.ContentCase getContentCase()  
      String getMimeType()
      The MIME type of the content.
      com.google.protobuf.ByteString getMimeTypeBytes()
      The MIME type of the content.
      com.google.protobuf.ByteString getRawBytes()
      The content represented as a stream of bytes.
      String getUri()
      The URI of the content.
      com.google.protobuf.ByteString getUriBytes()
      The URI of the content.
      boolean hasRawBytes()
      The content represented as a stream of bytes.
      boolean hasUri()
      The URI of the content.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • hasRawBytes

        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;
        Returns:
        Whether the rawBytes field is set.
      • getRawBytes

        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;
        Returns:
        The rawBytes.
      • hasUri

        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 100 MB.
         
        string uri = 3;
        Returns:
        Whether the uri field is set.
      • getUri

        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 100 MB.
         
        string uri = 3;
        Returns:
        The uri.
      • getUriBytes

        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 100 MB.
         
        string uri = 3;
        Returns:
        The bytes for uri.
      • getMimeType

        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;
        Returns:
        The mimeType.
      • getMimeTypeBytes

        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;
        Returns:
        The bytes for mimeType.