Package com.google.cloud.language.v1
Class Document.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.Builder>
com.google.cloud.language.v1.Document.Builder
- All Implemented Interfaces:
DocumentOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Document
public static final class Document.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Document.Builder>
implements DocumentOrBuilder
Represents the input to API methods.Protobuf type
google.cloud.language.v1.Document-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The content of the input in string format.The Google Cloud Storage URI where the file content is located.The language of the document (if not specified, the language is automatically detected).Required.The content of the input in string format.com.google.protobuf.ByteStringThe content of the input in string format.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe Google Cloud Storage URI where the file content is located.com.google.protobuf.ByteStringThe Google Cloud Storage URI where the file content is located.The language of the document (if not specified, the language is automatically detected).com.google.protobuf.ByteStringThe language of the document (if not specified, the language is automatically detected).getType()Required.intRequired.booleanThe content of the input in string format.booleanThe Google Cloud Storage URI where the file content is located.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setContent(String value) The content of the input in string format.setContentBytes(com.google.protobuf.ByteString value) The content of the input in string format.setGcsContentUri(String value) The Google Cloud Storage URI where the file content is located.setGcsContentUriBytes(com.google.protobuf.ByteString value) The Google Cloud Storage URI where the file content is located.setLanguage(String value) The language of the document (if not specified, the language is automatically detected).setLanguageBytes(com.google.protobuf.ByteString value) The language of the document (if not specified, the language is automatically detected).setType(Document.Type value) Required.setTypeValue(int value) Required.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<Document.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<Document.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<Document.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<Document.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Document.Builder>
-
mergeFrom
public Document.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<Document.Builder>- Throws:
IOException
-
getSourceCase
- Specified by:
getSourceCasein interfaceDocumentOrBuilder
-
clearSource
-
getTypeValue
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;- Specified by:
getTypeValuein interfaceDocumentOrBuilder- Returns:
- The enum numeric value on the wire for type.
-
setTypeValue
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;- Parameters:
value- The enum numeric value on the wire for type to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getTypein interfaceDocumentOrBuilder- Returns:
- The type.
-
setType
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1.Document.Type type = 1;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
hasContent
public boolean hasContent()The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Specified by:
hasContentin interfaceDocumentOrBuilder- Returns:
- Whether the content field is set.
-
getContent
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Specified by:
getContentin interfaceDocumentOrBuilder- Returns:
- The content.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes()The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Specified by:
getContentBytesin interfaceDocumentOrBuilder- Returns:
- The bytes for content.
-
setContent
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Parameters:
value- The content to set.- Returns:
- This builder for chaining.
-
clearContent
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Returns:
- This builder for chaining.
-
setContentBytes
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;- Parameters:
value- The bytes for content to set.- Returns:
- This builder for chaining.
-
hasGcsContentUri
public boolean hasGcsContentUri()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;- Specified by:
hasGcsContentUriin interfaceDocumentOrBuilder- Returns:
- Whether the gcsContentUri field is set.
-
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;- Specified by:
getGcsContentUriin interfaceDocumentOrBuilder- Returns:
- The gcsContentUri.
-
getGcsContentUriBytes
public com.google.protobuf.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;- Specified by:
getGcsContentUriBytesin interfaceDocumentOrBuilder- Returns:
- The bytes for gcsContentUri.
-
setGcsContentUri
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;- Parameters:
value- The gcsContentUri to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
setGcsContentUriBytes
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;- Parameters:
value- The bytes for gcsContentUri to set.- Returns:
- This builder for chaining.
-
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](https://cloud.google.com/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;- Specified by:
getLanguagein interfaceDocumentOrBuilder- Returns:
- The language.
-
getLanguageBytes
public com.google.protobuf.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](https://cloud.google.com/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;- Specified by:
getLanguageBytesin interfaceDocumentOrBuilder- Returns:
- The bytes for language.
-
setLanguage
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](https://cloud.google.com/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;- Parameters:
value- The language to set.- Returns:
- This builder for chaining.
-
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](https://cloud.google.com/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;- Returns:
- This builder for chaining.
-
setLanguageBytes
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](https://cloud.google.com/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;- Parameters:
value- The bytes for language to set.- Returns:
- This builder for chaining.
-