public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
################################################################ # Represents the input to API methods.Protobuf type
google.cloud.language.v1.Document
Modifier and Type | Method and Description |
---|---|
Document.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Document |
build() |
Document |
buildPartial() |
Document.Builder |
clear() |
Document.Builder |
clearContent()
The content of the input in string format.
|
Document.Builder |
clearField(Descriptors.FieldDescriptor field) |
Document.Builder |
clearGcsContentUri()
The Google Cloud Storage URI where the file content is located.
|
Document.Builder |
clearLanguage()
The language of the document (if not specified, the language is
automatically detected).
|
Document.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Document.Builder |
clearSource() |
Document.Builder |
clearType()
Required.
|
Document.Builder |
clone() |
java.lang.String |
getContent()
The content of the input in string format.
|
ByteString |
getContentBytes()
The content of the input in string format.
|
Document |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getGcsContentUri()
The Google Cloud Storage URI where the file content is located.
|
ByteString |
getGcsContentUriBytes()
The Google Cloud Storage URI where the file content is located.
|
java.lang.String |
getLanguage()
The language of the document (if not specified, the language is
automatically detected).
|
ByteString |
getLanguageBytes()
The language of the document (if not specified, the language is
automatically detected).
|
Document.SourceCase |
getSourceCase() |
Document.Type |
getType()
Required.
|
int |
getTypeValue()
Required.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Document.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Document.Builder |
mergeFrom(Document other) |
Document.Builder |
mergeFrom(Message other) |
Document.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Document.Builder |
setContent(java.lang.String value)
The content of the input in string format.
|
Document.Builder |
setContentBytes(ByteString value)
The content of the input in string format.
|
Document.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Document.Builder |
setGcsContentUri(java.lang.String value)
The Google Cloud Storage URI where the file content is located.
|
Document.Builder |
setGcsContentUriBytes(ByteString value)
The Google Cloud Storage URI where the file content is located.
|
Document.Builder |
setLanguage(java.lang.String value)
The language of the document (if not specified, the language is
automatically detected).
|
Document.Builder |
setLanguageBytes(ByteString value)
The language of the document (if not specified, the language is
automatically detected).
|
Document.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Document.Builder |
setType(Document.Type value)
Required.
|
Document.Builder |
setTypeValue(int value)
Required.
|
Document.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Document.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Document.Builder>
public Document getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Document build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Document buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Document.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Document.Builder>
public Document.Builder mergeFrom(Document other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Document.Builder>
java.io.IOException
public Document.SourceCase getSourceCase()
getSourceCase
in interface DocumentOrBuilder
public Document.Builder clearSource()
public int getTypeValue()
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;
getTypeValue
in interface DocumentOrBuilder
public Document.Builder setTypeValue(int value)
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;
public Document.Type getType()
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;
getType
in interface DocumentOrBuilder
public Document.Builder setType(Document.Type value)
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;
public Document.Builder clearType()
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;
public java.lang.String getContent()
The content of the input in string format.
string content = 2;
getContent
in interface DocumentOrBuilder
public ByteString getContentBytes()
The content of the input in string format.
string content = 2;
getContentBytes
in interface DocumentOrBuilder
public Document.Builder setContent(java.lang.String value)
The content of the input in string format.
string content = 2;
public Document.Builder clearContent()
The content of the input in string format.
string content = 2;
public Document.Builder setContentBytes(ByteString value)
The content of the input in string format.
string content = 2;
public java.lang.String getGcsContentUri()
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
string gcs_content_uri = 3;
getGcsContentUri
in interface DocumentOrBuilder
public ByteString getGcsContentUriBytes()
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
string gcs_content_uri = 3;
getGcsContentUriBytes
in interface DocumentOrBuilder
public Document.Builder setGcsContentUri(java.lang.String value)
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
string gcs_content_uri = 3;
public Document.Builder clearGcsContentUri()
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
string gcs_content_uri = 3;
public Document.Builder setGcsContentUriBytes(ByteString value)
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.
string gcs_content_uri = 3;
public java.lang.String getLanguage()
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.<br> [Language Support](/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
string language = 4;
getLanguage
in interface DocumentOrBuilder
public ByteString getLanguageBytes()
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.<br> [Language Support](/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
string language = 4;
getLanguageBytes
in interface DocumentOrBuilder
public Document.Builder setLanguage(java.lang.String value)
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.<br> [Language Support](/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
string language = 4;
public Document.Builder clearLanguage()
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.<br> [Language Support](/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
string language = 4;
public Document.Builder setLanguageBytes(ByteString value)
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.<br> [Language Support](/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned.
string language = 4;
public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Document.Builder>
public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Document.Builder>