# Google Cloud Discovery Engine V1 Client - Class Claim (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Claim.

Text and citation info for a claim in the answer candidate.

Generated from protobuf message `google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1 \\ CheckGroundingResponse

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ start_pos` | `int` Position indicating the start of the claim in the answer candidate, measured in bytes. Note that this is not measured in characters and, therefore, must be rendered in the user interface keeping in mind that some characters may take more than one byte. For example, if the claim text contains non-ASCII characters, the start and end positions vary when measured in characters (programming-language-dependent) and when measured in bytes (programming-language-independent). |
| `↳ end_pos` | `int` Position indicating the end of the claim in the answer candidate, exclusive, in bytes. Note that this is not measured in characters and, therefore, must be rendered as such. For example, if the claim text contains non-ASCII characters, the start and end positions vary when measured in characters (programming-language-dependent) and when measured in bytes (programming-language-independent). |
| `↳ claim_text` | `string` Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found. |
| `↳ citation_indices` | `int[]` A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance \[1,3,4\] means that cited_chunks\[1\], cited_chunks\[3\], cited_chunks\[4\] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact. |
| `↳ grounding_check_required` | `bool` Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore [citation_indices](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CheckGroundingResponse.Claim#_Google_Cloud_DiscoveryEngine_V1_CheckGroundingResponse_Claim__getCitationIndices__) should not be returned. |
| `↳ score` | `float` Confidence score for the claim in the answer candidate, in the range of \[0, 1\]. This is set only when `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true. |

### getStartPos

Position indicating the start of the claim in the answer candidate,
measured in bytes. Note that this is not measured in characters and,
therefore, must be rendered in the user interface keeping in mind that
some characters may take more than one byte. For example,
if the claim text contains non-ASCII characters, the start and end
positions vary when measured in characters
(programming-language-dependent) and when measured in bytes
(programming-language-independent).

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

### hasStartPos

### clearStartPos

### setStartPos

Position indicating the start of the claim in the answer candidate,
measured in bytes. Note that this is not measured in characters and,
therefore, must be rendered in the user interface keeping in mind that
some characters may take more than one byte. For example,
if the claim text contains non-ASCII characters, the start and end
positions vary when measured in characters
(programming-language-dependent) and when measured in bytes
(programming-language-independent).

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

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

### getEndPos

Position indicating the end of the claim in the answer candidate,
exclusive, in bytes. Note that this is not measured in characters and,
therefore, must be rendered as such. For example, if the claim text
contains non-ASCII characters, the start and end positions vary when
measured in characters (programming-language-dependent) and when measured
in bytes (programming-language-independent).

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

### hasEndPos

### clearEndPos

### setEndPos

Position indicating the end of the claim in the answer candidate,
exclusive, in bytes. Note that this is not measured in characters and,
therefore, must be rendered as such. For example, if the claim text
contains non-ASCII characters, the start and end positions vary when
measured in characters (programming-language-dependent) and when measured
in bytes (programming-language-independent).

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

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

### getClaimText

Text for the claim in the answer candidate. Always provided regardless of
whether citations or anti-citations are found.

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

### setClaimText

Text for the claim in the answer candidate. Always provided regardless of
whether citations or anti-citations are found.

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

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

### getCitationIndices

A list of indices (into 'cited_chunks') specifying the citations
associated with the claim. For instance \[1,3,4\] means that
cited_chunks\[1\], cited_chunks\[3\], cited_chunks\[4\] are the facts cited
supporting for the claim. A citation to a fact indicates that the claim
is supported by the fact.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setCitationIndices

A list of indices (into 'cited_chunks') specifying the citations
associated with the claim. For instance \[1,3,4\] means that
cited_chunks\[1\], cited_chunks\[3\], cited_chunks\[4\] are the facts cited
supporting for the claim. A citation to a fact indicates that the claim
is supported by the fact.

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

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

### getGroundingCheckRequired

Indicates that this claim required grounding check. When the system
decided this claim doesn't require attribution/grounding check, this
field will be set to false. In that case, no grounding check was done for
the claim and therefore
[citation_indices](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CheckGroundingResponse.Claim#_Google_Cloud_DiscoveryEngine_V1_CheckGroundingResponse_Claim__getCitationIndices__)
should not be returned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasGroundingCheckRequired

### clearGroundingCheckRequired

### setGroundingCheckRequired

Indicates that this claim required grounding check. When the system
decided this claim doesn't require attribution/grounding check, this
field will be set to false. In that case, no grounding check was done for
the claim and therefore
[citation_indices](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CheckGroundingResponse.Claim#_Google_Cloud_DiscoveryEngine_V1_CheckGroundingResponse_Claim__getCitationIndices__)
should not be returned.

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

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

### getScore

Confidence score for the claim in the answer candidate, in the range of
\[0, 1\]. This is set only when
`CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasScore

### clearScore

### setScore

Confidence score for the claim in the answer candidate, in the range of
\[0, 1\]. This is set only when
`CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.

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

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