1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: google/protobuf/api.proto 4 5namespace Google\Protobuf; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * Api is a light-weight descriptor for an API Interface. 13 * Interfaces are also described as "protocol buffer services" in some contexts, 14 * such as by the "service" keyword in a .proto file, but they are different 15 * from API Services, which represent a concrete implementation of an interface 16 * as opposed to simply a description of methods and bindings. They are also 17 * sometimes simply referred to as "APIs" in other contexts, such as the name of 18 * this message itself. See https://cloud.google.com/apis/design/glossary for 19 * detailed terminology. 20 * 21 * Generated from protobuf message <code>google.protobuf.Api</code> 22 */ 23class Api extends \Google\Protobuf\Internal\Message 24{ 25 /** 26 * The fully qualified name of this interface, including package name 27 * followed by the interface's simple name. 28 * 29 * Generated from protobuf field <code>string name = 1;</code> 30 */ 31 private $name = ''; 32 /** 33 * The methods of this interface, in unspecified order. 34 * 35 * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code> 36 */ 37 private $methods; 38 /** 39 * Any metadata attached to the interface. 40 * 41 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> 42 */ 43 private $options; 44 /** 45 * A version string for this interface. If specified, must have the form 46 * `major-version.minor-version`, as in `1.10`. If the minor version is 47 * omitted, it defaults to zero. If the entire version field is empty, the 48 * major version is derived from the package name, as outlined below. If the 49 * field is not empty, the version in the package name will be verified to be 50 * consistent with what is provided here. 51 * The versioning schema uses [semantic 52 * versioning](http://semver.org) where the major version number 53 * indicates a breaking change and the minor version an additive, 54 * non-breaking change. Both version numbers are signals to users 55 * what to expect from different versions, and should be carefully 56 * chosen based on the product plan. 57 * The major version is also reflected in the package name of the 58 * interface, which must end in `v<major-version>`, as in 59 * `google.feature.v1`. For major versions 0 and 1, the suffix can 60 * be omitted. Zero major versions must only be used for 61 * experimental, non-GA interfaces. 62 * 63 * Generated from protobuf field <code>string version = 4;</code> 64 */ 65 private $version = ''; 66 /** 67 * Source context for the protocol buffer service represented by this 68 * message. 69 * 70 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> 71 */ 72 private $source_context = null; 73 /** 74 * Included interfaces. See [Mixin][]. 75 * 76 * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code> 77 */ 78 private $mixins; 79 /** 80 * The source syntax of the service. 81 * 82 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> 83 */ 84 private $syntax = 0; 85 86 /** 87 * Constructor. 88 * 89 * @param array $data { 90 * Optional. Data for populating the Message object. 91 * 92 * @type string $name 93 * The fully qualified name of this interface, including package name 94 * followed by the interface's simple name. 95 * @type \Google\Protobuf\Method[]|\Google\Protobuf\Internal\RepeatedField $methods 96 * The methods of this interface, in unspecified order. 97 * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options 98 * Any metadata attached to the interface. 99 * @type string $version 100 * A version string for this interface. If specified, must have the form 101 * `major-version.minor-version`, as in `1.10`. If the minor version is 102 * omitted, it defaults to zero. If the entire version field is empty, the 103 * major version is derived from the package name, as outlined below. If the 104 * field is not empty, the version in the package name will be verified to be 105 * consistent with what is provided here. 106 * The versioning schema uses [semantic 107 * versioning](http://semver.org) where the major version number 108 * indicates a breaking change and the minor version an additive, 109 * non-breaking change. Both version numbers are signals to users 110 * what to expect from different versions, and should be carefully 111 * chosen based on the product plan. 112 * The major version is also reflected in the package name of the 113 * interface, which must end in `v<major-version>`, as in 114 * `google.feature.v1`. For major versions 0 and 1, the suffix can 115 * be omitted. Zero major versions must only be used for 116 * experimental, non-GA interfaces. 117 * @type \Google\Protobuf\SourceContext $source_context 118 * Source context for the protocol buffer service represented by this 119 * message. 120 * @type \Google\Protobuf\Mixin[]|\Google\Protobuf\Internal\RepeatedField $mixins 121 * Included interfaces. See [Mixin][]. 122 * @type int $syntax 123 * The source syntax of the service. 124 * } 125 */ 126 public function __construct($data = NULL) { 127 \GPBMetadata\Google\Protobuf\Api::initOnce(); 128 parent::__construct($data); 129 } 130 131 /** 132 * The fully qualified name of this interface, including package name 133 * followed by the interface's simple name. 134 * 135 * Generated from protobuf field <code>string name = 1;</code> 136 * @return string 137 */ 138 public function getName() 139 { 140 return $this->name; 141 } 142 143 /** 144 * The fully qualified name of this interface, including package name 145 * followed by the interface's simple name. 146 * 147 * Generated from protobuf field <code>string name = 1;</code> 148 * @param string $var 149 * @return $this 150 */ 151 public function setName($var) 152 { 153 GPBUtil::checkString($var, True); 154 $this->name = $var; 155 156 return $this; 157 } 158 159 /** 160 * The methods of this interface, in unspecified order. 161 * 162 * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code> 163 * @return \Google\Protobuf\Internal\RepeatedField 164 */ 165 public function getMethods() 166 { 167 return $this->methods; 168 } 169 170 /** 171 * The methods of this interface, in unspecified order. 172 * 173 * Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code> 174 * @param \Google\Protobuf\Method[]|\Google\Protobuf\Internal\RepeatedField $var 175 * @return $this 176 */ 177 public function setMethods($var) 178 { 179 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class); 180 $this->methods = $arr; 181 182 return $this; 183 } 184 185 /** 186 * Any metadata attached to the interface. 187 * 188 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> 189 * @return \Google\Protobuf\Internal\RepeatedField 190 */ 191 public function getOptions() 192 { 193 return $this->options; 194 } 195 196 /** 197 * Any metadata attached to the interface. 198 * 199 * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> 200 * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var 201 * @return $this 202 */ 203 public function setOptions($var) 204 { 205 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class); 206 $this->options = $arr; 207 208 return $this; 209 } 210 211 /** 212 * A version string for this interface. If specified, must have the form 213 * `major-version.minor-version`, as in `1.10`. If the minor version is 214 * omitted, it defaults to zero. If the entire version field is empty, the 215 * major version is derived from the package name, as outlined below. If the 216 * field is not empty, the version in the package name will be verified to be 217 * consistent with what is provided here. 218 * The versioning schema uses [semantic 219 * versioning](http://semver.org) where the major version number 220 * indicates a breaking change and the minor version an additive, 221 * non-breaking change. Both version numbers are signals to users 222 * what to expect from different versions, and should be carefully 223 * chosen based on the product plan. 224 * The major version is also reflected in the package name of the 225 * interface, which must end in `v<major-version>`, as in 226 * `google.feature.v1`. For major versions 0 and 1, the suffix can 227 * be omitted. Zero major versions must only be used for 228 * experimental, non-GA interfaces. 229 * 230 * Generated from protobuf field <code>string version = 4;</code> 231 * @return string 232 */ 233 public function getVersion() 234 { 235 return $this->version; 236 } 237 238 /** 239 * A version string for this interface. If specified, must have the form 240 * `major-version.minor-version`, as in `1.10`. If the minor version is 241 * omitted, it defaults to zero. If the entire version field is empty, the 242 * major version is derived from the package name, as outlined below. If the 243 * field is not empty, the version in the package name will be verified to be 244 * consistent with what is provided here. 245 * The versioning schema uses [semantic 246 * versioning](http://semver.org) where the major version number 247 * indicates a breaking change and the minor version an additive, 248 * non-breaking change. Both version numbers are signals to users 249 * what to expect from different versions, and should be carefully 250 * chosen based on the product plan. 251 * The major version is also reflected in the package name of the 252 * interface, which must end in `v<major-version>`, as in 253 * `google.feature.v1`. For major versions 0 and 1, the suffix can 254 * be omitted. Zero major versions must only be used for 255 * experimental, non-GA interfaces. 256 * 257 * Generated from protobuf field <code>string version = 4;</code> 258 * @param string $var 259 * @return $this 260 */ 261 public function setVersion($var) 262 { 263 GPBUtil::checkString($var, True); 264 $this->version = $var; 265 266 return $this; 267 } 268 269 /** 270 * Source context for the protocol buffer service represented by this 271 * message. 272 * 273 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> 274 * @return \Google\Protobuf\SourceContext 275 */ 276 public function getSourceContext() 277 { 278 return $this->source_context; 279 } 280 281 /** 282 * Source context for the protocol buffer service represented by this 283 * message. 284 * 285 * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code> 286 * @param \Google\Protobuf\SourceContext $var 287 * @return $this 288 */ 289 public function setSourceContext($var) 290 { 291 GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class); 292 $this->source_context = $var; 293 294 return $this; 295 } 296 297 /** 298 * Included interfaces. See [Mixin][]. 299 * 300 * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code> 301 * @return \Google\Protobuf\Internal\RepeatedField 302 */ 303 public function getMixins() 304 { 305 return $this->mixins; 306 } 307 308 /** 309 * Included interfaces. See [Mixin][]. 310 * 311 * Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code> 312 * @param \Google\Protobuf\Mixin[]|\Google\Protobuf\Internal\RepeatedField $var 313 * @return $this 314 */ 315 public function setMixins($var) 316 { 317 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class); 318 $this->mixins = $arr; 319 320 return $this; 321 } 322 323 /** 324 * The source syntax of the service. 325 * 326 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> 327 * @return int 328 */ 329 public function getSyntax() 330 { 331 return $this->syntax; 332 } 333 334 /** 335 * The source syntax of the service. 336 * 337 * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code> 338 * @param int $var 339 * @return $this 340 */ 341 public function setSyntax($var) 342 { 343 GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class); 344 $this->syntax = $var; 345 346 return $this; 347 } 348 349} 350 351