# Class Document (2.21.0)

2.21.0 (latest) 2.20.0 2.19.0 2.18.0 2.17.2 2.16.0 2.15.1 2.14.0 2.13.4 2.12.0 2.11.0 2.10.1 2.9.1 2.8.1 2.7.0 2.6.1 2.5.2 2.4.3 2.3.2 2.2.2 2.1.0 2.0.0 1.3.2

    Document(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents the input to API methods.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `type_` | `https://docs.cloud.google.com/python/docs/reference/language/latest/google.cloud.language_v1.types.Document.Type` Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
| `content` | `str` The content of the input in string format. Cloud audit logging exempt since it is based on user data. This field is a member of `oneof`_ `source`. |
| `gcs_content_uri` | `str` 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. This field is a member of `oneof`_ `source`. |
| `language` | `str` The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. \`Language Support |

## Classes

### Type

    Type(value)

The document types enum.