MethodOptions.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/descriptor.proto
  4. namespace Google\Protobuf\Internal;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\GPBWire;
  7. use Google\Protobuf\Internal\RepeatedField;
  8. use Google\Protobuf\Internal\InputStream;
  9. use Google\Protobuf\Internal\GPBUtil;
  10. /**
  11. * Generated from protobuf message <code>google.protobuf.MethodOptions</code>
  12. */
  13. class MethodOptions extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Is this method deprecated?
  17. * Depending on the target platform, this can emit Deprecated annotations
  18. * for the method, or it will be completely ignored; in the very least,
  19. * this is a formalization for deprecating methods.
  20. *
  21. * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
  22. */
  23. private $deprecated = false;
  24. private $has_deprecated = false;
  25. /**
  26. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
  27. */
  28. private $idempotency_level = 0;
  29. private $has_idempotency_level = false;
  30. /**
  31. * The parser stores options it doesn't recognize here. See above.
  32. *
  33. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  34. */
  35. private $uninterpreted_option;
  36. private $has_uninterpreted_option = false;
  37. public function __construct() {
  38. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  39. parent::__construct();
  40. }
  41. /**
  42. * Is this method deprecated?
  43. * Depending on the target platform, this can emit Deprecated annotations
  44. * for the method, or it will be completely ignored; in the very least,
  45. * this is a formalization for deprecating methods.
  46. *
  47. * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
  48. * @return bool
  49. */
  50. public function getDeprecated()
  51. {
  52. return $this->deprecated;
  53. }
  54. /**
  55. * Is this method deprecated?
  56. * Depending on the target platform, this can emit Deprecated annotations
  57. * for the method, or it will be completely ignored; in the very least,
  58. * this is a formalization for deprecating methods.
  59. *
  60. * Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
  61. * @param bool $var
  62. * @return $this
  63. */
  64. public function setDeprecated($var)
  65. {
  66. GPBUtil::checkBool($var);
  67. $this->deprecated = $var;
  68. $this->has_deprecated = true;
  69. return $this;
  70. }
  71. public function hasDeprecated()
  72. {
  73. return $this->has_deprecated;
  74. }
  75. /**
  76. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
  77. * @return int
  78. */
  79. public function getIdempotencyLevel()
  80. {
  81. return $this->idempotency_level;
  82. }
  83. /**
  84. * Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
  85. * @param int $var
  86. * @return $this
  87. */
  88. public function setIdempotencyLevel($var)
  89. {
  90. GPBUtil::checkEnum($var, \Google\Protobuf\Internal\MethodOptions_IdempotencyLevel::class);
  91. $this->idempotency_level = $var;
  92. $this->has_idempotency_level = true;
  93. return $this;
  94. }
  95. public function hasIdempotencyLevel()
  96. {
  97. return $this->has_idempotency_level;
  98. }
  99. /**
  100. * The parser stores options it doesn't recognize here. See above.
  101. *
  102. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  103. * @return \Google\Protobuf\Internal\RepeatedField
  104. */
  105. public function getUninterpretedOption()
  106. {
  107. return $this->uninterpreted_option;
  108. }
  109. /**
  110. * The parser stores options it doesn't recognize here. See above.
  111. *
  112. * Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
  113. * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
  114. * @return $this
  115. */
  116. public function setUninterpretedOption($var)
  117. {
  118. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
  119. $this->uninterpreted_option = $arr;
  120. $this->has_uninterpreted_option = true;
  121. return $this;
  122. }
  123. public function hasUninterpretedOption()
  124. {
  125. return $this->has_uninterpreted_option;
  126. }
  127. }