123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamWriteMessage;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Response for handshake.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.InitResponse</code>
- */
- class InitResponse extends \Google\Protobuf\Internal\Message
- {
- /**
- * Last persisted message's sequence number for this producer.
- * Zero for new producer.
- *
- * Generated from protobuf field <code>int64 last_seq_no = 1;</code>
- */
- protected $last_seq_no = 0;
- /**
- * Unique identifier of write session. Used for debug purposes.
- *
- * Generated from protobuf field <code>string session_id = 2;</code>
- */
- protected $session_id = '';
- /**
- * Identifier of partition that is matched for this write session.
- *
- * Generated from protobuf field <code>int64 partition_id = 3;</code>
- */
- protected $partition_id = 0;
- /**
- * Client can only use compression codecs from this set to write messages to topic.
- * Otherwise session will be closed with BAD_REQUEST.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 4;</code>
- */
- protected $supported_codecs = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $last_seq_no
- * Last persisted message's sequence number for this producer.
- * Zero for new producer.
- * @type string $session_id
- * Unique identifier of write session. Used for debug purposes.
- * @type int|string $partition_id
- * Identifier of partition that is matched for this write session.
- * @type \Ydb\Topic\SupportedCodecs $supported_codecs
- * Client can only use compression codecs from this set to write messages to topic.
- * Otherwise session will be closed with BAD_REQUEST.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Last persisted message's sequence number for this producer.
- * Zero for new producer.
- *
- * Generated from protobuf field <code>int64 last_seq_no = 1;</code>
- * @return int|string
- */
- public function getLastSeqNo()
- {
- return $this->last_seq_no;
- }
- /**
- * Last persisted message's sequence number for this producer.
- * Zero for new producer.
- *
- * Generated from protobuf field <code>int64 last_seq_no = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setLastSeqNo($var)
- {
- GPBUtil::checkInt64($var);
- $this->last_seq_no = $var;
- return $this;
- }
- /**
- * Unique identifier of write session. Used for debug purposes.
- *
- * Generated from protobuf field <code>string session_id = 2;</code>
- * @return string
- */
- public function getSessionId()
- {
- return $this->session_id;
- }
- /**
- * Unique identifier of write session. Used for debug purposes.
- *
- * Generated from protobuf field <code>string session_id = 2;</code>
- * @param string $var
- * @return $this
- */
- public function setSessionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->session_id = $var;
- return $this;
- }
- /**
- * Identifier of partition that is matched for this write session.
- *
- * Generated from protobuf field <code>int64 partition_id = 3;</code>
- * @return int|string
- */
- public function getPartitionId()
- {
- return $this->partition_id;
- }
- /**
- * Identifier of partition that is matched for this write session.
- *
- * Generated from protobuf field <code>int64 partition_id = 3;</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionId($var)
- {
- GPBUtil::checkInt64($var);
- $this->partition_id = $var;
- return $this;
- }
- /**
- * Client can only use compression codecs from this set to write messages to topic.
- * Otherwise session will be closed with BAD_REQUEST.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 4;</code>
- * @return \Ydb\Topic\SupportedCodecs|null
- */
- public function getSupportedCodecs()
- {
- return $this->supported_codecs;
- }
- public function hasSupportedCodecs()
- {
- return isset($this->supported_codecs);
- }
- public function clearSupportedCodecs()
- {
- unset($this->supported_codecs);
- }
- /**
- * Client can only use compression codecs from this set to write messages to topic.
- * Otherwise session will be closed with BAD_REQUEST.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 4;</code>
- * @param \Ydb\Topic\SupportedCodecs $var
- * @return $this
- */
- public function setSupportedCodecs($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
- $this->supported_codecs = $var;
- return $this;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(InitResponse::class, \Ydb\Topic\StreamWriteMessage_InitResponse::class);
|