CsvSettings.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_formats.proto
  4. namespace Ydb\Formats;
  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.Formats.CsvSettings</code>
  10. */
  11. class CsvSettings extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file.
  15. *
  16. * Generated from protobuf field <code>uint32 skip_rows = 1;</code>
  17. */
  18. protected $skip_rows = 0;
  19. /**
  20. * Fields delimiter in CSV file. It's "," if not set.
  21. *
  22. * Generated from protobuf field <code>bytes delimiter = 2;</code>
  23. */
  24. protected $delimiter = '';
  25. /**
  26. * String value that would be interpreted as NULL.
  27. *
  28. * Generated from protobuf field <code>bytes null_value = 3;</code>
  29. */
  30. protected $null_value = '';
  31. /**
  32. * First not skipped line is a CSV header (list of column names).
  33. *
  34. * Generated from protobuf field <code>bool header = 4;</code>
  35. */
  36. protected $header = false;
  37. /**
  38. * Constructor.
  39. *
  40. * @param array $data {
  41. * Optional. Data for populating the Message object.
  42. *
  43. * @type int $skip_rows
  44. * Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file.
  45. * @type string $delimiter
  46. * Fields delimiter in CSV file. It's "," if not set.
  47. * @type string $null_value
  48. * String value that would be interpreted as NULL.
  49. * @type bool $header
  50. * First not skipped line is a CSV header (list of column names).
  51. * }
  52. */
  53. public function __construct($data = NULL) {
  54. \GPBMetadata\Protos\YdbFormats::initOnce();
  55. parent::__construct($data);
  56. }
  57. /**
  58. * Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file.
  59. *
  60. * Generated from protobuf field <code>uint32 skip_rows = 1;</code>
  61. * @return int
  62. */
  63. public function getSkipRows()
  64. {
  65. return $this->skip_rows;
  66. }
  67. /**
  68. * Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file.
  69. *
  70. * Generated from protobuf field <code>uint32 skip_rows = 1;</code>
  71. * @param int $var
  72. * @return $this
  73. */
  74. public function setSkipRows($var)
  75. {
  76. GPBUtil::checkUint32($var);
  77. $this->skip_rows = $var;
  78. return $this;
  79. }
  80. /**
  81. * Fields delimiter in CSV file. It's "," if not set.
  82. *
  83. * Generated from protobuf field <code>bytes delimiter = 2;</code>
  84. * @return string
  85. */
  86. public function getDelimiter()
  87. {
  88. return $this->delimiter;
  89. }
  90. /**
  91. * Fields delimiter in CSV file. It's "," if not set.
  92. *
  93. * Generated from protobuf field <code>bytes delimiter = 2;</code>
  94. * @param string $var
  95. * @return $this
  96. */
  97. public function setDelimiter($var)
  98. {
  99. GPBUtil::checkString($var, False);
  100. $this->delimiter = $var;
  101. return $this;
  102. }
  103. /**
  104. * String value that would be interpreted as NULL.
  105. *
  106. * Generated from protobuf field <code>bytes null_value = 3;</code>
  107. * @return string
  108. */
  109. public function getNullValue()
  110. {
  111. return $this->null_value;
  112. }
  113. /**
  114. * String value that would be interpreted as NULL.
  115. *
  116. * Generated from protobuf field <code>bytes null_value = 3;</code>
  117. * @param string $var
  118. * @return $this
  119. */
  120. public function setNullValue($var)
  121. {
  122. GPBUtil::checkString($var, False);
  123. $this->null_value = $var;
  124. return $this;
  125. }
  126. /**
  127. * First not skipped line is a CSV header (list of column names).
  128. *
  129. * Generated from protobuf field <code>bool header = 4;</code>
  130. * @return bool
  131. */
  132. public function getHeader()
  133. {
  134. return $this->header;
  135. }
  136. /**
  137. * First not skipped line is a CSV header (list of column names).
  138. *
  139. * Generated from protobuf field <code>bool header = 4;</code>
  140. * @param bool $var
  141. * @return $this
  142. */
  143. public function setHeader($var)
  144. {
  145. GPBUtil::checkBool($var);
  146. $this->header = $var;
  147. return $this;
  148. }
  149. }