Cloud Vision V1 Client - Class AnnotateFileResponse (1.6.8)

Reference documentation and code samples for the Cloud Vision V1 Client class AnnotateFileResponse.

Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.

Generated from protobuf message google.cloud.vision.v1.AnnotateFileResponse

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ input_config Google\Cloud\Vision\V1\InputConfig

Information about the file for which this response is generated.

↳ responses array<Google\Cloud\Vision\V1\AnnotateImageResponse>

Individual responses to images found within the file. This field will be empty if the error field is set.

↳ total_pages int

This field gives the total number of pages in the file.

↳ error Google\Rpc\Status

If set, represents the error message for the failed request. The responses field will not be set in this case.

getInputConfig

Information about the file for which this response is generated.

Returns
TypeDescription
Google\Cloud\Vision\V1\InputConfig|null

hasInputConfig

clearInputConfig

setInputConfig

Information about the file for which this response is generated.

Parameter
NameDescription
var Google\Cloud\Vision\V1\InputConfig
Returns
TypeDescription
$this

getResponses

Individual responses to images found within the file. This field will be empty if the error field is set.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setResponses

Individual responses to images found within the file. This field will be empty if the error field is set.

Parameter
NameDescription
var array<Google\Cloud\Vision\V1\AnnotateImageResponse>
Returns
TypeDescription
$this

getTotalPages

This field gives the total number of pages in the file.

Returns
TypeDescription
int

setTotalPages

This field gives the total number of pages in the file.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getError

If set, represents the error message for the failed request. The responses field will not be set in this case.

Returns
TypeDescription
Google\Rpc\Status|null

hasError

clearError

setError

If set, represents the error message for the failed request. The responses field will not be set in this case.

Parameter
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this