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()
Returns
Methods
public DocumentInputConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public DocumentInputConfig build()
Returns
public DocumentInputConfig buildPartial()
Returns
public DocumentInputConfig.Builder clear()
Returns
Overrides
clearContent()
public DocumentInputConfig.Builder clearContent()
Document's content represented as a stream of bytes.
bytes content = 1;
Returns
public DocumentInputConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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;
Returns
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;
Returns
public DocumentInputConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
public DocumentInputConfig.Builder clearSource()
Returns
public DocumentInputConfig.Builder clone()
Returns
Overrides
getContent()
public ByteString getContent()
Document's content represented as a stream of bytes.
bytes content = 1;
Returns
public DocumentInputConfig getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
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
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;
Returns
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;
Returns
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
public DocumentInputConfig.SourceCase getSourceCase()
Returns
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()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public DocumentInputConfig.Builder mergeFrom(DocumentInputConfig other)
Parameter
Returns
public DocumentInputConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public DocumentInputConfig.Builder mergeFrom(Message other)
Parameter
Returns
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;
Parameter
Returns
public final DocumentInputConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setContent(ByteString value)
public DocumentInputConfig.Builder setContent(ByteString value)
Document's content represented as a stream of bytes.
bytes content = 1;
Parameter
Returns
public DocumentInputConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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;
Parameter
Returns
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;
Parameter
Returns
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.
|
Returns
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.
|
Returns
public DocumentInputConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
public final DocumentInputConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides