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