123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <?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;
- /**
- * Server-client message for write session. Contains either non-success status, or one of:
- * InitResponse - correct handshake response.
- * WriteResponse - acknowledgment of storing client messages.
- * UpdateTokenResponse - acknowledgment of reauthentication and reauthorization.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.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\StreamWriteMessage\InitResponse $init_response
- * @type \Ydb\Topic\StreamWriteMessage\WriteResponse $write_response
- * @type \Ydb\Topic\UpdateTokenResponse $update_token_response
- * }
- */
- 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;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.InitResponse init_response = 3;</code>
- * @return \Ydb\Topic\StreamWriteMessage\InitResponse|null
- */
- public function getInitResponse()
- {
- return $this->readOneof(3);
- }
- public function hasInitResponse()
- {
- return $this->hasOneof(3);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.InitResponse init_response = 3;</code>
- * @param \Ydb\Topic\StreamWriteMessage\InitResponse $var
- * @return $this
- */
- public function setInitResponse($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\InitResponse::class);
- $this->writeOneof(3, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse write_response = 4;</code>
- * @return \Ydb\Topic\StreamWriteMessage\WriteResponse|null
- */
- public function getWriteResponse()
- {
- return $this->readOneof(4);
- }
- public function hasWriteResponse()
- {
- return $this->hasOneof(4);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse write_response = 4;</code>
- * @param \Ydb\Topic\StreamWriteMessage\WriteResponse $var
- * @return $this
- */
- public function setWriteResponse($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse::class);
- $this->writeOneof(4, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenResponse update_token_response = 5;</code>
- * @return \Ydb\Topic\UpdateTokenResponse|null
- */
- public function getUpdateTokenResponse()
- {
- return $this->readOneof(5);
- }
- public function hasUpdateTokenResponse()
- {
- return $this->hasOneof(5);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.UpdateTokenResponse update_token_response = 5;</code>
- * @param \Ydb\Topic\UpdateTokenResponse $var
- * @return $this
- */
- public function setUpdateTokenResponse($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\UpdateTokenResponse::class);
- $this->writeOneof(5, $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\StreamWriteMessage_FromServer::class);
|