Reference documentation and code samples for the Google Cloud Document Ai V1 Client class TextAnchor.
Text reference indexing into the Document.text.
Generated from protobuf message google.cloud.documentai.v1.Document.TextAnchor
Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ text_segments |
array<Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>
The text segments from the Document.text. |
↳ content |
string
Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields. |
getTextSegments
The text segments from the Document.text.
Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setTextSegments
The text segments from the Document.text.
Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1;
| Parameter | |
|---|---|
| Name | Description |
var |
array<Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getContent
Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
Generated from protobuf field string content = 2;
| Returns | |
|---|---|
| Type | Description |
string |
|
setContent
Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
Generated from protobuf field string content = 2;
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|