PermissionsAction.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_scheme.proto
  4. namespace Ydb\Scheme;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.Scheme.PermissionsAction</code>
  10. */
  11. class PermissionsAction extends \Google\Protobuf\Internal\Message
  12. {
  13. protected $action;
  14. /**
  15. * Constructor.
  16. *
  17. * @param array $data {
  18. * Optional. Data for populating the Message object.
  19. *
  20. * @type \Ydb\Scheme\Permissions $grant
  21. * Grant permissions
  22. * @type \Ydb\Scheme\Permissions $revoke
  23. * Revoke permissions
  24. * @type \Ydb\Scheme\Permissions $set
  25. * Rewrite permissions for given subject (last set win in case of multiple set for one subject)
  26. * @type string $change_owner
  27. * New owner for object
  28. * }
  29. */
  30. public function __construct($data = NULL) {
  31. \GPBMetadata\Protos\YdbScheme::initOnce();
  32. parent::__construct($data);
  33. }
  34. /**
  35. * Grant permissions
  36. *
  37. * Generated from protobuf field <code>.Ydb.Scheme.Permissions grant = 1;</code>
  38. * @return \Ydb\Scheme\Permissions|null
  39. */
  40. public function getGrant()
  41. {
  42. return $this->readOneof(1);
  43. }
  44. public function hasGrant()
  45. {
  46. return $this->hasOneof(1);
  47. }
  48. /**
  49. * Grant permissions
  50. *
  51. * Generated from protobuf field <code>.Ydb.Scheme.Permissions grant = 1;</code>
  52. * @param \Ydb\Scheme\Permissions $var
  53. * @return $this
  54. */
  55. public function setGrant($var)
  56. {
  57. GPBUtil::checkMessage($var, \Ydb\Scheme\Permissions::class);
  58. $this->writeOneof(1, $var);
  59. return $this;
  60. }
  61. /**
  62. * Revoke permissions
  63. *
  64. * Generated from protobuf field <code>.Ydb.Scheme.Permissions revoke = 2;</code>
  65. * @return \Ydb\Scheme\Permissions|null
  66. */
  67. public function getRevoke()
  68. {
  69. return $this->readOneof(2);
  70. }
  71. public function hasRevoke()
  72. {
  73. return $this->hasOneof(2);
  74. }
  75. /**
  76. * Revoke permissions
  77. *
  78. * Generated from protobuf field <code>.Ydb.Scheme.Permissions revoke = 2;</code>
  79. * @param \Ydb\Scheme\Permissions $var
  80. * @return $this
  81. */
  82. public function setRevoke($var)
  83. {
  84. GPBUtil::checkMessage($var, \Ydb\Scheme\Permissions::class);
  85. $this->writeOneof(2, $var);
  86. return $this;
  87. }
  88. /**
  89. * Rewrite permissions for given subject (last set win in case of multiple set for one subject)
  90. *
  91. * Generated from protobuf field <code>.Ydb.Scheme.Permissions set = 3;</code>
  92. * @return \Ydb\Scheme\Permissions|null
  93. */
  94. public function getSet()
  95. {
  96. return $this->readOneof(3);
  97. }
  98. public function hasSet()
  99. {
  100. return $this->hasOneof(3);
  101. }
  102. /**
  103. * Rewrite permissions for given subject (last set win in case of multiple set for one subject)
  104. *
  105. * Generated from protobuf field <code>.Ydb.Scheme.Permissions set = 3;</code>
  106. * @param \Ydb\Scheme\Permissions $var
  107. * @return $this
  108. */
  109. public function setSet($var)
  110. {
  111. GPBUtil::checkMessage($var, \Ydb\Scheme\Permissions::class);
  112. $this->writeOneof(3, $var);
  113. return $this;
  114. }
  115. /**
  116. * New owner for object
  117. *
  118. * Generated from protobuf field <code>string change_owner = 4;</code>
  119. * @return string
  120. */
  121. public function getChangeOwner()
  122. {
  123. return $this->readOneof(4);
  124. }
  125. public function hasChangeOwner()
  126. {
  127. return $this->hasOneof(4);
  128. }
  129. /**
  130. * New owner for object
  131. *
  132. * Generated from protobuf field <code>string change_owner = 4;</code>
  133. * @param string $var
  134. * @return $this
  135. */
  136. public function setChangeOwner($var)
  137. {
  138. GPBUtil::checkString($var, True);
  139. $this->writeOneof(4, $var);
  140. return $this;
  141. }
  142. /**
  143. * @return string
  144. */
  145. public function getAction()
  146. {
  147. return $this->whichOneof("action");
  148. }
  149. }