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