0.31.0 (latest) 0.30.0 0.29.0 0.28.0 0.27.0 0.23.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.1 0.15.0 0.14.0 0.13.1 0.12.1 0.11.2 0.10.0 0.9.0 0.8.1 0.7.2 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Google Apps Chat V1 Client class Citation.

Citations are inline references that can provide users more detailed
information about the inline reference. Corresponding inline citations
should be present in the message text in a markup format of
`<chat-citation data-id="{id}">{text}</chat-citation>`. Citations are
only supported when the message's `markup_syntax` is set to `MARKDOWN`.

Unreferenced citations in `Elements.citations` (those without a matching
`<chat-citation>` tag in the message text) are ignored and do not cause the
message to be rejected.

Generated from protobuf message `google.chat.v1.Citation`

## Namespace

Google \\ Apps \\ Chat \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` Required. The ID of the citation. This ID is defined by the app creating the citation and must match the `data-id` attribute of the `<chat-citation>` tag in the message text. Must contain only ASCII letters and numbers, and less than 63 characters. |
| `↳ cited_sources` | `array<CitedSource>` Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card. |

### getId

Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the `data-id` attribute of the
`<chat-citation>` tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setId

Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the `data-id` attribute of the
`<chat-citation>` tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCitedSources

Optional. A list of sources that are relevant to the citation. Sources are
displayed in the citation hover card.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<CitedSource>` |   |

### setCitedSources

Optional. A list of sources that are relevant to the citation. Sources are
displayed in the citation hover card.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<CitedSource>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |