Failure.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 connection and session level failures
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionResponse.Failure</code>
  13. */
  14. class Failure extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  18. */
  19. protected $status = 0;
  20. /**
  21. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  22. */
  23. private $issues;
  24. /**
  25. * Constructor.
  26. *
  27. * @param array $data {
  28. * Optional. Data for populating the Message object.
  29. *
  30. * @type int $status
  31. * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues
  32. * }
  33. */
  34. public function __construct($data = NULL) {
  35. \GPBMetadata\Protos\YdbCoordination::initOnce();
  36. parent::__construct($data);
  37. }
  38. /**
  39. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  40. * @return int
  41. */
  42. public function getStatus()
  43. {
  44. return $this->status;
  45. }
  46. /**
  47. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  48. * @param int $var
  49. * @return $this
  50. */
  51. public function setStatus($var)
  52. {
  53. GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class);
  54. $this->status = $var;
  55. return $this;
  56. }
  57. /**
  58. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  59. * @return \Google\Protobuf\Internal\RepeatedField
  60. */
  61. public function getIssues()
  62. {
  63. return $this->issues;
  64. }
  65. /**
  66. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  67. * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var
  68. * @return $this
  69. */
  70. public function setIssues($var)
  71. {
  72. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class);
  73. $this->issues = $arr;
  74. return $this;
  75. }
  76. }
  77. // Adding a class alias for backwards compatibility with the previous class name.
  78. class_alias(Failure::class, \Ydb\Coordination\SessionResponse_Failure::class);