WriteRequest.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamWriteMessage;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Represents portion of client messages.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.WriteRequest</code>
  12. */
  13. class WriteRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;</code>
  17. */
  18. private $messages;
  19. /**
  20. * Codec that is used for data compression.
  21. * See enum Codec above for values.
  22. *
  23. * Generated from protobuf field <code>int32 codec = 2;</code>
  24. */
  25. protected $codec = 0;
  26. /**
  27. * Constructor.
  28. *
  29. * @param array $data {
  30. * Optional. Data for populating the Message object.
  31. *
  32. * @type array<\Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData>|\Google\Protobuf\Internal\RepeatedField $messages
  33. * @type int $codec
  34. * Codec that is used for data compression.
  35. * See enum Codec above for values.
  36. * }
  37. */
  38. public function __construct($data = NULL) {
  39. \GPBMetadata\Protos\YdbTopic::initOnce();
  40. parent::__construct($data);
  41. }
  42. /**
  43. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;</code>
  44. * @return \Google\Protobuf\Internal\RepeatedField
  45. */
  46. public function getMessages()
  47. {
  48. return $this->messages;
  49. }
  50. /**
  51. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;</code>
  52. * @param array<\Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData>|\Google\Protobuf\Internal\RepeatedField $var
  53. * @return $this
  54. */
  55. public function setMessages($var)
  56. {
  57. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData::class);
  58. $this->messages = $arr;
  59. return $this;
  60. }
  61. /**
  62. * Codec that is used for data compression.
  63. * See enum Codec above for values.
  64. *
  65. * Generated from protobuf field <code>int32 codec = 2;</code>
  66. * @return int
  67. */
  68. public function getCodec()
  69. {
  70. return $this->codec;
  71. }
  72. /**
  73. * Codec that is used for data compression.
  74. * See enum Codec above for values.
  75. *
  76. * Generated from protobuf field <code>int32 codec = 2;</code>
  77. * @param int $var
  78. * @return $this
  79. */
  80. public function setCodec($var)
  81. {
  82. GPBUtil::checkInt32($var);
  83. $this->codec = $var;
  84. return $this;
  85. }
  86. }
  87. // Adding a class alias for backwards compatibility with the previous class name.
  88. class_alias(WriteRequest::class, \Ydb\Topic\StreamWriteMessage_WriteRequest::class);