• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 value within an enum.
15 *
16 * Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
17 */
18class EnumValueDescriptorProto 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 int32 number = 2;</code>
26     */
27    protected $number = null;
28    /**
29     * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
30     */
31    protected $options = null;
32
33    /**
34     * Constructor.
35     *
36     * @param array $data {
37     *     Optional. Data for populating the Message object.
38     *
39     *     @type string $name
40     *     @type int $number
41     *     @type \Google\Protobuf\Internal\EnumValueOptions $options
42     * }
43     */
44    public function __construct($data = NULL) {
45        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
46        parent::__construct($data);
47    }
48
49    /**
50     * Generated from protobuf field <code>optional string name = 1;</code>
51     * @return string
52     */
53    public function getName()
54    {
55        return isset($this->name) ? $this->name : '';
56    }
57
58    public function hasName()
59    {
60        return isset($this->name);
61    }
62
63    public function clearName()
64    {
65        unset($this->name);
66    }
67
68    /**
69     * Generated from protobuf field <code>optional string name = 1;</code>
70     * @param string $var
71     * @return $this
72     */
73    public function setName($var)
74    {
75        GPBUtil::checkString($var, True);
76        $this->name = $var;
77
78        return $this;
79    }
80
81    /**
82     * Generated from protobuf field <code>optional int32 number = 2;</code>
83     * @return int
84     */
85    public function getNumber()
86    {
87        return isset($this->number) ? $this->number : 0;
88    }
89
90    public function hasNumber()
91    {
92        return isset($this->number);
93    }
94
95    public function clearNumber()
96    {
97        unset($this->number);
98    }
99
100    /**
101     * Generated from protobuf field <code>optional int32 number = 2;</code>
102     * @param int $var
103     * @return $this
104     */
105    public function setNumber($var)
106    {
107        GPBUtil::checkInt32($var);
108        $this->number = $var;
109
110        return $this;
111    }
112
113    /**
114     * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
115     * @return \Google\Protobuf\Internal\EnumValueOptions
116     */
117    public function getOptions()
118    {
119        return isset($this->options) ? $this->options : null;
120    }
121
122    public function hasOptions()
123    {
124        return isset($this->options);
125    }
126
127    public function clearOptions()
128    {
129        unset($this->options);
130    }
131
132    /**
133     * Generated from protobuf field <code>optional .google.protobuf.EnumValueOptions options = 3;</code>
134     * @param \Google\Protobuf\Internal\EnumValueOptions $var
135     * @return $this
136     */
137    public function setOptions($var)
138    {
139        GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumValueOptions::class);
140        $this->options = $var;
141
142        return $this;
143    }
144
145}
146
147