123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <?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.OperationParams</code>
- */
- class OperationParams extends \Google\Protobuf\Internal\Message
- {
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
- */
- protected $operation_mode = 0;
- /**
- * Indicates that client is no longer interested in the result of operation after the specified duration
- * starting from the time operation arrives at the server.
- * Server will try to stop the execution of operation and if no result is currently available the operation
- * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
- * Timeout of operation does not tell anything about its result, it might be completed successfully
- * or cancelled on server.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
- */
- protected $operation_timeout = null;
- /**
- * Server will try to cancel the operation after the specified duration starting from the time
- * the operation arrives at server.
- * In case of successful cancellation operation will receive CANCELLED status code, which will be
- * sent back to client if it was waiting for the operation result.
- * In case when cancellation isn't possible, no action will be performed.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
- */
- protected $cancel_after = null;
- /**
- * User-defined labels of operation.
- *
- * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
- */
- private $labels;
- /**
- * If enabled, server will report cost information, if supported by the operation.
- * This flag is mostly useful for SYNC operations, to get the cost information in the response.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
- */
- protected $report_cost_info = 0;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $operation_mode
- * @type \Google\Protobuf\Duration $operation_timeout
- * Indicates that client is no longer interested in the result of operation after the specified duration
- * starting from the time operation arrives at the server.
- * Server will try to stop the execution of operation and if no result is currently available the operation
- * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
- * Timeout of operation does not tell anything about its result, it might be completed successfully
- * or cancelled on server.
- * @type \Google\Protobuf\Duration $cancel_after
- * Server will try to cancel the operation after the specified duration starting from the time
- * the operation arrives at server.
- * In case of successful cancellation operation will receive CANCELLED status code, which will be
- * sent back to client if it was waiting for the operation result.
- * In case when cancellation isn't possible, no action will be performed.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * User-defined labels of operation.
- * @type int $report_cost_info
- * If enabled, server will report cost information, if supported by the operation.
- * This flag is mostly useful for SYNC operations, to get the cost information in the response.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbOperation::initOnce();
- parent::__construct($data);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
- * @return int
- */
- public function getOperationMode()
- {
- return $this->operation_mode;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
- * @param int $var
- * @return $this
- */
- public function setOperationMode($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Operations\OperationParams\OperationMode::class);
- $this->operation_mode = $var;
- return $this;
- }
- /**
- * Indicates that client is no longer interested in the result of operation after the specified duration
- * starting from the time operation arrives at the server.
- * Server will try to stop the execution of operation and if no result is currently available the operation
- * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
- * Timeout of operation does not tell anything about its result, it might be completed successfully
- * or cancelled on server.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
- * @return \Google\Protobuf\Duration|null
- */
- public function getOperationTimeout()
- {
- return $this->operation_timeout;
- }
- public function hasOperationTimeout()
- {
- return isset($this->operation_timeout);
- }
- public function clearOperationTimeout()
- {
- unset($this->operation_timeout);
- }
- /**
- * Indicates that client is no longer interested in the result of operation after the specified duration
- * starting from the time operation arrives at the server.
- * Server will try to stop the execution of operation and if no result is currently available the operation
- * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
- * Timeout of operation does not tell anything about its result, it might be completed successfully
- * or cancelled on server.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setOperationTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->operation_timeout = $var;
- return $this;
- }
- /**
- * Server will try to cancel the operation after the specified duration starting from the time
- * the operation arrives at server.
- * In case of successful cancellation operation will receive CANCELLED status code, which will be
- * sent back to client if it was waiting for the operation result.
- * In case when cancellation isn't possible, no action will be performed.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
- * @return \Google\Protobuf\Duration|null
- */
- public function getCancelAfter()
- {
- return $this->cancel_after;
- }
- public function hasCancelAfter()
- {
- return isset($this->cancel_after);
- }
- public function clearCancelAfter()
- {
- unset($this->cancel_after);
- }
- /**
- * Server will try to cancel the operation after the specified duration starting from the time
- * the operation arrives at server.
- * In case of successful cancellation operation will receive CANCELLED status code, which will be
- * sent back to client if it was waiting for the operation result.
- * In case when cancellation isn't possible, no action will be performed.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setCancelAfter($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->cancel_after = $var;
- return $this;
- }
- /**
- * User-defined labels of operation.
- *
- * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
- /**
- * User-defined labels of operation.
- *
- * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
- return $this;
- }
- /**
- * If enabled, server will report cost information, if supported by the operation.
- * This flag is mostly useful for SYNC operations, to get the cost information in the response.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
- * @return int
- */
- public function getReportCostInfo()
- {
- return $this->report_cost_info;
- }
- /**
- * If enabled, server will report cost information, if supported by the operation.
- * This flag is mostly useful for SYNC operations, to get the cost information in the response.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
- * @param int $var
- * @return $this
- */
- public function setReportCostInfo($var)
- {
- GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
- $this->report_cost_info = $var;
- return $this;
- }
- }
|