# Cloud Natural Language V2 API - Class Google::Cloud::Language::V2::AnnotateTextRequest (v1.5.0)

1.5.0 (latest) 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.7.0 0.6.0 0.5.1 0.4.0 0.3.2 0.2.0 0.1.0 Reference documentation and code samples for the Cloud Natural Language V2 API class Google::Cloud::Language::V2::AnnotateTextRequest.

The request message for the text annotation API, which can perform multiple
analysis types in one call.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #document

    def document() -> ::Google::Cloud::Language::V2::Document

**Returns**

- ([::Google::Cloud::Language::V2::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-Document)) --- Required. Input document.

### #document=

    def document=(value) -> ::Google::Cloud::Language::V2::Document

**Parameter**

- **value** ([::Google::Cloud::Language::V2::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-Document)) --- Required. Input document.
**Returns**

- ([::Google::Cloud::Language::V2::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-Document)) --- Required. Input document.

### #encoding_type

    def encoding_type() -> ::Google::Cloud::Language::V2::EncodingType

**Returns**

- ([::Google::Cloud::Language::V2::EncodingType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-EncodingType)) --- The encoding type used by the API to calculate offsets.

### #encoding_type=

    def encoding_type=(value) -> ::Google::Cloud::Language::V2::EncodingType

**Parameter**

- **value** ([::Google::Cloud::Language::V2::EncodingType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-EncodingType)) --- The encoding type used by the API to calculate offsets.
**Returns**

- ([::Google::Cloud::Language::V2::EncodingType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-EncodingType)) --- The encoding type used by the API to calculate offsets.

### #features

    def features() -> ::Google::Cloud::Language::V2::AnnotateTextRequest::Features

**Returns**

- ([::Google::Cloud::Language::V2::AnnotateTextRequest::Features](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-AnnotateTextRequest-Features)) --- Required. The enabled features.

### #features=

    def features=(value) -> ::Google::Cloud::Language::V2::AnnotateTextRequest::Features

**Parameter**

- **value** ([::Google::Cloud::Language::V2::AnnotateTextRequest::Features](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-AnnotateTextRequest-Features)) --- Required. The enabled features.
**Returns**

- ([::Google::Cloud::Language::V2::AnnotateTextRequest::Features](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-language-v2/latest/Google-Cloud-Language-V2-AnnotateTextRequest-Features)) --- Required. The enabled features.