BulkUpsertRequest.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_table.proto
  4. namespace Ydb\Table;
  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.Table.BulkUpsertRequest</code>
  10. */
  11. class BulkUpsertRequest extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Generated from protobuf field <code>string table = 1;</code>
  15. */
  16. protected $table = '';
  17. /**
  18. * "rows" parameter must be a list of structs where each stuct represents one row.
  19. * It must contain all key columns but not necessarily all non-key columns.
  20. * Similar to UPSERT statement only values of specified columns will be updated.
  21. *
  22. * Generated from protobuf field <code>.Ydb.TypedValue rows = 2;</code>
  23. */
  24. protected $rows = null;
  25. /**
  26. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  27. */
  28. protected $operation_params = null;
  29. /**
  30. * It's last in the definition to help with sidecar patterns
  31. *
  32. * Generated from protobuf field <code>bytes data = 1000;</code>
  33. */
  34. protected $data = '';
  35. protected $data_format;
  36. /**
  37. * Constructor.
  38. *
  39. * @param array $data {
  40. * Optional. Data for populating the Message object.
  41. *
  42. * @type string $table
  43. * @type \Ydb\TypedValue $rows
  44. * "rows" parameter must be a list of structs where each stuct represents one row.
  45. * It must contain all key columns but not necessarily all non-key columns.
  46. * Similar to UPSERT statement only values of specified columns will be updated.
  47. * @type \Ydb\Operations\OperationParams $operation_params
  48. * @type \Ydb\Formats\ArrowBatchSettings $arrow_batch_settings
  49. * @type \Ydb\Formats\CsvSettings $csv_settings
  50. * @type string $data
  51. * It's last in the definition to help with sidecar patterns
  52. * }
  53. */
  54. public function __construct($data = NULL) {
  55. \GPBMetadata\Protos\YdbTable::initOnce();
  56. parent::__construct($data);
  57. }
  58. /**
  59. * Generated from protobuf field <code>string table = 1;</code>
  60. * @return string
  61. */
  62. public function getTable()
  63. {
  64. return $this->table;
  65. }
  66. /**
  67. * Generated from protobuf field <code>string table = 1;</code>
  68. * @param string $var
  69. * @return $this
  70. */
  71. public function setTable($var)
  72. {
  73. GPBUtil::checkString($var, True);
  74. $this->table = $var;
  75. return $this;
  76. }
  77. /**
  78. * "rows" parameter must be a list of structs where each stuct represents one row.
  79. * It must contain all key columns but not necessarily all non-key columns.
  80. * Similar to UPSERT statement only values of specified columns will be updated.
  81. *
  82. * Generated from protobuf field <code>.Ydb.TypedValue rows = 2;</code>
  83. * @return \Ydb\TypedValue|null
  84. */
  85. public function getRows()
  86. {
  87. return $this->rows;
  88. }
  89. public function hasRows()
  90. {
  91. return isset($this->rows);
  92. }
  93. public function clearRows()
  94. {
  95. unset($this->rows);
  96. }
  97. /**
  98. * "rows" parameter must be a list of structs where each stuct represents one row.
  99. * It must contain all key columns but not necessarily all non-key columns.
  100. * Similar to UPSERT statement only values of specified columns will be updated.
  101. *
  102. * Generated from protobuf field <code>.Ydb.TypedValue rows = 2;</code>
  103. * @param \Ydb\TypedValue $var
  104. * @return $this
  105. */
  106. public function setRows($var)
  107. {
  108. GPBUtil::checkMessage($var, \Ydb\TypedValue::class);
  109. $this->rows = $var;
  110. return $this;
  111. }
  112. /**
  113. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  114. * @return \Ydb\Operations\OperationParams|null
  115. */
  116. public function getOperationParams()
  117. {
  118. return $this->operation_params;
  119. }
  120. public function hasOperationParams()
  121. {
  122. return isset($this->operation_params);
  123. }
  124. public function clearOperationParams()
  125. {
  126. unset($this->operation_params);
  127. }
  128. /**
  129. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  130. * @param \Ydb\Operations\OperationParams $var
  131. * @return $this
  132. */
  133. public function setOperationParams($var)
  134. {
  135. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  136. $this->operation_params = $var;
  137. return $this;
  138. }
  139. /**
  140. * Generated from protobuf field <code>.Ydb.Formats.ArrowBatchSettings arrow_batch_settings = 7;</code>
  141. * @return \Ydb\Formats\ArrowBatchSettings|null
  142. */
  143. public function getArrowBatchSettings()
  144. {
  145. return $this->readOneof(7);
  146. }
  147. public function hasArrowBatchSettings()
  148. {
  149. return $this->hasOneof(7);
  150. }
  151. /**
  152. * Generated from protobuf field <code>.Ydb.Formats.ArrowBatchSettings arrow_batch_settings = 7;</code>
  153. * @param \Ydb\Formats\ArrowBatchSettings $var
  154. * @return $this
  155. */
  156. public function setArrowBatchSettings($var)
  157. {
  158. GPBUtil::checkMessage($var, \Ydb\Formats\ArrowBatchSettings::class);
  159. $this->writeOneof(7, $var);
  160. return $this;
  161. }
  162. /**
  163. * Generated from protobuf field <code>.Ydb.Formats.CsvSettings csv_settings = 8;</code>
  164. * @return \Ydb\Formats\CsvSettings|null
  165. */
  166. public function getCsvSettings()
  167. {
  168. return $this->readOneof(8);
  169. }
  170. public function hasCsvSettings()
  171. {
  172. return $this->hasOneof(8);
  173. }
  174. /**
  175. * Generated from protobuf field <code>.Ydb.Formats.CsvSettings csv_settings = 8;</code>
  176. * @param \Ydb\Formats\CsvSettings $var
  177. * @return $this
  178. */
  179. public function setCsvSettings($var)
  180. {
  181. GPBUtil::checkMessage($var, \Ydb\Formats\CsvSettings::class);
  182. $this->writeOneof(8, $var);
  183. return $this;
  184. }
  185. /**
  186. * It's last in the definition to help with sidecar patterns
  187. *
  188. * Generated from protobuf field <code>bytes data = 1000;</code>
  189. * @return string
  190. */
  191. public function getData()
  192. {
  193. return $this->data;
  194. }
  195. /**
  196. * It's last in the definition to help with sidecar patterns
  197. *
  198. * Generated from protobuf field <code>bytes data = 1000;</code>
  199. * @param string $var
  200. * @return $this
  201. */
  202. public function setData($var)
  203. {
  204. GPBUtil::checkString($var, False);
  205. $this->data = $var;
  206. return $this;
  207. }
  208. /**
  209. * @return string
  210. */
  211. public function getDataFormat()
  212. {
  213. return $this->whichOneof("data_format");
  214. }
  215. }