ExecuteYqlPartialResponse.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_scripting.proto
  4. namespace Ydb\Scripting;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Response for StreamExecuteYql is a stream of ExecuteYqlPartialResponse messages.
  10. * These responses can contain ExecuteYqlPartialResult messages with
  11. * results (or result parts) for data or scan queries in the script.
  12. * YqlScript can have multiple results (result sets).
  13. * Each result set has an index (starting at 0).
  14. *
  15. * Generated from protobuf message <code>Ydb.Scripting.ExecuteYqlPartialResponse</code>
  16. */
  17. class ExecuteYqlPartialResponse extends \Google\Protobuf\Internal\Message
  18. {
  19. /**
  20. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  21. */
  22. protected $status = 0;
  23. /**
  24. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  25. */
  26. private $issues;
  27. /**
  28. * Generated from protobuf field <code>.Ydb.Scripting.ExecuteYqlPartialResult result = 3;</code>
  29. */
  30. protected $result = null;
  31. /**
  32. * Constructor.
  33. *
  34. * @param array $data {
  35. * Optional. Data for populating the Message object.
  36. *
  37. * @type int $status
  38. * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues
  39. * @type \Ydb\Scripting\ExecuteYqlPartialResult $result
  40. * }
  41. */
  42. public function __construct($data = NULL) {
  43. \GPBMetadata\Protos\YdbScripting::initOnce();
  44. parent::__construct($data);
  45. }
  46. /**
  47. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  48. * @return int
  49. */
  50. public function getStatus()
  51. {
  52. return $this->status;
  53. }
  54. /**
  55. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  56. * @param int $var
  57. * @return $this
  58. */
  59. public function setStatus($var)
  60. {
  61. GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class);
  62. $this->status = $var;
  63. return $this;
  64. }
  65. /**
  66. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  67. * @return \Google\Protobuf\Internal\RepeatedField
  68. */
  69. public function getIssues()
  70. {
  71. return $this->issues;
  72. }
  73. /**
  74. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  75. * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var
  76. * @return $this
  77. */
  78. public function setIssues($var)
  79. {
  80. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class);
  81. $this->issues = $arr;
  82. return $this;
  83. }
  84. /**
  85. * Generated from protobuf field <code>.Ydb.Scripting.ExecuteYqlPartialResult result = 3;</code>
  86. * @return \Ydb\Scripting\ExecuteYqlPartialResult|null
  87. */
  88. public function getResult()
  89. {
  90. return $this->result;
  91. }
  92. public function hasResult()
  93. {
  94. return isset($this->result);
  95. }
  96. public function clearResult()
  97. {
  98. unset($this->result);
  99. }
  100. /**
  101. * Generated from protobuf field <code>.Ydb.Scripting.ExecuteYqlPartialResult result = 3;</code>
  102. * @param \Ydb\Scripting\ExecuteYqlPartialResult $var
  103. * @return $this
  104. */
  105. public function setResult($var)
  106. {
  107. GPBUtil::checkMessage($var, \Ydb\Scripting\ExecuteYqlPartialResult::class);
  108. $this->result = $var;
  109. return $this;
  110. }
  111. }