Class RawDocument.Builder (2.87.0)

public static final class RawDocument.Builder extends GeneratedMessage.Builder<RawDocument.Builder> implements RawDocumentOrBuilder

Payload message of raw document content (bytes).

Protobuf type google.cloud.documentai.v1.RawDocument

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public RawDocument build()
Returns
Type Description
RawDocument

buildPartial()

public RawDocument buildPartial()
Returns
Type Description
RawDocument

clear()

public RawDocument.Builder clear()
Returns
Type Description
RawDocument.Builder
Overrides

clearContent()

public RawDocument.Builder clearContent()

Inline document content.

bytes content = 1;

Returns
Type Description
RawDocument.Builder

This builder for chaining.

clearDisplayName()

public RawDocument.Builder clearDisplayName()

The display name of the document, it supports all Unicode characters except the following: *, ?, [, ], %, {, },', \", , ~, = and : are reserved. If not specified, a default ID is generated.

string display_name = 3;

Returns
Type Description
RawDocument.Builder

This builder for chaining.

clearMimeType()

public RawDocument.Builder clearMimeType()

An IANA MIME type (RFC6838) indicating the nature and format of the content.

string mime_type = 2;

Returns
Type Description
RawDocument.Builder

This builder for chaining.

getContent()

public ByteString getContent()

Inline document content.

bytes content = 1;

Returns
Type Description
ByteString

The content.

getDefaultInstanceForType()

public RawDocument getDefaultInstanceForType()
Returns
Type Description
RawDocument

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The display name of the document, it supports all Unicode characters except the following: *, ?, [, ], %, {, },', \", , ~, = and : are reserved. If not specified, a default ID is generated.

string display_name = 3;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The display name of the document, it supports all Unicode characters except the following: *, ?, [, ], %, {, },', \", , ~, = and : are reserved. If not specified, a default ID is generated.

string display_name = 3;

Returns
Type Description
ByteString

The bytes for displayName.

getMimeType()

public String getMimeType()

An IANA MIME type (RFC6838) indicating the nature and format of the content.

string mime_type = 2;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

An IANA MIME type (RFC6838) indicating the nature and format of the content.

string mime_type = 2;

Returns
Type Description
ByteString

The bytes for mimeType.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RawDocument other)

public RawDocument.Builder mergeFrom(RawDocument other)
Parameter
Name Description
other RawDocument
Returns
Type Description
RawDocument.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RawDocument.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RawDocument.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RawDocument.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RawDocument.Builder
Overrides

setContent(ByteString value)

public RawDocument.Builder setContent(ByteString value)

Inline document content.

bytes content = 1;

Parameter
Name Description
value ByteString

The content to set.

Returns
Type Description
RawDocument.Builder

This builder for chaining.

setDisplayName(String value)

public RawDocument.Builder setDisplayName(String value)

The display name of the document, it supports all Unicode characters except the following: *, ?, [, ], %, {, },', \", , ~, = and : are reserved. If not specified, a default ID is generated.

string display_name = 3;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
RawDocument.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public RawDocument.Builder setDisplayNameBytes(ByteString value)

The display name of the document, it supports all Unicode characters except the following: *, ?, [, ], %, {, },', \", , ~, = and : are reserved. If not specified, a default ID is generated.

string display_name = 3;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
RawDocument.Builder

This builder for chaining.

setMimeType(String value)

public RawDocument.Builder setMimeType(String value)

An IANA MIME type (RFC6838) indicating the nature and format of the content.

string mime_type = 2;

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
RawDocument.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public RawDocument.Builder setMimeTypeBytes(ByteString value)

An IANA MIME type (RFC6838) indicating the nature and format of the content.

string mime_type = 2;

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
RawDocument.Builder

This builder for chaining.