InitRequest.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamReadMessage;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Handshake request.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.InitRequest</code>
  12. */
  13. class InitRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Message that describes topic to read.
  17. * Topics that will be read by this session.
  18. *
  19. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;</code>
  20. */
  21. private $topics_read_settings;
  22. /**
  23. * Path of consumer that is used for reading by this session.
  24. *
  25. * Generated from protobuf field <code>string consumer = 2;</code>
  26. */
  27. protected $consumer = '';
  28. /**
  29. * Optional name. Will be shown in debug stat.
  30. *
  31. * Generated from protobuf field <code>string reader_name = 3;</code>
  32. */
  33. protected $reader_name = '';
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type array<\Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings>|\Google\Protobuf\Internal\RepeatedField $topics_read_settings
  41. * Message that describes topic to read.
  42. * Topics that will be read by this session.
  43. * @type string $consumer
  44. * Path of consumer that is used for reading by this session.
  45. * @type string $reader_name
  46. * Optional name. Will be shown in debug stat.
  47. * }
  48. */
  49. public function __construct($data = NULL) {
  50. \GPBMetadata\Protos\YdbTopic::initOnce();
  51. parent::__construct($data);
  52. }
  53. /**
  54. * Message that describes topic to read.
  55. * Topics that will be read by this session.
  56. *
  57. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;</code>
  58. * @return \Google\Protobuf\Internal\RepeatedField
  59. */
  60. public function getTopicsReadSettings()
  61. {
  62. return $this->topics_read_settings;
  63. }
  64. /**
  65. * Message that describes topic to read.
  66. * Topics that will be read by this session.
  67. *
  68. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;</code>
  69. * @param array<\Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings>|\Google\Protobuf\Internal\RepeatedField $var
  70. * @return $this
  71. */
  72. public function setTopicsReadSettings($var)
  73. {
  74. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings::class);
  75. $this->topics_read_settings = $arr;
  76. return $this;
  77. }
  78. /**
  79. * Path of consumer that is used for reading by this session.
  80. *
  81. * Generated from protobuf field <code>string consumer = 2;</code>
  82. * @return string
  83. */
  84. public function getConsumer()
  85. {
  86. return $this->consumer;
  87. }
  88. /**
  89. * Path of consumer that is used for reading by this session.
  90. *
  91. * Generated from protobuf field <code>string consumer = 2;</code>
  92. * @param string $var
  93. * @return $this
  94. */
  95. public function setConsumer($var)
  96. {
  97. GPBUtil::checkString($var, True);
  98. $this->consumer = $var;
  99. return $this;
  100. }
  101. /**
  102. * Optional name. Will be shown in debug stat.
  103. *
  104. * Generated from protobuf field <code>string reader_name = 3;</code>
  105. * @return string
  106. */
  107. public function getReaderName()
  108. {
  109. return $this->reader_name;
  110. }
  111. /**
  112. * Optional name. Will be shown in debug stat.
  113. *
  114. * Generated from protobuf field <code>string reader_name = 3;</code>
  115. * @param string $var
  116. * @return $this
  117. */
  118. public function setReaderName($var)
  119. {
  120. GPBUtil::checkString($var, True);
  121. $this->reader_name = $var;
  122. return $this;
  123. }
  124. }
  125. // Adding a class alias for backwards compatibility with the previous class name.
  126. class_alias(InitRequest::class, \Ydb\Topic\StreamReadMessage_InitRequest::class);