Interface DocumentOrBuilder (2.34.0)

publicinterface DocumentOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getBoilerplateHandling()

publicabstractDocument.BoilerplateHandlinggetBoilerplateHandling()

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;

Returns
Type Description
Document.BoilerplateHandling

The boilerplateHandling.

getBoilerplateHandlingValue()

publicabstractintgetBoilerplateHandlingValue()

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;

Returns
Type Description
int

The enum numeric value on the wire for boilerplateHandling.

getContent()

publicabstractStringgetContent()

The content of the input in string format. Cloud audit logging exempt since it is based on user data.

string content = 2;

Returns
Type Description
String

The content.

getContentBytes()

publicabstractByteStringgetContentBytes()

The content of the input in string format. Cloud audit logging exempt since it is based on user data.

string content = 2;

Returns
Type Description
ByteString

The bytes for content.

getGcsContentUri()

publicabstractStringgetGcsContentUri()

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
Type Description
String

The gcsContentUri.

getGcsContentUriBytes()

publicabstractByteStringgetGcsContentUriBytes()

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
Type Description
ByteString

The bytes for gcsContentUri.

getLanguage()

publicabstractStringgetLanguage()

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 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
Type Description
String

The language.

getLanguageBytes()

publicabstractByteStringgetLanguageBytes()

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 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
Type Description
ByteString

The bytes for language.

getReferenceWebUri()

publicabstractStringgetReferenceWebUri()

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;

Returns
Type Description
String

The referenceWebUri.

getReferenceWebUriBytes()

publicabstractByteStringgetReferenceWebUriBytes()

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;

Returns
Type Description
ByteString

The bytes for referenceWebUri.

getSourceCase()

publicabstractDocument.SourceCasegetSourceCase()
Returns
Type Description
Document.SourceCase

getType()

publicabstractDocument.TypegetType()

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

.google.cloud.language.v1beta2.Document.Type type = 1;

Returns
Type Description
Document.Type

The type.

getTypeValue()

publicabstractintgetTypeValue()

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

.google.cloud.language.v1beta2.Document.Type type = 1;

Returns
Type Description
int

The enum numeric value on the wire for type.

hasContent()

publicabstractbooleanhasContent()

The content of the input in string format. Cloud audit logging exempt since it is based on user data.

string content = 2;

Returns
Type Description
boolean

Whether the content field is set.

hasGcsContentUri()

publicabstractbooleanhasGcsContentUri()

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
Type Description
boolean

Whether the gcsContentUri field is set.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月17日 UTC.