public static final class DocumentInputConfig.Builder extends GeneratedMessageV3.Builder<DocumentInputConfig.Builder> implements DocumentInputConfigOrBuilder
A document translation request input config.
Protobuf type google.cloud.translation.v3.DocumentInputConfig
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Methods
public DocumentInputConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public DocumentInputConfig build()
public DocumentInputConfig buildPartial()
public DocumentInputConfig.Builder clear()
Overrides
clearContent()
public DocumentInputConfig.Builder clearContent()
Document's content represented as a stream of bytes.
bytes content = 1;
public DocumentInputConfig.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
public DocumentInputConfig.Builder clearGcsSource()
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public DocumentInputConfig.Builder clearMimeType()
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;
public DocumentInputConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
public DocumentInputConfig.Builder clearSource()
public DocumentInputConfig.Builder clone()
Overrides
getContent()
public ByteString getContent()
Document's content represented as a stream of bytes.
bytes content = 1;
public DocumentInputConfig getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
public GcsSource getGcsSource()
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
Returns |
---|
Type | Description |
GcsSource | The gcsSource.
|
public GcsSource.Builder getGcsSourceBuilder()
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public GcsSourceOrBuilder getGcsSourceOrBuilder()
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public 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.
|
public 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.
|
public DocumentInputConfig.SourceCase getSourceCase()
hasContent()
public boolean hasContent()
Document's content represented as a stream of bytes.
bytes content = 1;
Returns |
---|
Type | Description |
boolean | Whether the content field is set.
|
public boolean hasGcsSource()
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
Returns |
---|
Type | Description |
boolean | Whether the gcsSource field is set.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public DocumentInputConfig.Builder mergeFrom(DocumentInputConfig other)
public DocumentInputConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public DocumentInputConfig.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
public DocumentInputConfig.Builder mergeGcsSource(GcsSource value)
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public final DocumentInputConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setContent(ByteString value)
public DocumentInputConfig.Builder setContent(ByteString value)
Document's content represented as a stream of bytes.
bytes content = 1;
Parameter |
---|
Name | Description |
value | ByteString
The content to set.
|
public DocumentInputConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public DocumentInputConfig.Builder setGcsSource(GcsSource value)
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public DocumentInputConfig.Builder setGcsSource(GcsSource.Builder builderForValue)
Google Cloud Storage location. This must be a single file.
For example: gs://example_bucket/example_file.pdf
.google.cloud.translation.v3.GcsSource gcs_source = 2;
public DocumentInputConfig.Builder setMimeType(String value)
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;
Parameter |
---|
Name | Description |
value | String
The mimeType to set.
|
public DocumentInputConfig.Builder setMimeTypeBytes(ByteString value)
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;
Parameter |
---|
Name | Description |
value | ByteString
The bytes for mimeType to set.
|
public DocumentInputConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public final DocumentInputConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides