avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/protobuf/descriptor.proto |
| 4 | |
| 5 | namespace Google\Protobuf\Internal\UninterpretedOption; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\GPBWire; |
| 9 | use Google\Protobuf\Internal\RepeatedField; |
| 10 | use Google\Protobuf\Internal\InputStream; |
| 11 | use 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 | */ |
| 22 | class 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 = ''; |
| 28 | private $has_name_part = false; |
| 29 | /** |
| 30 | * Generated from protobuf field <code>required bool is_extension = 2;</code> |
| 31 | */ |
| 32 | protected $is_extension = false; |
| 33 | private $has_is_extension = false; |
| 34 | |
| 35 | /** |
| 36 | * Constructor. |
| 37 | * |
| 38 | * @param array $data { |
| 39 | * Optional. Data for populating the Message object. |
| 40 | * |
| 41 | * @type string $name_part |
| 42 | * @type bool $is_extension |
| 43 | * } |
| 44 | */ |
| 45 | public function __construct($data = NULL) { |
| 46 | \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); |
| 47 | parent::__construct($data); |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Generated from protobuf field <code>required string name_part = 1;</code> |
| 52 | * @return string |
| 53 | */ |
| 54 | public function getNamePart() |
| 55 | { |
| 56 | return $this->name_part; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Generated from protobuf field <code>required string name_part = 1;</code> |
| 61 | * @param string $var |
| 62 | * @return $this |
| 63 | */ |
| 64 | public function setNamePart($var) |
| 65 | { |
| 66 | GPBUtil::checkString($var, True); |
| 67 | $this->name_part = $var; |
| 68 | $this->has_name_part = true; |
| 69 | |
| 70 | return $this; |
| 71 | } |
| 72 | |
| 73 | public function hasNamePart() |
| 74 | { |
| 75 | return $this->has_name_part; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Generated from protobuf field <code>required bool is_extension = 2;</code> |
| 80 | * @return bool |
| 81 | */ |
| 82 | public function getIsExtension() |
| 83 | { |
| 84 | return $this->is_extension; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Generated from protobuf field <code>required bool is_extension = 2;</code> |
| 89 | * @param bool $var |
| 90 | * @return $this |
| 91 | */ |
| 92 | public function setIsExtension($var) |
| 93 | { |
| 94 | GPBUtil::checkBool($var); |
| 95 | $this->is_extension = $var; |
| 96 | $this->has_is_extension = true; |
| 97 | |
| 98 | return $this; |
| 99 | } |
| 100 | |
| 101 | public function hasIsExtension() |
| 102 | { |
| 103 | return $this->has_is_extension; |
| 104 | } |
| 105 | |
| 106 | } |
| 107 | |
| 108 | // Adding a class alias for backwards compatibility with the previous class name. |
| 109 | class_alias(NamePart::class, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class); |
| 110 | |