ImportDataRequest.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_import.proto
  4. namespace Ydb\Import;
  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.Import.ImportDataRequest</code>
  10. */
  11. class ImportDataRequest extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  15. */
  16. protected $operation_params = null;
  17. /**
  18. * Full path to table
  19. *
  20. * Generated from protobuf field <code>string path = 2;</code>
  21. */
  22. protected $path = '';
  23. /**
  24. * Data serialized in the selected format. Restrictions:
  25. * - sorted by primary key;
  26. * - all keys must be from the same partition;
  27. * - table has no global secondary indexes;
  28. * - size of serialized data is limited to 8 MB.
  29. *
  30. * Generated from protobuf field <code>bytes data = 3 [(.Ydb.length) = {</code>
  31. */
  32. protected $data = '';
  33. protected $format;
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type \Ydb\Operations\OperationParams $operation_params
  41. * @type string $path
  42. * Full path to table
  43. * @type string $data
  44. * Data serialized in the selected format. Restrictions:
  45. * - sorted by primary key;
  46. * - all keys must be from the same partition;
  47. * - table has no global secondary indexes;
  48. * - size of serialized data is limited to 8 MB.
  49. * @type \Ydb\Import\YdbDumpFormat $ydb_dump
  50. * Result of `ydb tools dump`
  51. * }
  52. */
  53. public function __construct($data = NULL) {
  54. \GPBMetadata\Protos\YdbImport::initOnce();
  55. parent::__construct($data);
  56. }
  57. /**
  58. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  59. * @return \Ydb\Operations\OperationParams|null
  60. */
  61. public function getOperationParams()
  62. {
  63. return $this->operation_params;
  64. }
  65. public function hasOperationParams()
  66. {
  67. return isset($this->operation_params);
  68. }
  69. public function clearOperationParams()
  70. {
  71. unset($this->operation_params);
  72. }
  73. /**
  74. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  75. * @param \Ydb\Operations\OperationParams $var
  76. * @return $this
  77. */
  78. public function setOperationParams($var)
  79. {
  80. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  81. $this->operation_params = $var;
  82. return $this;
  83. }
  84. /**
  85. * Full path to table
  86. *
  87. * Generated from protobuf field <code>string path = 2;</code>
  88. * @return string
  89. */
  90. public function getPath()
  91. {
  92. return $this->path;
  93. }
  94. /**
  95. * Full path to table
  96. *
  97. * Generated from protobuf field <code>string path = 2;</code>
  98. * @param string $var
  99. * @return $this
  100. */
  101. public function setPath($var)
  102. {
  103. GPBUtil::checkString($var, True);
  104. $this->path = $var;
  105. return $this;
  106. }
  107. /**
  108. * Data serialized in the selected format. Restrictions:
  109. * - sorted by primary key;
  110. * - all keys must be from the same partition;
  111. * - table has no global secondary indexes;
  112. * - size of serialized data is limited to 8 MB.
  113. *
  114. * Generated from protobuf field <code>bytes data = 3 [(.Ydb.length) = {</code>
  115. * @return string
  116. */
  117. public function getData()
  118. {
  119. return $this->data;
  120. }
  121. /**
  122. * Data serialized in the selected format. Restrictions:
  123. * - sorted by primary key;
  124. * - all keys must be from the same partition;
  125. * - table has no global secondary indexes;
  126. * - size of serialized data is limited to 8 MB.
  127. *
  128. * Generated from protobuf field <code>bytes data = 3 [(.Ydb.length) = {</code>
  129. * @param string $var
  130. * @return $this
  131. */
  132. public function setData($var)
  133. {
  134. GPBUtil::checkString($var, False);
  135. $this->data = $var;
  136. return $this;
  137. }
  138. /**
  139. * Result of `ydb tools dump`
  140. *
  141. * Generated from protobuf field <code>.Ydb.Import.YdbDumpFormat ydb_dump = 4;</code>
  142. * @return \Ydb\Import\YdbDumpFormat|null
  143. */
  144. public function getYdbDump()
  145. {
  146. return $this->readOneof(4);
  147. }
  148. public function hasYdbDump()
  149. {
  150. return $this->hasOneof(4);
  151. }
  152. /**
  153. * Result of `ydb tools dump`
  154. *
  155. * Generated from protobuf field <code>.Ydb.Import.YdbDumpFormat ydb_dump = 4;</code>
  156. * @param \Ydb\Import\YdbDumpFormat $var
  157. * @return $this
  158. */
  159. public function setYdbDump($var)
  160. {
  161. GPBUtil::checkMessage($var, \Ydb\Import\YdbDumpFormat::class);
  162. $this->writeOneof(4, $var);
  163. return $this;
  164. }
  165. /**
  166. * @return string
  167. */
  168. public function getFormat()
  169. {
  170. return $this->whichOneof("format");
  171. }
  172. }