Ydb.Coordination.SessionRequest.SessionStart
*/
class SessionStart extends \Google\Protobuf\Internal\Message
{
/**
* Path to a coordination node
*
* Generated from protobuf field string path = 1;
*/
protected $path = '';
/**
* Non-zero when restoring a session, 0 when creating a new session
*
* Generated from protobuf field uint64 session_id = 2;
*/
protected $session_id = 0;
/**
* Timeout in milliseconds during which client may restore a detached session
*
* Generated from protobuf field uint64 timeout_millis = 3;
*/
protected $timeout_millis = 0;
/**
* User-defined description that may be used to describe the client
*
* Generated from protobuf field string description = 4;
*/
protected $description = '';
/**
* Monotonically increasing sequence number generated by the client
* When concurrent SessionStart requests are detected the one with
* the biggest sequence number will succeed
*
* Generated from protobuf field uint64 seq_no = 5;
*/
protected $seq_no = 0;
/**
* Random bytes used to protect session from restore by other clients (max. 16 bytes)
*
* Generated from protobuf field bytes protection_key = 6;
*/
protected $protection_key = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $path
* Path to a coordination node
* @type int|string $session_id
* Non-zero when restoring a session, 0 when creating a new session
* @type int|string $timeout_millis
* Timeout in milliseconds during which client may restore a detached session
* @type string $description
* User-defined description that may be used to describe the client
* @type int|string $seq_no
* Monotonically increasing sequence number generated by the client
* When concurrent SessionStart requests are detected the one with
* the biggest sequence number will succeed
* @type string $protection_key
* Random bytes used to protect session from restore by other clients (max. 16 bytes)
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbCoordination::initOnce();
parent::__construct($data);
}
/**
* Path to a coordination node
*
* Generated from protobuf field string path = 1;
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Path to a coordination node
*
* Generated from protobuf field string path = 1;
* @param string $var
* @return $this
*/
public function setPath($var)
{
GPBUtil::checkString($var, True);
$this->path = $var;
return $this;
}
/**
* Non-zero when restoring a session, 0 when creating a new session
*
* Generated from protobuf field uint64 session_id = 2;
* @return int|string
*/
public function getSessionId()
{
return $this->session_id;
}
/**
* Non-zero when restoring a session, 0 when creating a new session
*
* Generated from protobuf field uint64 session_id = 2;
* @param int|string $var
* @return $this
*/
public function setSessionId($var)
{
GPBUtil::checkUint64($var);
$this->session_id = $var;
return $this;
}
/**
* Timeout in milliseconds during which client may restore a detached session
*
* Generated from protobuf field uint64 timeout_millis = 3;
* @return int|string
*/
public function getTimeoutMillis()
{
return $this->timeout_millis;
}
/**
* Timeout in milliseconds during which client may restore a detached session
*
* Generated from protobuf field uint64 timeout_millis = 3;
* @param int|string $var
* @return $this
*/
public function setTimeoutMillis($var)
{
GPBUtil::checkUint64($var);
$this->timeout_millis = $var;
return $this;
}
/**
* User-defined description that may be used to describe the client
*
* Generated from protobuf field string description = 4;
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* User-defined description that may be used to describe the client
*
* Generated from protobuf field string description = 4;
* @param string $var
* @return $this
*/
public function setDescription($var)
{
GPBUtil::checkString($var, True);
$this->description = $var;
return $this;
}
/**
* Monotonically increasing sequence number generated by the client
* When concurrent SessionStart requests are detected the one with
* the biggest sequence number will succeed
*
* Generated from protobuf field uint64 seq_no = 5;
* @return int|string
*/
public function getSeqNo()
{
return $this->seq_no;
}
/**
* Monotonically increasing sequence number generated by the client
* When concurrent SessionStart requests are detected the one with
* the biggest sequence number will succeed
*
* Generated from protobuf field uint64 seq_no = 5;
* @param int|string $var
* @return $this
*/
public function setSeqNo($var)
{
GPBUtil::checkUint64($var);
$this->seq_no = $var;
return $this;
}
/**
* Random bytes used to protect session from restore by other clients (max. 16 bytes)
*
* Generated from protobuf field bytes protection_key = 6;
* @return string
*/
public function getProtectionKey()
{
return $this->protection_key;
}
/**
* Random bytes used to protect session from restore by other clients (max. 16 bytes)
*
* Generated from protobuf field bytes protection_key = 6;
* @param string $var
* @return $this
*/
public function setProtectionKey($var)
{
GPBUtil::checkString($var, False);
$this->protection_key = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SessionStart::class, \Ydb\Coordination\SessionRequest_SessionStart::class);