Package com.google.cloud.translate.v3
Class DocumentInputConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
com.google.cloud.translate.v3.DocumentInputConfig.Builder
- All Implemented Interfaces:
DocumentInputConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- DocumentInputConfig
public static final class DocumentInputConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
implements DocumentInputConfigOrBuilder
A document translation request input config.Protobuf type
google.cloud.translation.v3.DocumentInputConfig-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Document's content represented as a stream of bytes.Google Cloud Storage location.Specifies the input document's mime_type.com.google.protobuf.ByteStringDocument's content represented as a stream of bytes.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorGoogle Cloud Storage location.Google Cloud Storage location.Google Cloud Storage location.Specifies the input document's mime_type.com.google.protobuf.ByteStringSpecifies the input document's mime_type.booleanDocument's content represented as a stream of bytes.booleanGoogle Cloud Storage location.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(DocumentInputConfig other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeGcsSource(GcsSource value) Google Cloud Storage location.setContent(com.google.protobuf.ByteString value) Document's content represented as a stream of bytes.setGcsSource(GcsSource value) Google Cloud Storage location.setGcsSource(GcsSource.Builder builderForValue) Google Cloud Storage location.setMimeType(String value) Specifies the input document's mime_type.setMimeTypeBytes(com.google.protobuf.ByteString value) Specifies the input document's mime_type.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DocumentInputConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DocumentInputConfig.Builder>- Throws:
IOException
-
getSourceCase
- Specified by:
getSourceCasein interfaceDocumentInputConfigOrBuilder
-
clearSource
-
hasContent
public boolean hasContent()Document's content represented as a stream of bytes.
bytes content = 1;- Specified by:
hasContentin interfaceDocumentInputConfigOrBuilder- Returns:
- Whether the content field is set.
-
getContent
public com.google.protobuf.ByteString getContent()Document's content represented as a stream of bytes.
bytes content = 1;- Specified by:
getContentin interfaceDocumentInputConfigOrBuilder- Returns:
- The content.
-
setContent
Document's content represented as a stream of bytes.
bytes content = 1;- Parameters:
value- The content to set.- Returns:
- This builder for chaining.
-
clearContent
Document's content represented as a stream of bytes.
bytes content = 1;- Returns:
- This builder for chaining.
-
hasGcsSource
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;- Specified by:
hasGcsSourcein interfaceDocumentInputConfigOrBuilder- Returns:
- Whether the gcsSource field is set.
-
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;- Specified by:
getGcsSourcein interfaceDocumentInputConfigOrBuilder- Returns:
- The gcsSource.
-
setGcsSource
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; -
setGcsSource
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; -
mergeGcsSource
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; -
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; -
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; -
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;- Specified by:
getGcsSourceOrBuilderin interfaceDocumentInputConfigOrBuilder
-
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;- Specified by:
getMimeTypein interfaceDocumentInputConfigOrBuilder- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.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;- Specified by:
getMimeTypeBytesin interfaceDocumentInputConfigOrBuilder- Returns:
- The bytes for mimeType.
-
setMimeType
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;- Parameters:
value- The mimeType to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setMimeTypeBytes
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;- Parameters:
value- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-