public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
Represents the input to API methods.Protobuf type
google.cloud.language.v1beta2.Document
Modifier and Type | Method and Description |
---|---|
Document.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
Document |
build() |
Document |
buildPartial() |
Document.Builder |
clear() |
Document.Builder |
clearBoilerplateHandling()
Indicates how detected boilerplate(e.g.
|
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 |
clearReferenceWebUri()
The web URI where the document comes from.
|
Document.Builder |
clearSource() |
Document.Builder |
clearType()
Required.
|
Document.Builder |
clone() |
Document.BoilerplateHandling |
getBoilerplateHandling()
Indicates how detected boilerplate(e.g.
|
int |
getBoilerplateHandlingValue()
Indicates how detected boilerplate(e.g.
|
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() |
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.
|
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).
|
String |
getReferenceWebUri()
The web URI where the document comes from.
|
ByteString |
getReferenceWebUriBytes()
The web URI where the document comes from.
|
Document.SourceCase |
getSourceCase() |
Document.Type |
getType()
Required.
|
int |
getTypeValue()
Required.
|
boolean |
hasContent()
The content of the input in string format.
|
boolean |
hasGcsContentUri()
The Google Cloud Storage URI where the file content is located.
|
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 |
setBoilerplateHandling(Document.BoilerplateHandling value)
Indicates how detected boilerplate(e.g.
|
Document.Builder |
setBoilerplateHandlingValue(int value)
Indicates how detected boilerplate(e.g.
|
Document.Builder |
setContent(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,
Object value) |
Document.Builder |
setGcsContentUri(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(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 |
setReferenceWebUri(String value)
The web URI where the document comes from.
|
Document.Builder |
setReferenceWebUriBytes(ByteString value)
The web URI where the document comes from.
|
Document.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
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, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
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, 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, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, 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 IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Document.Builder>
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.v1beta2.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.v1beta2.Document.Type type = 1;
value
- The enum numeric value on the wire for type to set.public Document.Type getType()
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1beta2.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.v1beta2.Document.Type type = 1;
value
- The type to set.public Document.Builder clearType()
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
.google.cloud.language.v1beta2.Document.Type type = 1;
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;
hasContent
in interface DocumentOrBuilder
public String getContent()
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;
getContent
in interface DocumentOrBuilder
public ByteString getContentBytes()
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;
getContentBytes
in interface DocumentOrBuilder
public Document.Builder setContent(String value)
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;
value
- The content to set.public Document.Builder clearContent()
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;
public Document.Builder setContentBytes(ByteString value)
The content of the input in string format. Cloud audit logging exempt since it is based on user data.
string content = 2;
value
- The bytes for content to set.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;
hasGcsContentUri
in interface DocumentOrBuilder
public 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(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;
value
- The gcsContentUri to set.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;
value
- The bytes for gcsContentUri to set.public 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](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;
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](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;
getLanguageBytes
in interface DocumentOrBuilder
public Document.Builder setLanguage(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](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;
value
- The language to set.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](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;
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](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;
value
- The bytes for language to set.public String getReferenceWebUri()
The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.
string reference_web_uri = 5;
getReferenceWebUri
in interface DocumentOrBuilder
public ByteString getReferenceWebUriBytes()
The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.
string reference_web_uri = 5;
getReferenceWebUriBytes
in interface DocumentOrBuilder
public Document.Builder setReferenceWebUri(String value)
The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.
string reference_web_uri = 5;
value
- The referenceWebUri to set.public Document.Builder clearReferenceWebUri()
The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.
string reference_web_uri = 5;
public Document.Builder setReferenceWebUriBytes(ByteString value)
The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.
string reference_web_uri = 5;
value
- The bytes for referenceWebUri to set.public int getBoilerplateHandlingValue()
Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
.google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6;
getBoilerplateHandlingValue
in interface DocumentOrBuilder
public Document.Builder setBoilerplateHandlingValue(int value)
Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
.google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6;
value
- The enum numeric value on the wire for boilerplateHandling to set.public Document.BoilerplateHandling getBoilerplateHandling()
Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
.google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6;
getBoilerplateHandling
in interface DocumentOrBuilder
public Document.Builder setBoilerplateHandling(Document.BoilerplateHandling value)
Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
.google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6;
value
- The boilerplateHandling to set.public Document.Builder clearBoilerplateHandling()
Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
.google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6;
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>
Copyright © 2022 Google LLC. All rights reserved.