Class Document.Content (0.36.0)

public static final class Document.Content extends GeneratedMessageV3 implements Document.ContentOrBuilder

Unstructured data linked to this document.

Protobuf type google.cloud.discoveryengine.v1beta.Document.Content

Static Fields

MIME_TYPE_FIELD_NUMBER

public static final int MIME_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

RAW_BYTES_FIELD_NUMBER

public static final int RAW_BYTES_FIELD_NUMBER
Field Value
TypeDescription
int

URI_FIELD_NUMBER

public static final int URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Document.Content getDefaultInstance()
Returns
TypeDescription
Document.Content

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Document.Content.Builder newBuilder()
Returns
TypeDescription
Document.Content.Builder

newBuilder(Document.Content prototype)

public static Document.Content.Builder newBuilder(Document.Content prototype)
Parameter
NameDescription
prototypeDocument.Content
Returns
TypeDescription
Document.Content.Builder

parseDelimitedFrom(InputStream input)

public static Document.Content parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Document.Content parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Document.Content parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Document.Content parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Document.Content parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Document.Content parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Document.Content parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Content
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Document.Content> parser()
Returns
TypeDescription
Parser<Content>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getContentCase()

public Document.Content.ContentCase getContentCase()
Returns
TypeDescription
Document.Content.ContentCase

getDefaultInstanceForType()

public Document.Content getDefaultInstanceForType()
Returns
TypeDescription
Document.Content

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;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public 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
TypeDescription
ByteString

The bytes for mimeType.

getParserForType()

public Parser<Document.Content> getParserForType()
Returns
TypeDescription
Parser<Content>
Overrides

getRawBytes()

public 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
TypeDescription
ByteString

The rawBytes.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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, 100 MB for other formats.

string uri = 3;

Returns
TypeDescription
String

The uri.

getUriBytes()

public 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, 100 MB for other formats.

string uri = 3;

Returns
TypeDescription
ByteString

The bytes for uri.

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;

Returns
TypeDescription
boolean

Whether the rawBytes field is set.

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, 100 MB for other formats.

string uri = 3;

Returns
TypeDescription
boolean

Whether the uri field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Document.Content.Builder newBuilderForType()
Returns
TypeDescription
Document.Content.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Document.Content.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Document.Content.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Document.Content.Builder toBuilder()
Returns
TypeDescription
Document.Content.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException