class Document extends Message

##########################################################

Represents the input to API methods.

Protobuf type Google\Cloud\Language\V1beta2\Document

Properties

protected $source

Methods

__construct()

No description

int
getType()

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

setType(int $var)

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

string
getContent()

The content of the input in string format.

setContent(string $var)

The content of the input in string format.

string
getGcsContentUri()

The Google Cloud Storage URI where the file content is located.

setGcsContentUri(string $var)

The Google Cloud Storage URI where the file content is located.

string
getLanguage()

The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
Language Support lists currently supported languages for each API method.

setLanguage(string $var)

The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
Language Support lists currently supported languages for each API method.

string
getSource()

No description

Details

at line 41
__construct()

at line 53
int getType()

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1;

Return Value

int

at line 65
setType(int $var)

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1;

Parameters

int $var

at line 77
string getContent()

The content of the input in string format.

Generated from protobuf field string content = 2;

Return Value

string

at line 88
setContent(string $var)

The content of the input in string format.

Generated from protobuf field string content = 2;

Parameters

string $var

at line 103
string getGcsContentUri()

The Google Cloud Storage URI where the file content is located.

This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.

Generated from protobuf field string gcs_content_uri = 3;

Return Value

string

at line 117
setGcsContentUri(string $var)

The Google Cloud Storage URI where the file content is located.

This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.

Generated from protobuf field string gcs_content_uri = 3;

Parameters

string $var

at line 136
string getLanguage()

The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
Language Support lists currently supported languages for each API method.

If the language (either specified by the caller or automatically detected) is not supported by the called API method, an INVALID_ARGUMENT error is returned.

Generated from protobuf field string language = 4;

Return Value

string

at line 154
setLanguage(string $var)

The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
Language Support lists currently supported languages for each API method.

If the language (either specified by the caller or automatically detected) is not supported by the called API method, an INVALID_ARGUMENT error is returned.

Generated from protobuf field string language = 4;

Parameters

string $var

at line 163
string getSource()

Return Value

string