123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_coordination.proto
- namespace Ydb\Coordination\SessionRequest;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- **
- * First message used to start/restore a session
- *
- * Generated from protobuf message <code>Ydb.Coordination.SessionRequest.SessionStart</code>
- */
- class SessionStart extends \Google\Protobuf\Internal\Message
- {
- /**
- * Path to a coordination node
- *
- * Generated from protobuf field <code>string path = 1;</code>
- */
- protected $path = '';
- /**
- * Non-zero when restoring a session, 0 when creating a new session
- *
- * Generated from protobuf field <code>uint64 session_id = 2;</code>
- */
- protected $session_id = 0;
- /**
- * Timeout in milliseconds during which client may restore a detached session
- *
- * Generated from protobuf field <code>uint64 timeout_millis = 3;</code>
- */
- protected $timeout_millis = 0;
- /**
- * User-defined description that may be used to describe the client
- *
- * Generated from protobuf field <code>string description = 4;</code>
- */
- 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 <code>uint64 seq_no = 5;</code>
- */
- protected $seq_no = 0;
- /**
- * Random bytes used to protect session from restore by other clients (max. 16 bytes)
- *
- * Generated from protobuf field <code>bytes protection_key = 6;</code>
- */
- 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 <code>string path = 1;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Path to a coordination node
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @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 <code>uint64 session_id = 2;</code>
- * @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 <code>uint64 session_id = 2;</code>
- * @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 <code>uint64 timeout_millis = 3;</code>
- * @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 <code>uint64 timeout_millis = 3;</code>
- * @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 <code>string description = 4;</code>
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
- /**
- * User-defined description that may be used to describe the client
- *
- * Generated from protobuf field <code>string description = 4;</code>
- * @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 <code>uint64 seq_no = 5;</code>
- * @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 <code>uint64 seq_no = 5;</code>
- * @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 <code>bytes protection_key = 6;</code>
- * @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 <code>bytes protection_key = 6;</code>
- * @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);
|