Send feedback
Class DocumentInputConfig.Builder (2.11.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.11.0 keyboard_arrow_down
public static final class DocumentInputConfig . Builder extends GeneratedMessageV3 . Builder<DocumentInputConfig . Builder > implements DocumentInputConfigOrBuilder
A document translation request input config.
Protobuf type google.cloud.translation.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]