123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_operation.proto
- namespace Ydb\Operations;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Operations.Operation</code>
- */
- class Operation extends \Google\Protobuf\Internal\Message
- {
- /**
- * Identifier of the operation, empty value means no active operation object is present (it was forgotten or
- * not created in the first place, as in SYNC operation mode).
- *
- * Generated from protobuf field <code>string id = 1;</code>
- */
- protected $id = '';
- /**
- * true - this operation has beed finished (doesn't matter successful or not),
- * so Status field has status code, and Result field can contains result data.
- * false - this operation still running. You can repeat request using operation Id.
- *
- * Generated from protobuf field <code>bool ready = 2;</code>
- */
- protected $ready = false;
- /**
- * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 3;</code>
- */
- protected $status = 0;
- /**
- * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 4;</code>
- */
- private $issues;
- /**
- * Result data
- *
- * Generated from protobuf field <code>.google.protobuf.Any result = 5;</code>
- */
- protected $result = null;
- /**
- * Generated from protobuf field <code>.google.protobuf.Any metadata = 6;</code>
- */
- protected $metadata = null;
- /**
- * Contains information about the cost of the operation.
- * For completed operations, it shows the final cost of the operation.
- * For operations in progress, it might indicate the current cost of the operation (if supported).
- *
- * Generated from protobuf field <code>.Ydb.CostInfo cost_info = 7;</code>
- */
- protected $cost_info = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $id
- * Identifier of the operation, empty value means no active operation object is present (it was forgotten or
- * not created in the first place, as in SYNC operation mode).
- * @type bool $ready
- * true - this operation has beed finished (doesn't matter successful or not),
- * so Status field has status code, and Result field can contains result data.
- * false - this operation still running. You can repeat request using operation Id.
- * @type int $status
- * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues
- * @type \Google\Protobuf\Any $result
- * Result data
- * @type \Google\Protobuf\Any $metadata
- * @type \Ydb\CostInfo $cost_info
- * Contains information about the cost of the operation.
- * For completed operations, it shows the final cost of the operation.
- * For operations in progress, it might indicate the current cost of the operation (if supported).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbOperation::initOnce();
- parent::__construct($data);
- }
- /**
- * Identifier of the operation, empty value means no active operation object is present (it was forgotten or
- * not created in the first place, as in SYNC operation mode).
- *
- * Generated from protobuf field <code>string id = 1;</code>
- * @return string
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Identifier of the operation, empty value means no active operation object is present (it was forgotten or
- * not created in the first place, as in SYNC operation mode).
- *
- * Generated from protobuf field <code>string id = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setId($var)
- {
- GPBUtil::checkString($var, True);
- $this->id = $var;
- return $this;
- }
- /**
- * true - this operation has beed finished (doesn't matter successful or not),
- * so Status field has status code, and Result field can contains result data.
- * false - this operation still running. You can repeat request using operation Id.
- *
- * Generated from protobuf field <code>bool ready = 2;</code>
- * @return bool
- */
- public function getReady()
- {
- return $this->ready;
- }
- /**
- * true - this operation has beed finished (doesn't matter successful or not),
- * so Status field has status code, and Result field can contains result data.
- * false - this operation still running. You can repeat request using operation Id.
- *
- * Generated from protobuf field <code>bool ready = 2;</code>
- * @param bool $var
- * @return $this
- */
- public function setReady($var)
- {
- GPBUtil::checkBool($var);
- $this->ready = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 3;</code>
- * @return int
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 3;</code>
- * @param int $var
- * @return $this
- */
- public function setStatus($var)
- {
- GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class);
- $this->status = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 4;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getIssues()
- {
- return $this->issues;
- }
- /**
- * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 4;</code>
- * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setIssues($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class);
- $this->issues = $arr;
- return $this;
- }
- /**
- * Result data
- *
- * Generated from protobuf field <code>.google.protobuf.Any result = 5;</code>
- * @return \Google\Protobuf\Any|null
- */
- public function getResult()
- {
- return $this->result;
- }
- public function hasResult()
- {
- return isset($this->result);
- }
- public function clearResult()
- {
- unset($this->result);
- }
- /**
- * Result data
- *
- * Generated from protobuf field <code>.google.protobuf.Any result = 5;</code>
- * @param \Google\Protobuf\Any $var
- * @return $this
- */
- public function setResult($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
- $this->result = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.Any metadata = 6;</code>
- * @return \Google\Protobuf\Any|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
- public function clearMetadata()
- {
- unset($this->metadata);
- }
- /**
- * Generated from protobuf field <code>.google.protobuf.Any metadata = 6;</code>
- * @param \Google\Protobuf\Any $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
- $this->metadata = $var;
- return $this;
- }
- /**
- * Contains information about the cost of the operation.
- * For completed operations, it shows the final cost of the operation.
- * For operations in progress, it might indicate the current cost of the operation (if supported).
- *
- * Generated from protobuf field <code>.Ydb.CostInfo cost_info = 7;</code>
- * @return \Ydb\CostInfo|null
- */
- public function getCostInfo()
- {
- return $this->cost_info;
- }
- public function hasCostInfo()
- {
- return isset($this->cost_info);
- }
- public function clearCostInfo()
- {
- unset($this->cost_info);
- }
- /**
- * Contains information about the cost of the operation.
- * For completed operations, it shows the final cost of the operation.
- * For operations in progress, it might indicate the current cost of the operation (if supported).
- *
- * Generated from protobuf field <code>.Ydb.CostInfo cost_info = 7;</code>
- * @param \Ydb\CostInfo $var
- * @return $this
- */
- public function setCostInfo($var)
- {
- GPBUtil::checkMessage($var, \Ydb\CostInfo::class);
- $this->cost_info = $var;
- return $this;
- }
- }
|