OperationParams.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_operation.proto
  4. namespace Ydb\Operations;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.Operations.OperationParams</code>
  10. */
  11. class OperationParams extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
  15. */
  16. protected $operation_mode = 0;
  17. /**
  18. * Indicates that client is no longer interested in the result of operation after the specified duration
  19. * starting from the time operation arrives at the server.
  20. * Server will try to stop the execution of operation and if no result is currently available the operation
  21. * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
  22. * Timeout of operation does not tell anything about its result, it might be completed successfully
  23. * or cancelled on server.
  24. *
  25. * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
  26. */
  27. protected $operation_timeout = null;
  28. /**
  29. * Server will try to cancel the operation after the specified duration starting from the time
  30. * the operation arrives at server.
  31. * In case of successful cancellation operation will receive CANCELLED status code, which will be
  32. * sent back to client if it was waiting for the operation result.
  33. * In case when cancellation isn't possible, no action will be performed.
  34. *
  35. * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
  36. */
  37. protected $cancel_after = null;
  38. /**
  39. * User-defined labels of operation.
  40. *
  41. * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
  42. */
  43. private $labels;
  44. /**
  45. * If enabled, server will report cost information, if supported by the operation.
  46. * This flag is mostly useful for SYNC operations, to get the cost information in the response.
  47. *
  48. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
  49. */
  50. protected $report_cost_info = 0;
  51. /**
  52. * Constructor.
  53. *
  54. * @param array $data {
  55. * Optional. Data for populating the Message object.
  56. *
  57. * @type int $operation_mode
  58. * @type \Google\Protobuf\Duration $operation_timeout
  59. * Indicates that client is no longer interested in the result of operation after the specified duration
  60. * starting from the time operation arrives at the server.
  61. * Server will try to stop the execution of operation and if no result is currently available the operation
  62. * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
  63. * Timeout of operation does not tell anything about its result, it might be completed successfully
  64. * or cancelled on server.
  65. * @type \Google\Protobuf\Duration $cancel_after
  66. * Server will try to cancel the operation after the specified duration starting from the time
  67. * the operation arrives at server.
  68. * In case of successful cancellation operation will receive CANCELLED status code, which will be
  69. * sent back to client if it was waiting for the operation result.
  70. * In case when cancellation isn't possible, no action will be performed.
  71. * @type array|\Google\Protobuf\Internal\MapField $labels
  72. * User-defined labels of operation.
  73. * @type int $report_cost_info
  74. * If enabled, server will report cost information, if supported by the operation.
  75. * This flag is mostly useful for SYNC operations, to get the cost information in the response.
  76. * }
  77. */
  78. public function __construct($data = NULL) {
  79. \GPBMetadata\Protos\YdbOperation::initOnce();
  80. parent::__construct($data);
  81. }
  82. /**
  83. * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
  84. * @return int
  85. */
  86. public function getOperationMode()
  87. {
  88. return $this->operation_mode;
  89. }
  90. /**
  91. * Generated from protobuf field <code>.Ydb.Operations.OperationParams.OperationMode operation_mode = 1;</code>
  92. * @param int $var
  93. * @return $this
  94. */
  95. public function setOperationMode($var)
  96. {
  97. GPBUtil::checkEnum($var, \Ydb\Operations\OperationParams\OperationMode::class);
  98. $this->operation_mode = $var;
  99. return $this;
  100. }
  101. /**
  102. * Indicates that client is no longer interested in the result of operation after the specified duration
  103. * starting from the time operation arrives at the server.
  104. * Server will try to stop the execution of operation and if no result is currently available the operation
  105. * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
  106. * Timeout of operation does not tell anything about its result, it might be completed successfully
  107. * or cancelled on server.
  108. *
  109. * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
  110. * @return \Google\Protobuf\Duration|null
  111. */
  112. public function getOperationTimeout()
  113. {
  114. return $this->operation_timeout;
  115. }
  116. public function hasOperationTimeout()
  117. {
  118. return isset($this->operation_timeout);
  119. }
  120. public function clearOperationTimeout()
  121. {
  122. unset($this->operation_timeout);
  123. }
  124. /**
  125. * Indicates that client is no longer interested in the result of operation after the specified duration
  126. * starting from the time operation arrives at the server.
  127. * Server will try to stop the execution of operation and if no result is currently available the operation
  128. * will receive TIMEOUT status code, which will be sent back to client if it was waiting for the operation result.
  129. * Timeout of operation does not tell anything about its result, it might be completed successfully
  130. * or cancelled on server.
  131. *
  132. * Generated from protobuf field <code>.google.protobuf.Duration operation_timeout = 2;</code>
  133. * @param \Google\Protobuf\Duration $var
  134. * @return $this
  135. */
  136. public function setOperationTimeout($var)
  137. {
  138. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  139. $this->operation_timeout = $var;
  140. return $this;
  141. }
  142. /**
  143. * Server will try to cancel the operation after the specified duration starting from the time
  144. * the operation arrives at server.
  145. * In case of successful cancellation operation will receive CANCELLED status code, which will be
  146. * sent back to client if it was waiting for the operation result.
  147. * In case when cancellation isn't possible, no action will be performed.
  148. *
  149. * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
  150. * @return \Google\Protobuf\Duration|null
  151. */
  152. public function getCancelAfter()
  153. {
  154. return $this->cancel_after;
  155. }
  156. public function hasCancelAfter()
  157. {
  158. return isset($this->cancel_after);
  159. }
  160. public function clearCancelAfter()
  161. {
  162. unset($this->cancel_after);
  163. }
  164. /**
  165. * Server will try to cancel the operation after the specified duration starting from the time
  166. * the operation arrives at server.
  167. * In case of successful cancellation operation will receive CANCELLED status code, which will be
  168. * sent back to client if it was waiting for the operation result.
  169. * In case when cancellation isn't possible, no action will be performed.
  170. *
  171. * Generated from protobuf field <code>.google.protobuf.Duration cancel_after = 3;</code>
  172. * @param \Google\Protobuf\Duration $var
  173. * @return $this
  174. */
  175. public function setCancelAfter($var)
  176. {
  177. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  178. $this->cancel_after = $var;
  179. return $this;
  180. }
  181. /**
  182. * User-defined labels of operation.
  183. *
  184. * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
  185. * @return \Google\Protobuf\Internal\MapField
  186. */
  187. public function getLabels()
  188. {
  189. return $this->labels;
  190. }
  191. /**
  192. * User-defined labels of operation.
  193. *
  194. * Generated from protobuf field <code>map<string, string> labels = 4 [(.Ydb.length) = {</code>
  195. * @param array|\Google\Protobuf\Internal\MapField $var
  196. * @return $this
  197. */
  198. public function setLabels($var)
  199. {
  200. $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
  201. $this->labels = $arr;
  202. return $this;
  203. }
  204. /**
  205. * If enabled, server will report cost information, if supported by the operation.
  206. * This flag is mostly useful for SYNC operations, to get the cost information in the response.
  207. *
  208. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
  209. * @return int
  210. */
  211. public function getReportCostInfo()
  212. {
  213. return $this->report_cost_info;
  214. }
  215. /**
  216. * If enabled, server will report cost information, if supported by the operation.
  217. * This flag is mostly useful for SYNC operations, to get the cost information in the response.
  218. *
  219. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status report_cost_info = 5;</code>
  220. * @param int $var
  221. * @return $this
  222. */
  223. public function setReportCostInfo($var)
  224. {
  225. GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
  226. $this->report_cost_info = $var;
  227. return $this;
  228. }
  229. }