Cloud AutoML V1 Client - Class Document (2.0.1)

Reference documentation and code samples for the Cloud AutoML V1 Client class Document.

A structured text document e.g. a PDF.

Generated from protobuf message google.cloud.automl.v1.Document

Namespace

Google \ Cloud \ AutoMl \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ input_config DocumentInputConfig

An input config specifying the content of the document.

↳ document_text TextSnippet

The plain text version of this document.

↳ layout array<Document\Layout>

Describes the layout of the document. Sorted by page_number.

↳ document_dimensions DocumentDimensions

The dimensions of the page in the document.

↳ page_count int

Number of pages in the document.

getInputConfig

An input config specifying the content of the document.

Returns
Type Description
DocumentInputConfig|null

hasInputConfig

clearInputConfig

setInputConfig

An input config specifying the content of the document.

Parameter
Name Description
var DocumentInputConfig
Returns
Type Description
$this

getDocumentText

The plain text version of this document.

Returns
Type Description
TextSnippet|null

hasDocumentText

clearDocumentText

setDocumentText

The plain text version of this document.

Parameter
Name Description
var TextSnippet
Returns
Type Description
$this

getLayout

Describes the layout of the document.

Sorted by page_number.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLayout

Describes the layout of the document.

Sorted by page_number.

Parameter
Name Description
var array<Document\Layout>
Returns
Type Description
$this

getDocumentDimensions

The dimensions of the page in the document.

Returns
Type Description
DocumentDimensions|null

hasDocumentDimensions

clearDocumentDimensions

setDocumentDimensions

The dimensions of the page in the document.

Parameter
Name Description
var DocumentDimensions
Returns
Type Description
$this

getPageCount

Number of pages in the document.

Returns
Type Description
int

setPageCount

Number of pages in the document.

Parameter
Name Description
var int
Returns
Type Description
$this