# Natural Language V1 API - Class Google::Cloud::Language::V1::Document (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.11.0 0.10.2 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.5 Reference documentation and code samples for the Natural Language V1 API class Google::Cloud::Language::V1::Document.

Represents the input to API methods.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #content

    def content() -> ::String

**Returns**

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

  Note: The following fields are mutually exclusive: `content`, `gcs_content_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #content=

    def content=(value) -> ::String

**Parameter**

- **value** (::String) --- The content of the input in string format. Cloud audit logging exempt since it is based on user data.


  Note: The following fields are mutually exclusive: `content`, `gcs_content_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

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

  Note: The following fields are mutually exclusive: `content`, `gcs_content_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #gcs_content_uri

    def gcs_content_uri() -> ::String

**Returns**

- (::String) --- 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.

  Note: The following fields are mutually exclusive: `gcs_content_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #gcs_content_uri=

    def gcs_content_uri=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.


  Note: The following fields are mutually exclusive: `gcs_content_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- (::String) --- 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.

  Note: The following fields are mutually exclusive: `gcs_content_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #language

    def language() -> ::String

**Returns**

- (::String) --- The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.  
  [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.

### #language=

    def language=(value) -> ::String

**Parameter**

- **value** (::String) --- The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.  
  [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.
**Returns**

- (::String) --- The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.  
  [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.

### #type

    def type() -> ::Google::Cloud::Language::V1::Document::Type

**Returns**

- ([::Google::Cloud::Language::V1::Document::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v1/latest/Google-Cloud-Language-V1-Document-Type)) --- Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.

### #type=

    def type=(value) -> ::Google::Cloud::Language::V1::Document::Type

**Parameter**

- **value** ([::Google::Cloud::Language::V1::Document::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v1/latest/Google-Cloud-Language-V1-Document-Type)) --- Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
**Returns**

- ([::Google::Cloud::Language::V1::Document::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v1/latest/Google-Cloud-Language-V1-Document-Type)) --- Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.