Ydb.Topic.StreamWriteMessage.InitResponse
*/
class InitResponse extends \Google\Protobuf\Internal\Message
{
/**
* Last persisted message's sequence number for this producer.
* Zero for new producer.
*
* Generated from protobuf field int64 last_seq_no = 1;
*/
protected $last_seq_no = 0;
/**
* Unique identifier of write session. Used for debug purposes.
*
* Generated from protobuf field string session_id = 2;
*/
protected $session_id = '';
/**
* Identifier of partition that is matched for this write session.
*
* Generated from protobuf field int64 partition_id = 3;
*/
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 .Ydb.Topic.SupportedCodecs supported_codecs = 4;
*/
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 int64 last_seq_no = 1;
* @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 int64 last_seq_no = 1;
* @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 string session_id = 2;
* @return string
*/
public function getSessionId()
{
return $this->session_id;
}
/**
* Unique identifier of write session. Used for debug purposes.
*
* Generated from protobuf field string session_id = 2;
* @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 int64 partition_id = 3;
* @return int|string
*/
public function getPartitionId()
{
return $this->partition_id;
}
/**
* Identifier of partition that is matched for this write session.
*
* Generated from protobuf field int64 partition_id = 3;
* @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 .Ydb.Topic.SupportedCodecs supported_codecs = 4;
* @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 .Ydb.Topic.SupportedCodecs supported_codecs = 4;
* @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);