/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Topic/StreamReadMessage/FromServer.php
325 строк
10 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; /** * Server-client message for read session. Contains one of: * InitResponse - handshake response from server. * ReadResponse - portion of data. * CommitOffsetResponse - acknowledgment for commit. * PartitionSessionStatusResponse - server response with partition session status. * UpdateTokenResponse - acknowledgment of token update. * StartPartitionSessionRequest - command from server to create a partition session. * StopPartitionSessionRequest - command from server to destroy a partition session. * * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.FromServer</code> */ class FromServer extends \Google\Protobuf\Internal\Message { /** * Server status of response. * * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code> */ protected $status = 0; /** * Issues if any. * * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code> */ private $issues; protected $server_message; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $status * Server status of response. * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues * Issues if any. * @type \Ydb\Topic\StreamReadMessage\InitResponse $init_response * Responses to respective client requests. * @type \Ydb\Topic\StreamReadMessage\ReadResponse $read_response * @type \Ydb\Topic\StreamReadMessage\CommitOffsetResponse $commit_offset_response * @type \Ydb\Topic\StreamReadMessage\PartitionSessionStatusResponse $partition_session_status_response * @type \Ydb\Topic\UpdateTokenResponse $update_token_response * @type \Ydb\Topic\StreamReadMessage\StartPartitionSessionRequest $start_partition_session_request * Server commands. * @type \Ydb\Topic\StreamReadMessage\StopPartitionSessionRequest $stop_partition_session_request * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbTopic::initOnce(); parent::__construct($data); } /** * Server status of response. * * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code> * @return int */ public function getStatus() { return $this->status; } /** * Server status of response. * * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code> * @param int $var * @return $this */ public function setStatus($var) { GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class); $this->status = $var; return $this; } /** * Issues if any. * * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code> * @return \Google\Protobuf\Internal\RepeatedField */ public function getIssues() { return $this->issues; } /** * Issues if any. * * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code> * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setIssues($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class); $this->issues = $arr; return $this; } /** * Responses to respective client requests. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.InitResponse init_response = 3;</code> * @return \Ydb\Topic\StreamReadMessage\InitResponse|null */ public function getInitResponse() { return $this->readOneof(3); } public function hasInitResponse() { return $this->hasOneof(3); } /** * Responses to respective client requests. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.InitResponse init_response = 3;</code> * @param \Ydb\Topic\StreamReadMessage\InitResponse $var * @return $this */ public function setInitResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\InitResponse::class); $this->writeOneof(3, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.ReadResponse read_response = 4;</code> * @return \Ydb\Topic\StreamReadMessage\ReadResponse|null */ public function getReadResponse() { return $this->readOneof(4); } public function hasReadResponse() { return $this->hasOneof(4); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.ReadResponse read_response = 4;</code> * @param \Ydb\Topic\StreamReadMessage\ReadResponse $var * @return $this */ public function setReadResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\ReadResponse::class); $this->writeOneof(4, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.CommitOffsetResponse commit_offset_response = 5;</code> * @return \Ydb\Topic\StreamReadMessage\CommitOffsetResponse|null */ public function getCommitOffsetResponse() { return $this->readOneof(5); } public function hasCommitOffsetResponse() { return $this->hasOneof(5); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.CommitOffsetResponse commit_offset_response = 5;</code> * @param \Ydb\Topic\StreamReadMessage\CommitOffsetResponse $var * @return $this */ public function setCommitOffsetResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\CommitOffsetResponse::class); $this->writeOneof(5, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponse partition_session_status_response = 6;</code> * @return \Ydb\Topic\StreamReadMessage\PartitionSessionStatusResponse|null */ public function getPartitionSessionStatusResponse() { return $this->readOneof(6); } public function hasPartitionSessionStatusResponse() { return $this->hasOneof(6); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponse partition_session_status_response = 6;</code> * @param \Ydb\Topic\StreamReadMessage\PartitionSessionStatusResponse $var * @return $this */ public function setPartitionSessionStatusResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\PartitionSessionStatusResponse::class); $this->writeOneof(6, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenResponse update_token_response = 7;</code> * @return \Ydb\Topic\UpdateTokenResponse|null */ public function getUpdateTokenResponse() { return $this->readOneof(7); } public function hasUpdateTokenResponse() { return $this->hasOneof(7); } /** * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenResponse update_token_response = 7;</code> * @param \Ydb\Topic\UpdateTokenResponse $var * @return $this */ public function setUpdateTokenResponse($var) { GPBUtil::checkMessage($var, \Ydb\Topic\UpdateTokenResponse::class); $this->writeOneof(7, $var); return $this; } /** * Server commands. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest start_partition_session_request = 8;</code> * @return \Ydb\Topic\StreamReadMessage\StartPartitionSessionRequest|null */ public function getStartPartitionSessionRequest() { return $this->readOneof(8); } public function hasStartPartitionSessionRequest() { return $this->hasOneof(8); } /** * Server commands. * * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest start_partition_session_request = 8;</code> * @param \Ydb\Topic\StreamReadMessage\StartPartitionSessionRequest $var * @return $this */ public function setStartPartitionSessionRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\StartPartitionSessionRequest::class); $this->writeOneof(8, $var); return $this; } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest stop_partition_session_request = 9;</code> * @return \Ydb\Topic\StreamReadMessage\StopPartitionSessionRequest|null */ public function getStopPartitionSessionRequest() { return $this->readOneof(9); } public function hasStopPartitionSessionRequest() { return $this->hasOneof(9); } /** * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest stop_partition_session_request = 9;</code> * @param \Ydb\Topic\StreamReadMessage\StopPartitionSessionRequest $var * @return $this */ public function setStopPartitionSessionRequest($var) { GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\StopPartitionSessionRequest::class); $this->writeOneof(9, $var); return $this; } /** * @return string */ public function getServerMessage() { return $this->whichOneof("server_message"); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(FromServer::class, \Ydb\Topic\StreamReadMessage_FromServer::class);