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