# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::Document::Content (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::Document::Content.

Unstructured data linked to this document.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #mime_type

    def mime_type() -> ::String

**Returns**

- (::String) --- The MIME type of the content. Supported types:

  - `application/pdf` (PDF, only native PDFs are supported for now)
  - `text/html` (HTML)
  - `text/plain` (TXT)
  - `application/xml` or `text/xml` (XML)
  - `application/json` (JSON)
  - `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
  - `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
  - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (XLSX)
  - `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)

  The following types are supported only if layout parser is enabled in the
  data store:
  - `image/bmp` (BMP)
  - `image/gif` (GIF)
  - `image/jpeg` (JPEG)
  - `image/png` (PNG)
  - `image/tiff` (TIFF)

  See https://www.iana.org/assignments/media-types/media-types.xhtml.

### #mime_type=

    def mime_type=(value) -> ::String

**Parameter**

- **value** (::String) --- The MIME type of the content. Supported types:


  - `application/pdf` (PDF, only native PDFs are supported for now)
  - `text/html` (HTML)
  - `text/plain` (TXT)
  - `application/xml` or `text/xml` (XML)
  - `application/json` (JSON)
  - `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
  - `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
  - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (XLSX)
  - `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)

  The following types are supported only if layout parser is enabled in the
  data store:
  - `image/bmp` (BMP)
  - `image/gif` (GIF)
  - `image/jpeg` (JPEG)
  - `image/png` (PNG)
  - `image/tiff` (TIFF)

  See https://www.iana.org/assignments/media-types/media-types.xhtml.
**Returns**

- (::String) --- The MIME type of the content. Supported types:

  - `application/pdf` (PDF, only native PDFs are supported for now)
  - `text/html` (HTML)
  - `text/plain` (TXT)
  - `application/xml` or `text/xml` (XML)
  - `application/json` (JSON)
  - `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
  - `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
  - `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (XLSX)
  - `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)

  The following types are supported only if layout parser is enabled in the
  data store:
  - `image/bmp` (BMP)
  - `image/gif` (GIF)
  - `image/jpeg` (JPEG)
  - `image/png` (PNG)
  - `image/tiff` (TIFF)

  See https://www.iana.org/assignments/media-types/media-types.xhtml.

### #raw_bytes

    def raw_bytes() -> ::String

**Returns**

- (::String) --- The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / \~0.95 MiB).

  Note: As with all `bytes` fields, this field is represented as pure
  binary in Protocol Buffers and base64-encoded string in JSON. For
  example, `abc123!?$*&()'-=@~` should be represented as
  `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
  https://developers.google.com/protocol-buffers/docs/proto3#json.

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

### #raw_bytes=

    def raw_bytes=(value) -> ::String

**Parameter**

- **value** (::String) --- The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / \~0.95 MiB).


  Note: As with all `bytes` fields, this field is represented as pure
  binary in Protocol Buffers and base64-encoded string in JSON. For
  example, `abc123!?$*&()'-=@~` should be represented as
  `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
  https://developers.google.com/protocol-buffers/docs/proto3#json.

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

- (::String) --- The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / \~0.95 MiB).

  Note: As with all `bytes` fields, this field is represented as pure
  binary in Protocol Buffers and base64-encoded string in JSON. For
  example, `abc123!?$*&()'-=@~` should be represented as
  `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
  https://developers.google.com/protocol-buffers/docs/proto3#json.

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

### #uri

    def uri() -> ::String

**Returns**

- (::String) --- The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 200 MB for other formats.


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

### #uri=

    def uri=(value) -> ::String

**Parameter**

- **value** (::String) --- The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 200 MB for other formats.


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

- (::String) --- The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 200 MB for other formats.


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