• 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\GeneratedCodeInfo;
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.GeneratedCodeInfo.Annotation</code>
15 */
16class Annotation extends \Google\Protobuf\Internal\Message
17{
18    /**
19     * Identifies the element in the original source .proto file. This field
20     * is formatted the same as SourceCodeInfo.Location.path.
21     *
22     * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
23     */
24    private $path;
25    /**
26     * Identifies the filesystem path to the original source .proto.
27     *
28     * Generated from protobuf field <code>optional string source_file = 2;</code>
29     */
30    protected $source_file = null;
31    /**
32     * Identifies the starting offset in bytes in the generated code
33     * that relates to the identified object.
34     *
35     * Generated from protobuf field <code>optional int32 begin = 3;</code>
36     */
37    protected $begin = null;
38    /**
39     * Identifies the ending offset in bytes in the generated code that
40     * relates to the identified object. The end offset should be one past
41     * the last relevant byte (so the length of the text = end - begin).
42     *
43     * Generated from protobuf field <code>optional int32 end = 4;</code>
44     */
45    protected $end = null;
46    /**
47     * Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
48     */
49    protected $semantic = null;
50
51    /**
52     * Constructor.
53     *
54     * @param array $data {
55     *     Optional. Data for populating the Message object.
56     *
57     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $path
58     *           Identifies the element in the original source .proto file. This field
59     *           is formatted the same as SourceCodeInfo.Location.path.
60     *     @type string $source_file
61     *           Identifies the filesystem path to the original source .proto.
62     *     @type int $begin
63     *           Identifies the starting offset in bytes in the generated code
64     *           that relates to the identified object.
65     *     @type int $end
66     *           Identifies the ending offset in bytes in the generated code that
67     *           relates to the identified object. The end offset should be one past
68     *           the last relevant byte (so the length of the text = end - begin).
69     *     @type int $semantic
70     * }
71     */
72    public function __construct($data = NULL) {
73        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
74        parent::__construct($data);
75    }
76
77    /**
78     * Identifies the element in the original source .proto file. This field
79     * is formatted the same as SourceCodeInfo.Location.path.
80     *
81     * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
82     * @return \Google\Protobuf\Internal\RepeatedField
83     */
84    public function getPath()
85    {
86        return $this->path;
87    }
88
89    /**
90     * Identifies the element in the original source .proto file. This field
91     * is formatted the same as SourceCodeInfo.Location.path.
92     *
93     * Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code>
94     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
95     * @return $this
96     */
97    public function setPath($var)
98    {
99        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
100        $this->path = $arr;
101
102        return $this;
103    }
104
105    /**
106     * Identifies the filesystem path to the original source .proto.
107     *
108     * Generated from protobuf field <code>optional string source_file = 2;</code>
109     * @return string
110     */
111    public function getSourceFile()
112    {
113        return isset($this->source_file) ? $this->source_file : '';
114    }
115
116    public function hasSourceFile()
117    {
118        return isset($this->source_file);
119    }
120
121    public function clearSourceFile()
122    {
123        unset($this->source_file);
124    }
125
126    /**
127     * Identifies the filesystem path to the original source .proto.
128     *
129     * Generated from protobuf field <code>optional string source_file = 2;</code>
130     * @param string $var
131     * @return $this
132     */
133    public function setSourceFile($var)
134    {
135        GPBUtil::checkString($var, True);
136        $this->source_file = $var;
137
138        return $this;
139    }
140
141    /**
142     * Identifies the starting offset in bytes in the generated code
143     * that relates to the identified object.
144     *
145     * Generated from protobuf field <code>optional int32 begin = 3;</code>
146     * @return int
147     */
148    public function getBegin()
149    {
150        return isset($this->begin) ? $this->begin : 0;
151    }
152
153    public function hasBegin()
154    {
155        return isset($this->begin);
156    }
157
158    public function clearBegin()
159    {
160        unset($this->begin);
161    }
162
163    /**
164     * Identifies the starting offset in bytes in the generated code
165     * that relates to the identified object.
166     *
167     * Generated from protobuf field <code>optional int32 begin = 3;</code>
168     * @param int $var
169     * @return $this
170     */
171    public function setBegin($var)
172    {
173        GPBUtil::checkInt32($var);
174        $this->begin = $var;
175
176        return $this;
177    }
178
179    /**
180     * Identifies the ending offset in bytes in the generated code that
181     * relates to the identified object. The end offset should be one past
182     * the last relevant byte (so the length of the text = end - begin).
183     *
184     * Generated from protobuf field <code>optional int32 end = 4;</code>
185     * @return int
186     */
187    public function getEnd()
188    {
189        return isset($this->end) ? $this->end : 0;
190    }
191
192    public function hasEnd()
193    {
194        return isset($this->end);
195    }
196
197    public function clearEnd()
198    {
199        unset($this->end);
200    }
201
202    /**
203     * Identifies the ending offset in bytes in the generated code that
204     * relates to the identified object. The end offset should be one past
205     * the last relevant byte (so the length of the text = end - begin).
206     *
207     * Generated from protobuf field <code>optional int32 end = 4;</code>
208     * @param int $var
209     * @return $this
210     */
211    public function setEnd($var)
212    {
213        GPBUtil::checkInt32($var);
214        $this->end = $var;
215
216        return $this;
217    }
218
219    /**
220     * Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
221     * @return int
222     */
223    public function getSemantic()
224    {
225        return isset($this->semantic) ? $this->semantic : 0;
226    }
227
228    public function hasSemantic()
229    {
230        return isset($this->semantic);
231    }
232
233    public function clearSemantic()
234    {
235        unset($this->semantic);
236    }
237
238    /**
239     * Generated from protobuf field <code>optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5;</code>
240     * @param int $var
241     * @return $this
242     */
243    public function setSemantic($var)
244    {
245        GPBUtil::checkEnum($var, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation\Semantic::class);
246        $this->semantic = $var;
247
248        return $this;
249    }
250
251}
252
253// Adding a class alias for backwards compatibility with the previous class name.
254class_alias(Annotation::class, \Google\Protobuf\Internal\GeneratedCodeInfo_Annotation::class);
255
256