Ydb.Topic.StreamWriteMessage.FromServer */ class FromServer extends \Google\Protobuf\Internal\Message { /** * Server status of response. * * Generated from protobuf field .Ydb.StatusIds.StatusCode status = 1; */ protected $status = 0; /** * Issues if any. * * Generated from protobuf field repeated .Ydb.Issue.IssueMessage issues = 2; */ 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 .Ydb.StatusIds.StatusCode status = 1; * @return int */ public function getStatus() { return $this->status; } /** * Server status of response. * * Generated from protobuf field .Ydb.StatusIds.StatusCode status = 1; * @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 repeated .Ydb.Issue.IssueMessage issues = 2; * @return \Google\Protobuf\Internal\RepeatedField */ public function getIssues() { return $this->issues; } /** * Issues if any. * * Generated from protobuf field repeated .Ydb.Issue.IssueMessage issues = 2; * @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 .Ydb.Topic.StreamWriteMessage.InitResponse init_response = 3; * @return \Ydb\Topic\StreamWriteMessage\InitResponse|null */ public function getInitResponse() { return $this->readOneof(3); } public function hasInitResponse() { return $this->hasOneof(3); } /** * Generated from protobuf field .Ydb.Topic.StreamWriteMessage.InitResponse init_response = 3; * @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 .Ydb.Topic.StreamWriteMessage.WriteResponse write_response = 4; * @return \Ydb\Topic\StreamWriteMessage\WriteResponse|null */ public function getWriteResponse() { return $this->readOneof(4); } public function hasWriteResponse() { return $this->hasOneof(4); } /** * Generated from protobuf field .Ydb.Topic.StreamWriteMessage.WriteResponse write_response = 4; * @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 .Ydb.Topic.UpdateTokenResponse update_token_response = 5; * @return \Ydb\Topic\UpdateTokenResponse|null */ public function getUpdateTokenResponse() { return $this->readOneof(5); } public function hasUpdateTokenResponse() { return $this->hasOneof(5); } /** * Generated from protobuf field .Ydb.Topic.UpdateTokenResponse update_token_response = 5; * @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);