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 * Describes a oneof. 15 * 16 * Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code> 17 */ 18class OneofDescriptorProto extends \Google\Protobuf\Internal\Message 19{ 20 /** 21 * Generated from protobuf field <code>optional string name = 1;</code> 22 */ 23 protected $name = null; 24 /** 25 * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code> 26 */ 27 protected $options = null; 28 29 /** 30 * Constructor. 31 * 32 * @param array $data { 33 * Optional. Data for populating the Message object. 34 * 35 * @type string $name 36 * @type \Google\Protobuf\Internal\OneofOptions $options 37 * } 38 */ 39 public function __construct($data = NULL) { 40 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); 41 parent::__construct($data); 42 } 43 44 /** 45 * Generated from protobuf field <code>optional string name = 1;</code> 46 * @return string 47 */ 48 public function getName() 49 { 50 return isset($this->name) ? $this->name : ''; 51 } 52 53 public function hasName() 54 { 55 return isset($this->name); 56 } 57 58 public function clearName() 59 { 60 unset($this->name); 61 } 62 63 /** 64 * Generated from protobuf field <code>optional string name = 1;</code> 65 * @param string $var 66 * @return $this 67 */ 68 public function setName($var) 69 { 70 GPBUtil::checkString($var, True); 71 $this->name = $var; 72 73 return $this; 74 } 75 76 /** 77 * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code> 78 * @return \Google\Protobuf\Internal\OneofOptions 79 */ 80 public function getOptions() 81 { 82 return isset($this->options) ? $this->options : null; 83 } 84 85 public function hasOptions() 86 { 87 return isset($this->options); 88 } 89 90 public function clearOptions() 91 { 92 unset($this->options); 93 } 94 95 /** 96 * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code> 97 * @param \Google\Protobuf\Internal\OneofOptions $var 98 * @return $this 99 */ 100 public function setOptions($var) 101 { 102 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class); 103 $this->options = $var; 104 105 return $this; 106 } 107 108} 109 110