Interface DocumentInputConfigOrBuilder (2.53.0)

public interface DocumentInputConfigOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getContent()

public abstract ByteString getContent()

Document's content represented as a stream of bytes.

bytes content = 1;

Returns
Type Description
ByteString

The content.

getGcsSource()

public abstract GcsSource getGcsSource()

Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;

Returns
Type Description
GcsSource

The gcsSource.

getGcsSourceOrBuilder()

public abstract GcsSourceOrBuilder getGcsSourceOrBuilder()

Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;

Returns
Type Description
GcsSourceOrBuilder

getMimeType()

public abstract String getMimeType()

Specifies the input document's mime_type.

If not specified it will be determined using the file extension for gcs_source provided files. For a file provided through bytes content the mime_type must be provided. Currently supported mime types are:

  • application/pdf
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

string mime_type = 4;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public abstract ByteString getMimeTypeBytes()

Specifies the input document's mime_type.

If not specified it will be determined using the file extension for gcs_source provided files. For a file provided through bytes content the mime_type must be provided. Currently supported mime types are:

  • application/pdf
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

string mime_type = 4;

Returns
Type Description
ByteString

The bytes for mimeType.

getSourceCase()

public abstract DocumentInputConfig.SourceCase getSourceCase()
Returns
Type Description
DocumentInputConfig.SourceCase

hasContent()

public abstract boolean hasContent()

Document's content represented as a stream of bytes.

bytes content = 1;

Returns
Type Description
boolean

Whether the content field is set.

hasGcsSource()

public abstract boolean hasGcsSource()

Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf

.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;

Returns
Type Description
boolean

Whether the gcsSource field is set.