Interface DocumentInputConfigOrBuilder (2.32.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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for mimeType.

getSourceCase()

public abstract DocumentInputConfig.SourceCase getSourceCase()
Returns
TypeDescription
DocumentInputConfig.SourceCase

hasContent()

public abstract boolean hasContent()

Document's content represented as a stream of bytes.

bytes content = 1;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the gcsSource field is set.