Viewing file: AdaptiveMtSentence.php (7.1 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/translate/v3/adaptive_mt.proto
namespace Google\Cloud\Translate\V3;
use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil;
/** * An AdaptiveMt sentence entry. * * Generated from protobuf message <code>google.cloud.translation.v3.AdaptiveMtSentence</code> */ class AdaptiveMtSentence extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the file, in form of * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` * * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code> */ private $name = ''; /** * Required. The source sentence. * * Generated from protobuf field <code>string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED];</code> */ private $source_sentence = ''; /** * Required. The target sentence. * * Generated from protobuf field <code>string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED];</code> */ private $target_sentence = ''; /** * Output only. Timestamp when this sentence was created. * * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ private $create_time = null; /** * Output only. Timestamp when this sentence was last updated. * * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> */ private $update_time = null;
/** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $name * Required. The resource name of the file, in form of * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` * @type string $source_sentence * Required. The source sentence. * @type string $target_sentence * Required. The target sentence. * @type \Google\Protobuf\Timestamp $create_time * Output only. Timestamp when this sentence was created. * @type \Google\Protobuf\Timestamp $update_time * Output only. Timestamp when this sentence was last updated. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); parent::__construct($data); }
/** * Required. The resource name of the file, in form of * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` * * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code> * @return string */ public function getName() { return $this->name; }
/** * Required. The resource name of the file, in form of * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` * * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code> * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var;
return $this; }
/** * Required. The source sentence. * * Generated from protobuf field <code>string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @return string */ public function getSourceSentence() { return $this->source_sentence; }
/** * Required. The source sentence. * * Generated from protobuf field <code>string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED];</code> * @param string $var * @return $this */ public function setSourceSentence($var) { GPBUtil::checkString($var, True); $this->source_sentence = $var;
return $this; }
/** * Required. The target sentence. * * Generated from protobuf field <code>string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED];</code> * @return string */ public function getTargetSentence() { return $this->target_sentence; }
/** * Required. The target sentence. * * Generated from protobuf field <code>string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED];</code> * @param string $var * @return $this */ public function setTargetSentence($var) { GPBUtil::checkString($var, True); $this->target_sentence = $var;
return $this; }
/** * Output only. Timestamp when this sentence was created. * * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @return \Google\Protobuf\Timestamp|null */ public function getCreateTime() { return $this->create_time; }
public function hasCreateTime() { return isset($this->create_time); }
public function clearCreateTime() { unset($this->create_time); }
/** * Output only. Timestamp when this sentence was created. * * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setCreateTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->create_time = $var;
return $this; }
/** * Output only. Timestamp when this sentence was last updated. * * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @return \Google\Protobuf\Timestamp|null */ public function getUpdateTime() { return $this->update_time; }
public function hasUpdateTime() { return isset($this->update_time); }
public function clearUpdateTime() { unset($this->update_time); }
/** * Output only. Timestamp when this sentence was last updated. * * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setUpdateTime($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->update_time = $var;
return $this; }
}
|