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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<DocumentInputConfig.Builder> implements DocumentInputConfigOrBuilder
A document translation request input config.
Protobuf typegoogle.cloud.translation.v3.DocumentInputConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentInputConfig.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
DocumentInputConfig
build()
DocumentInputConfig
buildPartial()
DocumentInputConfig.Builder
clear()
DocumentInputConfig.Builder
clearContent()
Document's content represented as a stream of bytes.DocumentInputConfig.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
DocumentInputConfig.Builder
clearGcsSource()
Google Cloud Storage location.DocumentInputConfig.Builder
clearMimeType()
Specifies the input document's mime_type.DocumentInputConfig.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
DocumentInputConfig.Builder
clearSource()
DocumentInputConfig.Builder
clone()
com.google.protobuf.ByteString
getContent()
Document's content represented as a stream of bytes.DocumentInputConfig
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
GcsSource
getGcsSource()
Google Cloud Storage location.GcsSource.Builder
getGcsSourceBuilder()
Google Cloud Storage location.GcsSourceOrBuilder
getGcsSourceOrBuilder()
Google Cloud Storage location.String
getMimeType()
Specifies the input document's mime_type.com.google.protobuf.ByteString
getMimeTypeBytes()
Specifies the input document's mime_type.DocumentInputConfig.SourceCase
getSourceCase()
boolean
hasContent()
Document's content represented as a stream of bytes.boolean
hasGcsSource()
Google Cloud Storage location.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
DocumentInputConfig.Builder
mergeFrom(DocumentInputConfig other)
DocumentInputConfig.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
DocumentInputConfig.Builder
mergeFrom(com.google.protobuf.Message other)
DocumentInputConfig.Builder
mergeGcsSource(GcsSource value)
Google Cloud Storage location.DocumentInputConfig.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
DocumentInputConfig.Builder
setContent(com.google.protobuf.ByteString value)
Document's content represented as a stream of bytes.DocumentInputConfig.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
DocumentInputConfig.Builder
setGcsSource(GcsSource value)
Google Cloud Storage location.DocumentInputConfig.Builder
setGcsSource(GcsSource.Builder builderForValue)
Google Cloud Storage location.DocumentInputConfig.Builder
setMimeType(String value)
Specifies the input document's mime_type.DocumentInputConfig.Builder
setMimeTypeBytes(com.google.protobuf.ByteString value)
Specifies the input document's mime_type.DocumentInputConfig.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
DocumentInputConfig.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clear
public DocumentInputConfig.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
getDefaultInstanceForType
public DocumentInputConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public DocumentInputConfig build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public DocumentInputConfig buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public DocumentInputConfig.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
setField
public DocumentInputConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clearField
public DocumentInputConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clearOneof
public DocumentInputConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
setRepeatedField
public DocumentInputConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
addRepeatedField
public DocumentInputConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(DocumentInputConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<DocumentInputConfig.Builder>
- Throws:
IOException
-
getSourceCase
public DocumentInputConfig.SourceCase getSourceCase()
- Specified by:
getSourceCase
in interfaceDocumentInputConfigOrBuilder
-
clearSource
public DocumentInputConfig.Builder clearSource()
-
hasContent
public boolean hasContent()
Document's content represented as a stream of bytes.
bytes content = 1;
- Specified by:
hasContent
in 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:
getContent
in interfaceDocumentInputConfigOrBuilder
- Returns:
- The content.
-
setContent
public DocumentInputConfig.Builder setContent(com.google.protobuf.ByteString value)
Document's content represented as a stream of bytes.
bytes content = 1;
- Parameters:
value
- The content to set.- Returns:
- This builder for chaining.
-
clearContent
public DocumentInputConfig.Builder 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:
hasGcsSource
in interfaceDocumentInputConfigOrBuilder
- Returns:
- Whether the gcsSource field is set.
-
getGcsSource
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;
- Specified by:
getGcsSource
in interfaceDocumentInputConfigOrBuilder
- Returns:
- The gcsSource.
-
setGcsSource
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;
-
setGcsSource
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;
-
mergeGcsSource
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;
-
clearGcsSource
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;
-
getGcsSourceBuilder
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;
-
getGcsSourceOrBuilder
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;
- Specified by:
getGcsSourceOrBuilder
in interfaceDocumentInputConfigOrBuilder
-
getMimeType
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;
- Specified by:
getMimeType
in 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:
getMimeTypeBytes
in interfaceDocumentInputConfigOrBuilder
- Returns:
- The bytes for mimeType.
-
setMimeType
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;
- Parameters:
value
- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
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:
- This builder for chaining.
-
setMimeTypeBytes
public DocumentInputConfig.Builder setMimeTypeBytes(com.google.protobuf.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;
- Parameters:
value
- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final DocumentInputConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
mergeUnknownFields
public final DocumentInputConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
-