Ydb.Topic.StreamReadMessage.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\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 .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; } /** * Responses to respective client requests. * * Generated from protobuf field .Ydb.Topic.StreamReadMessage.InitResponse init_response = 3; * @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 .Ydb.Topic.StreamReadMessage.InitResponse init_response = 3; * @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 .Ydb.Topic.StreamReadMessage.ReadResponse read_response = 4; * @return \Ydb\Topic\StreamReadMessage\ReadResponse|null */ public function getReadResponse() { return $this->readOneof(4); } public function hasReadResponse() { return $this->hasOneof(4); } /** * Generated from protobuf field .Ydb.Topic.StreamReadMessage.ReadResponse read_response = 4; * @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 .Ydb.Topic.StreamReadMessage.CommitOffsetResponse commit_offset_response = 5; * @return \Ydb\Topic\StreamReadMessage\CommitOffsetResponse|null */ public function getCommitOffsetResponse() { return $this->readOneof(5); } public function hasCommitOffsetResponse() { return $this->hasOneof(5); } /** * Generated from protobuf field .Ydb.Topic.StreamReadMessage.CommitOffsetResponse commit_offset_response = 5; * @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 .Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponse partition_session_status_response = 6; * @return \Ydb\Topic\StreamReadMessage\PartitionSessionStatusResponse|null */ public function getPartitionSessionStatusResponse() { return $this->readOneof(6); } public function hasPartitionSessionStatusResponse() { return $this->hasOneof(6); } /** * Generated from protobuf field .Ydb.Topic.StreamReadMessage.PartitionSessionStatusResponse partition_session_status_response = 6; * @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 .Ydb.Topic.UpdateTokenResponse update_token_response = 7; * @return \Ydb\Topic\UpdateTokenResponse|null */ public function getUpdateTokenResponse() { return $this->readOneof(7); } public function hasUpdateTokenResponse() { return $this->hasOneof(7); } /** * Generated from protobuf field .Ydb.Topic.UpdateTokenResponse update_token_response = 7; * @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 .Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest start_partition_session_request = 8; * @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 .Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest start_partition_session_request = 8; * @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 .Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest stop_partition_session_request = 9; * @return \Ydb\Topic\StreamReadMessage\StopPartitionSessionRequest|null */ public function getStopPartitionSessionRequest() { return $this->readOneof(9); } public function hasStopPartitionSessionRequest() { return $this->hasOneof(9); } /** * Generated from protobuf field .Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest stop_partition_session_request = 9; * @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);