# Google Developer Knowledge V1 Client - Class AnswerCitation (0.2.1)

0.7.0 (latest) 0.6.0 0.5.0 0.4.2 0.2.1 0.1.0 Reference documentation and code samples for the Google Developer Knowledge V1 Client class AnswerCitation.

Citation info for a segment.

Generated from protobuf message `google.developers.knowledge.v1.Answer.AnswerCitation`

## Namespace

Google \\ Developers \\ DeveloperKnowledge \\ V1 \\ Answer

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ start_index` | `int` Output only. Indicates the start of the segment, measured in bytes (UTF-8 unicode), inclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length. |
| `↳ end_index` | `int` Output only. Indicates the end of the segment, measured in bytes (UTF-8 unicode), exclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length. |
| `↳ sources` | `array<CitationSource>` Output only. Contains citation sources for the attributed segment. |

### getStartIndex

Output only. Indicates the start of the segment, measured in bytes (UTF-8
unicode), inclusive. If there are multi-byte characters, such as
non-ASCII characters, the index measurement is longer than the string
length.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setStartIndex

Output only. Indicates the start of the segment, measured in bytes (UTF-8
unicode), inclusive. If there are multi-byte characters, such as
non-ASCII characters, the index measurement is longer than the string
length.

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

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

### getEndIndex

Output only. Indicates the end of the segment, measured in bytes (UTF-8
unicode), exclusive. If there are multi-byte characters, such as
non-ASCII characters, the index measurement is longer than the string
length.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setEndIndex

Output only. Indicates the end of the segment, measured in bytes (UTF-8
unicode), exclusive. If there are multi-byte characters, such as
non-ASCII characters, the index measurement is longer than the string
length.

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

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

### getSources

Output only. Contains citation sources for the attributed segment.

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

### setSources

Output only. Contains citation sources for the attributed segment.

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

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