/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Topic/StreamReadMessage/FromClient.php
259 строк
8 KB
Alexei Shabalin
updated protos
17 фев 2023, 13:31
17 фев 2023, 13:31
ae6a264
Код
Авторство
О чём код?
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: protos/ydb_topic.proto namespace Ydb\Topic\StreamReadMessage; use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** * Client-server message for read session. Contains one of: * InitRequest - handshake request. * ReadRequest - request for data. * CommitOffsetRequest - request for commit of some read data. * PartitionSessionStatusRequest - request for session status * UpdateTokenRequest - request to update auth token * StartPartitionSessionResponse - Response to StreamReadServerMessage.StartPartitionSessionRequest. * Client signals it is ready to get data from partition. * StopPartitionSessionResponse - Response to StreamReadServerMessage.StopPartitionSessionRequest. * Client signals it has finished working with partition. Mandatory for graceful stop, optional otherwise. * * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.FromClient</code> */ class FromClient extends \Google\Protobuf\Internal\Message { protected $client_message; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type \Ydb\Topic\StreamReadMessage\InitRequest $init_request * Client requests. * @type \Ydb\Topic\StreamReadMessage\ReadRequest $read_request * @type \Ydb\Topic\StreamReadMessage\CommitOffsetRequest $commit_offset_request * @type \Ydb\Topic\StreamReadMessage\PartitionSessionStatusRequest $partition_session_status_request * @type \Ydb\Topic\UpdateTokenRequest $update_token_request * @type \Ydb\Topic\StreamReadMessage\StartPartitionSessionResponse $start_partition_session_response * Responses to respective server commands. * @type \Ydb\Topic\StreamReadMessage\StopPartitionSessionResponse $stop_partition_session_response * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbTopic::initOnce(); parent::__construct($data); } /** * Client requests. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.InitRequest init_request = 1;</code> * @return \Ydb\Topic\StreamReadMessage\InitRequest|null */ public function getInitRequest() { return $this->readOneof(1); } public function hasInitRequest() { return $this->hasOneof(1); } /** * Client requests. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.InitRequest init_request = 1;</code> * @param \Ydb\Topic\StreamReadMessage\InitRequest $var * @return $this */ public function setInitRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\InitRequest::class); $this->writeOneof(1, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.ReadRequest read_request = 2;</code> * @return \Ydb\Topic\StreamReadMessage\ReadRequest|null */ public function getReadRequest() { return $this->readOneof(2); } public function hasReadRequest() { return $this->hasOneof(2); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.ReadRequest read_request = 2;</code> * @param \Ydb\Topic\StreamReadMessage\ReadRequest $var * @return $this */ public function setReadRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\ReadRequest::class); $this->writeOneof(2, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.CommitOffsetRequest commit_offset_request = 3;</code> * @return \Ydb\Topic\StreamReadMessage\CommitOffsetRequest|null */ public function getCommitOffsetRequest() { return $this->readOneof(3); } public function hasCommitOffsetRequest() { return $this->hasOneof(3); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.CommitOffsetRequest commit_offset_request = 3;</code> * @param \Ydb\Topic\StreamReadMessage\CommitOffsetRequest $var * @return $this */ public function setCommitOffsetRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\CommitOffsetRequest::class); $this->writeOneof(3, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequest partition_session_status_request = 4;</code> * @return \Ydb\Topic\StreamReadMessage\PartitionSessionStatusRequest|null */ public function getPartitionSessionStatusRequest() { return $this->readOneof(4); } public function hasPartitionSessionStatusRequest() { return $this->hasOneof(4); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSessionStatusRequest partition_session_status_request = 4;</code> * @param \Ydb\Topic\StreamReadMessage\PartitionSessionStatusRequest $var * @return $this */ public function setPartitionSessionStatusRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\PartitionSessionStatusRequest::class); $this->writeOneof(4, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenRequest update_token_request = 5;</code> * @return \Ydb\Topic\UpdateTokenRequest|null */ public function getUpdateTokenRequest() { return $this->readOneof(5); } public function hasUpdateTokenRequest() { return $this->hasOneof(5); } /** * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenRequest update_token_request = 5;</code> * @param \Ydb\Topic\UpdateTokenRequest $var * @return $this */ public function setUpdateTokenRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\UpdateTokenRequest::class); $this->writeOneof(5, $var); return $this; } /** * Responses to respective server commands. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponse start_partition_session_response = 6;</code> * @return \Ydb\Topic\StreamReadMessage\StartPartitionSessionResponse|null */ public function getStartPartitionSessionResponse() { return $this->readOneof(6); } public function hasStartPartitionSessionResponse() { return $this->hasOneof(6); } /** * Responses to respective server commands. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StartPartitionSessionResponse start_partition_session_response = 6;</code> * @param \Ydb\Topic\StreamReadMessage\StartPartitionSessionResponse $var * @return $this */ public function setStartPartitionSessionResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\StartPartitionSessionResponse::class); $this->writeOneof(6, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponse stop_partition_session_response = 7;</code> * @return \Ydb\Topic\StreamReadMessage\StopPartitionSessionResponse|null */ public function getStopPartitionSessionResponse() { return $this->readOneof(7); } public function hasStopPartitionSessionResponse() { return $this->hasOneof(7); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StopPartitionSessionResponse stop_partition_session_response = 7;</code> * @param \Ydb\Topic\StreamReadMessage\StopPartitionSessionResponse $var * @return $this */ public function setStopPartitionSessionResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\StopPartitionSessionResponse::class); $this->writeOneof(7, $var); return $this; } /** * @return string */ public function getClientMessage() { return $this->whichOneof("client_message"); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(FromClient::class, \Ydb\Topic\StreamReadMessage_FromClient::class);