123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <?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);
|