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.v3beta1.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.v3beta1.DocumentInputConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentInputConfig.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)DocumentInputConfigbuild()DocumentInputConfigbuildPartial()DocumentInputConfig.Builderclear()DocumentInputConfig.BuilderclearContent()Document's content represented as a stream of bytes.DocumentInputConfig.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)DocumentInputConfig.BuilderclearGcsSource()Google Cloud Storage location.DocumentInputConfig.BuilderclearMimeType()Specifies the input document's mime_type.DocumentInputConfig.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)DocumentInputConfig.BuilderclearSource()DocumentInputConfig.Builderclone()com.google.protobuf.ByteStringgetContent()Document's content represented as a stream of bytes.DocumentInputConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()GcsSourcegetGcsSource()Google Cloud Storage location.GcsSource.BuildergetGcsSourceBuilder()Google Cloud Storage location.GcsSourceOrBuildergetGcsSourceOrBuilder()Google Cloud Storage location.StringgetMimeType()Specifies the input document's mime_type.com.google.protobuf.ByteStringgetMimeTypeBytes()Specifies the input document's mime_type.DocumentInputConfig.SourceCasegetSourceCase()booleanhasContent()Document's content represented as a stream of bytes.booleanhasGcsSource()Google Cloud Storage location.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()DocumentInputConfig.BuildermergeFrom(DocumentInputConfig other)DocumentInputConfig.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)DocumentInputConfig.BuildermergeFrom(com.google.protobuf.Message other)DocumentInputConfig.BuildermergeGcsSource(GcsSource value)Google Cloud Storage location.DocumentInputConfig.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)DocumentInputConfig.BuildersetContent(com.google.protobuf.ByteString value)Document's content represented as a stream of bytes.DocumentInputConfig.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)DocumentInputConfig.BuildersetGcsSource(GcsSource value)Google Cloud Storage location.DocumentInputConfig.BuildersetGcsSource(GcsSource.Builder builderForValue)Google Cloud Storage location.DocumentInputConfig.BuildersetMimeType(String value)Specifies the input document's mime_type.DocumentInputConfig.BuildersetMimeTypeBytes(com.google.protobuf.ByteString value)Specifies the input document's mime_type.DocumentInputConfig.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)DocumentInputConfig.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clear
public DocumentInputConfig.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
getDefaultInstanceForType
public DocumentInputConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public DocumentInputConfig build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public DocumentInputConfig buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public DocumentInputConfig.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
setField
public DocumentInputConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clearField
public DocumentInputConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
clearOneof
public DocumentInputConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
setRepeatedField
public DocumentInputConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
addRepeatedField
public DocumentInputConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DocumentInputConfig.Builder>
-
mergeFrom
public DocumentInputConfig.Builder mergeFrom(DocumentInputConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
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
public DocumentInputConfig.SourceCase getSourceCase()
- Specified by:
getSourceCasein interfaceDocumentInputConfigOrBuilder
-
clearSource
public DocumentInputConfig.Builder 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
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.v3beta1.GcsSource gcs_source = 2;- Specified by:
hasGcsSourcein 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.v3beta1.GcsSource gcs_source = 2;- Specified by:
getGcsSourcein 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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.GcsSource gcs_source = 2;- Specified by:
getGcsSourceOrBuilderin 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:
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
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
mergeUnknownFields
public final DocumentInputConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DocumentInputConfig.Builder>
-
-