Cloud Vision V1 Client - Class InputConfig (1.8.0)

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

The desired input location and metadata.

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

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ gcs_source Google\Cloud\Vision\V1\GcsSource

The Google Cloud Storage location to read the input from.

↳ content string

File content, represented as a stream of bytes. Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.

↳ mime_type string

The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.

getGcsSource

The Google Cloud Storage location to read the input from.

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

hasGcsSource

clearGcsSource

setGcsSource

The Google Cloud Storage location to read the input from.

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

getContent

File content, represented as a stream of bytes.

Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.

Returns
TypeDescription
string

setContent

File content, represented as a stream of bytes.

Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMimeType

The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.

Returns
TypeDescription
string

setMimeType

The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.

Parameter
NameDescription
var string
Returns
TypeDescription
$this