• 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\UninterpretedOption;
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 * The name of the uninterpreted option.  Each string represents a segment in
15 * a dot-separated name.  is_extension is true iff a segment represents an
16 * extension (denoted with parentheses in options specs in .proto files).
17 * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
18 * "foo.(bar.baz).qux".
19 *
20 * Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
21 */
22class NamePart extends \Google\Protobuf\Internal\Message
23{
24    /**
25     * Generated from protobuf field <code>required string name_part = 1;</code>
26     */
27    protected $name_part = null;
28    /**
29     * Generated from protobuf field <code>required bool is_extension = 2;</code>
30     */
31    protected $is_extension = null;
32
33    /**
34     * Constructor.
35     *
36     * @param array $data {
37     *     Optional. Data for populating the Message object.
38     *
39     *     @type string $name_part
40     *     @type bool $is_extension
41     * }
42     */
43    public function __construct($data = NULL) {
44        \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
45        parent::__construct($data);
46    }
47
48    /**
49     * Generated from protobuf field <code>required string name_part = 1;</code>
50     * @return string
51     */
52    public function getNamePart()
53    {
54        return isset($this->name_part) ? $this->name_part : '';
55    }
56
57    public function hasNamePart()
58    {
59        return isset($this->name_part);
60    }
61
62    public function clearNamePart()
63    {
64        unset($this->name_part);
65    }
66
67    /**
68     * Generated from protobuf field <code>required string name_part = 1;</code>
69     * @param string $var
70     * @return $this
71     */
72    public function setNamePart($var)
73    {
74        GPBUtil::checkString($var, True);
75        $this->name_part = $var;
76
77        return $this;
78    }
79
80    /**
81     * Generated from protobuf field <code>required bool is_extension = 2;</code>
82     * @return bool
83     */
84    public function getIsExtension()
85    {
86        return isset($this->is_extension) ? $this->is_extension : false;
87    }
88
89    public function hasIsExtension()
90    {
91        return isset($this->is_extension);
92    }
93
94    public function clearIsExtension()
95    {
96        unset($this->is_extension);
97    }
98
99    /**
100     * Generated from protobuf field <code>required bool is_extension = 2;</code>
101     * @param bool $var
102     * @return $this
103     */
104    public function setIsExtension($var)
105    {
106        GPBUtil::checkBool($var);
107        $this->is_extension = $var;
108
109        return $this;
110    }
111
112}
113
114// Adding a class alias for backwards compatibility with the previous class name.
115class_alias(NamePart::class, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);
116
117