google.cloud.translation.v3.BatchTranslateResponse */ class BatchTranslateResponse extends \Google\Protobuf\Internal\Message { /** * Total number of characters (Unicode codepoints). * * Generated from protobuf field int64 total_characters = 1; */ private $total_characters = 0; /** * Number of successfully translated characters (Unicode codepoints). * * Generated from protobuf field int64 translated_characters = 2; */ private $translated_characters = 0; /** * Number of characters that have failed to process (Unicode codepoints). * * Generated from protobuf field int64 failed_characters = 3; */ private $failed_characters = 0; /** * Time when the operation was submitted. * * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; */ private $submit_time = null; /** * The time when the operation is finished and * [google.longrunning.Operation.done][google.longrunning.Operation.done] is * set to true. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; */ private $end_time = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int|string $total_characters * Total number of characters (Unicode codepoints). * @type int|string $translated_characters * Number of successfully translated characters (Unicode codepoints). * @type int|string $failed_characters * Number of characters that have failed to process (Unicode codepoints). * @type \Google\Protobuf\Timestamp $submit_time * Time when the operation was submitted. * @type \Google\Protobuf\Timestamp $end_time * The time when the operation is finished and * [google.longrunning.Operation.done][google.longrunning.Operation.done] is * set to true. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); parent::__construct($data); } /** * Total number of characters (Unicode codepoints). * * Generated from protobuf field int64 total_characters = 1; * @return int|string */ public function getTotalCharacters() { return $this->total_characters; } /** * Total number of characters (Unicode codepoints). * * Generated from protobuf field int64 total_characters = 1; * @param int|string $var * @return $this */ public function setTotalCharacters($var) { GPBUtil::checkInt64($var); $this->total_characters = $var; return $this; } /** * Number of successfully translated characters (Unicode codepoints). * * Generated from protobuf field int64 translated_characters = 2; * @return int|string */ public function getTranslatedCharacters() { return $this->translated_characters; } /** * Number of successfully translated characters (Unicode codepoints). * * Generated from protobuf field int64 translated_characters = 2; * @param int|string $var * @return $this */ public function setTranslatedCharacters($var) { GPBUtil::checkInt64($var); $this->translated_characters = $var; return $this; } /** * Number of characters that have failed to process (Unicode codepoints). * * Generated from protobuf field int64 failed_characters = 3; * @return int|string */ public function getFailedCharacters() { return $this->failed_characters; } /** * Number of characters that have failed to process (Unicode codepoints). * * Generated from protobuf field int64 failed_characters = 3; * @param int|string $var * @return $this */ public function setFailedCharacters($var) { GPBUtil::checkInt64($var); $this->failed_characters = $var; return $this; } /** * Time when the operation was submitted. * * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; * @return \Google\Protobuf\Timestamp */ public function getSubmitTime() { return isset($this->submit_time) ? $this->submit_time : null; } public function hasSubmitTime() { return isset($this->submit_time); } public function clearSubmitTime() { unset($this->submit_time); } /** * Time when the operation was submitted. * * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setSubmitTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->submit_time = $var; return $this; } /** * The time when the operation is finished and * [google.longrunning.Operation.done][google.longrunning.Operation.done] is * set to true. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; * @return \Google\Protobuf\Timestamp */ public function getEndTime() { return isset($this->end_time) ? $this->end_time : null; } public function hasEndTime() { return isset($this->end_time); } public function clearEndTime() { unset($this->end_time); } /** * The time when the operation is finished and * [google.longrunning.Operation.done][google.longrunning.Operation.done] is * set to true. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setEndTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->end_time = $var; return $this; } }