SessionStarted.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_coordination.proto
  4. namespace Ydb\Coordination\SessionResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. **
  10. * Used to report a successful session create/restore operation
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionResponse.SessionStarted</code>
  13. */
  14. class SessionStarted extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * A server generation id that may be used for restoring the session
  18. *
  19. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  20. */
  21. protected $session_id = 0;
  22. /**
  23. * Timeout in milliseconds that will be used by the server
  24. *
  25. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  26. */
  27. protected $timeout_millis = 0;
  28. /**
  29. * Constructor.
  30. *
  31. * @param array $data {
  32. * Optional. Data for populating the Message object.
  33. *
  34. * @type int|string $session_id
  35. * A server generation id that may be used for restoring the session
  36. * @type int|string $timeout_millis
  37. * Timeout in milliseconds that will be used by the server
  38. * }
  39. */
  40. public function __construct($data = NULL) {
  41. \GPBMetadata\Protos\YdbCoordination::initOnce();
  42. parent::__construct($data);
  43. }
  44. /**
  45. * A server generation id that may be used for restoring the session
  46. *
  47. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  48. * @return int|string
  49. */
  50. public function getSessionId()
  51. {
  52. return $this->session_id;
  53. }
  54. /**
  55. * A server generation id that may be used for restoring the session
  56. *
  57. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  58. * @param int|string $var
  59. * @return $this
  60. */
  61. public function setSessionId($var)
  62. {
  63. GPBUtil::checkUint64($var);
  64. $this->session_id = $var;
  65. return $this;
  66. }
  67. /**
  68. * Timeout in milliseconds that will be used by the server
  69. *
  70. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  71. * @return int|string
  72. */
  73. public function getTimeoutMillis()
  74. {
  75. return $this->timeout_millis;
  76. }
  77. /**
  78. * Timeout in milliseconds that will be used by the server
  79. *
  80. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  81. * @param int|string $var
  82. * @return $this
  83. */
  84. public function setTimeoutMillis($var)
  85. {
  86. GPBUtil::checkUint64($var);
  87. $this->timeout_millis = $var;
  88. return $this;
  89. }
  90. }
  91. // Adding a class alias for backwards compatibility with the previous class name.
  92. class_alias(SessionStarted::class, \Ydb\Coordination\SessionResponse_SessionStarted::class);