1ffe3c632Sopenharmony_ci<?php 2ffe3c632Sopenharmony_ci# Generated by the protocol buffer compiler. DO NOT EDIT! 3ffe3c632Sopenharmony_ci# source: google/protobuf/descriptor.proto 4ffe3c632Sopenharmony_ci 5ffe3c632Sopenharmony_cinamespace Google\Protobuf\Internal; 6ffe3c632Sopenharmony_ci 7ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\GPBType; 8ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\GPBWire; 9ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\RepeatedField; 10ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\InputStream; 11ffe3c632Sopenharmony_ciuse Google\Protobuf\Internal\GPBUtil; 12ffe3c632Sopenharmony_ci 13ffe3c632Sopenharmony_ci/** 14ffe3c632Sopenharmony_ci * Describes a field within a message. 15ffe3c632Sopenharmony_ci * 16ffe3c632Sopenharmony_ci * Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code> 17ffe3c632Sopenharmony_ci */ 18ffe3c632Sopenharmony_ciclass FieldDescriptorProto extends \Google\Protobuf\Internal\Message 19ffe3c632Sopenharmony_ci{ 20ffe3c632Sopenharmony_ci /** 21ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string name = 1;</code> 22ffe3c632Sopenharmony_ci */ 23ffe3c632Sopenharmony_ci protected $name = null; 24ffe3c632Sopenharmony_ci /** 25ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 number = 3;</code> 26ffe3c632Sopenharmony_ci */ 27ffe3c632Sopenharmony_ci protected $number = null; 28ffe3c632Sopenharmony_ci /** 29ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code> 30ffe3c632Sopenharmony_ci */ 31ffe3c632Sopenharmony_ci protected $label = null; 32ffe3c632Sopenharmony_ci /** 33ffe3c632Sopenharmony_ci * If type_name is set, this need not be set. If both this and type_name 34ffe3c632Sopenharmony_ci * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 35ffe3c632Sopenharmony_ci * 36ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code> 37ffe3c632Sopenharmony_ci */ 38ffe3c632Sopenharmony_ci protected $type = null; 39ffe3c632Sopenharmony_ci /** 40ffe3c632Sopenharmony_ci * For message and enum types, this is the name of the type. If the name 41ffe3c632Sopenharmony_ci * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 42ffe3c632Sopenharmony_ci * rules are used to find the type (i.e. first the nested types within this 43ffe3c632Sopenharmony_ci * message are searched, then within the parent, on up to the root 44ffe3c632Sopenharmony_ci * namespace). 45ffe3c632Sopenharmony_ci * 46ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string type_name = 6;</code> 47ffe3c632Sopenharmony_ci */ 48ffe3c632Sopenharmony_ci protected $type_name = null; 49ffe3c632Sopenharmony_ci /** 50ffe3c632Sopenharmony_ci * For extensions, this is the name of the type being extended. It is 51ffe3c632Sopenharmony_ci * resolved in the same manner as type_name. 52ffe3c632Sopenharmony_ci * 53ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string extendee = 2;</code> 54ffe3c632Sopenharmony_ci */ 55ffe3c632Sopenharmony_ci protected $extendee = null; 56ffe3c632Sopenharmony_ci /** 57ffe3c632Sopenharmony_ci * For numeric types, contains the original text representation of the value. 58ffe3c632Sopenharmony_ci * For booleans, "true" or "false". 59ffe3c632Sopenharmony_ci * For strings, contains the default text contents (not escaped in any way). 60ffe3c632Sopenharmony_ci * For bytes, contains the C escaped value. All bytes >= 128 are escaped. 61ffe3c632Sopenharmony_ci * TODO(kenton): Base-64 encode? 62ffe3c632Sopenharmony_ci * 63ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string default_value = 7;</code> 64ffe3c632Sopenharmony_ci */ 65ffe3c632Sopenharmony_ci protected $default_value = null; 66ffe3c632Sopenharmony_ci /** 67ffe3c632Sopenharmony_ci * If set, gives the index of a oneof in the containing type's oneof_decl 68ffe3c632Sopenharmony_ci * list. This field is a member of that oneof. 69ffe3c632Sopenharmony_ci * 70ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 oneof_index = 9;</code> 71ffe3c632Sopenharmony_ci */ 72ffe3c632Sopenharmony_ci protected $oneof_index = null; 73ffe3c632Sopenharmony_ci /** 74ffe3c632Sopenharmony_ci * JSON name of this field. The value is set by protocol compiler. If the 75ffe3c632Sopenharmony_ci * user has set a "json_name" option on this field, that option's value 76ffe3c632Sopenharmony_ci * will be used. Otherwise, it's deduced from the field's name by converting 77ffe3c632Sopenharmony_ci * it to camelCase. 78ffe3c632Sopenharmony_ci * 79ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string json_name = 10;</code> 80ffe3c632Sopenharmony_ci */ 81ffe3c632Sopenharmony_ci protected $json_name = null; 82ffe3c632Sopenharmony_ci /** 83ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code> 84ffe3c632Sopenharmony_ci */ 85ffe3c632Sopenharmony_ci protected $options = null; 86ffe3c632Sopenharmony_ci /** 87ffe3c632Sopenharmony_ci * If true, this is a proto3 "optional". When a proto3 field is optional, it 88ffe3c632Sopenharmony_ci * tracks presence regardless of field type. 89ffe3c632Sopenharmony_ci * When proto3_optional is true, this field must be belong to a oneof to 90ffe3c632Sopenharmony_ci * signal to old proto3 clients that presence is tracked for this field. This 91ffe3c632Sopenharmony_ci * oneof is known as a "synthetic" oneof, and this field must be its sole 92ffe3c632Sopenharmony_ci * member (each proto3 optional field gets its own synthetic oneof). Synthetic 93ffe3c632Sopenharmony_ci * oneofs exist in the descriptor only, and do not generate any API. Synthetic 94ffe3c632Sopenharmony_ci * oneofs must be ordered after all "real" oneofs. 95ffe3c632Sopenharmony_ci * For message fields, proto3_optional doesn't create any semantic change, 96ffe3c632Sopenharmony_ci * since non-repeated message fields always track presence. However it still 97ffe3c632Sopenharmony_ci * indicates the semantic detail of whether the user wrote "optional" or not. 98ffe3c632Sopenharmony_ci * This can be useful for round-tripping the .proto file. For consistency we 99ffe3c632Sopenharmony_ci * give message fields a synthetic oneof also, even though it is not required 100ffe3c632Sopenharmony_ci * to track presence. This is especially important because the parser can't 101ffe3c632Sopenharmony_ci * tell if a field is a message or an enum, so it must always create a 102ffe3c632Sopenharmony_ci * synthetic oneof. 103ffe3c632Sopenharmony_ci * Proto2 optional fields do not set this flag, because they already indicate 104ffe3c632Sopenharmony_ci * optional with `LABEL_OPTIONAL`. 105ffe3c632Sopenharmony_ci * 106ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional bool proto3_optional = 17;</code> 107ffe3c632Sopenharmony_ci */ 108ffe3c632Sopenharmony_ci protected $proto3_optional = null; 109ffe3c632Sopenharmony_ci 110ffe3c632Sopenharmony_ci /** 111ffe3c632Sopenharmony_ci * Constructor. 112ffe3c632Sopenharmony_ci * 113ffe3c632Sopenharmony_ci * @param array $data { 114ffe3c632Sopenharmony_ci * Optional. Data for populating the Message object. 115ffe3c632Sopenharmony_ci * 116ffe3c632Sopenharmony_ci * @type string $name 117ffe3c632Sopenharmony_ci * @type int $number 118ffe3c632Sopenharmony_ci * @type int $label 119ffe3c632Sopenharmony_ci * @type int $type 120ffe3c632Sopenharmony_ci * If type_name is set, this need not be set. If both this and type_name 121ffe3c632Sopenharmony_ci * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 122ffe3c632Sopenharmony_ci * @type string $type_name 123ffe3c632Sopenharmony_ci * For message and enum types, this is the name of the type. If the name 124ffe3c632Sopenharmony_ci * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 125ffe3c632Sopenharmony_ci * rules are used to find the type (i.e. first the nested types within this 126ffe3c632Sopenharmony_ci * message are searched, then within the parent, on up to the root 127ffe3c632Sopenharmony_ci * namespace). 128ffe3c632Sopenharmony_ci * @type string $extendee 129ffe3c632Sopenharmony_ci * For extensions, this is the name of the type being extended. It is 130ffe3c632Sopenharmony_ci * resolved in the same manner as type_name. 131ffe3c632Sopenharmony_ci * @type string $default_value 132ffe3c632Sopenharmony_ci * For numeric types, contains the original text representation of the value. 133ffe3c632Sopenharmony_ci * For booleans, "true" or "false". 134ffe3c632Sopenharmony_ci * For strings, contains the default text contents (not escaped in any way). 135ffe3c632Sopenharmony_ci * For bytes, contains the C escaped value. All bytes >= 128 are escaped. 136ffe3c632Sopenharmony_ci * TODO(kenton): Base-64 encode? 137ffe3c632Sopenharmony_ci * @type int $oneof_index 138ffe3c632Sopenharmony_ci * If set, gives the index of a oneof in the containing type's oneof_decl 139ffe3c632Sopenharmony_ci * list. This field is a member of that oneof. 140ffe3c632Sopenharmony_ci * @type string $json_name 141ffe3c632Sopenharmony_ci * JSON name of this field. The value is set by protocol compiler. If the 142ffe3c632Sopenharmony_ci * user has set a "json_name" option on this field, that option's value 143ffe3c632Sopenharmony_ci * will be used. Otherwise, it's deduced from the field's name by converting 144ffe3c632Sopenharmony_ci * it to camelCase. 145ffe3c632Sopenharmony_ci * @type \Google\Protobuf\Internal\FieldOptions $options 146ffe3c632Sopenharmony_ci * @type bool $proto3_optional 147ffe3c632Sopenharmony_ci * If true, this is a proto3 "optional". When a proto3 field is optional, it 148ffe3c632Sopenharmony_ci * tracks presence regardless of field type. 149ffe3c632Sopenharmony_ci * When proto3_optional is true, this field must be belong to a oneof to 150ffe3c632Sopenharmony_ci * signal to old proto3 clients that presence is tracked for this field. This 151ffe3c632Sopenharmony_ci * oneof is known as a "synthetic" oneof, and this field must be its sole 152ffe3c632Sopenharmony_ci * member (each proto3 optional field gets its own synthetic oneof). Synthetic 153ffe3c632Sopenharmony_ci * oneofs exist in the descriptor only, and do not generate any API. Synthetic 154ffe3c632Sopenharmony_ci * oneofs must be ordered after all "real" oneofs. 155ffe3c632Sopenharmony_ci * For message fields, proto3_optional doesn't create any semantic change, 156ffe3c632Sopenharmony_ci * since non-repeated message fields always track presence. However it still 157ffe3c632Sopenharmony_ci * indicates the semantic detail of whether the user wrote "optional" or not. 158ffe3c632Sopenharmony_ci * This can be useful for round-tripping the .proto file. For consistency we 159ffe3c632Sopenharmony_ci * give message fields a synthetic oneof also, even though it is not required 160ffe3c632Sopenharmony_ci * to track presence. This is especially important because the parser can't 161ffe3c632Sopenharmony_ci * tell if a field is a message or an enum, so it must always create a 162ffe3c632Sopenharmony_ci * synthetic oneof. 163ffe3c632Sopenharmony_ci * Proto2 optional fields do not set this flag, because they already indicate 164ffe3c632Sopenharmony_ci * optional with `LABEL_OPTIONAL`. 165ffe3c632Sopenharmony_ci * } 166ffe3c632Sopenharmony_ci */ 167ffe3c632Sopenharmony_ci public function __construct($data = NULL) { 168ffe3c632Sopenharmony_ci \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); 169ffe3c632Sopenharmony_ci parent::__construct($data); 170ffe3c632Sopenharmony_ci } 171ffe3c632Sopenharmony_ci 172ffe3c632Sopenharmony_ci /** 173ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string name = 1;</code> 174ffe3c632Sopenharmony_ci * @return string 175ffe3c632Sopenharmony_ci */ 176ffe3c632Sopenharmony_ci public function getName() 177ffe3c632Sopenharmony_ci { 178ffe3c632Sopenharmony_ci return isset($this->name) ? $this->name : ''; 179ffe3c632Sopenharmony_ci } 180ffe3c632Sopenharmony_ci 181ffe3c632Sopenharmony_ci public function hasName() 182ffe3c632Sopenharmony_ci { 183ffe3c632Sopenharmony_ci return isset($this->name); 184ffe3c632Sopenharmony_ci } 185ffe3c632Sopenharmony_ci 186ffe3c632Sopenharmony_ci public function clearName() 187ffe3c632Sopenharmony_ci { 188ffe3c632Sopenharmony_ci unset($this->name); 189ffe3c632Sopenharmony_ci } 190ffe3c632Sopenharmony_ci 191ffe3c632Sopenharmony_ci /** 192ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string name = 1;</code> 193ffe3c632Sopenharmony_ci * @param string $var 194ffe3c632Sopenharmony_ci * @return $this 195ffe3c632Sopenharmony_ci */ 196ffe3c632Sopenharmony_ci public function setName($var) 197ffe3c632Sopenharmony_ci { 198ffe3c632Sopenharmony_ci GPBUtil::checkString($var, True); 199ffe3c632Sopenharmony_ci $this->name = $var; 200ffe3c632Sopenharmony_ci 201ffe3c632Sopenharmony_ci return $this; 202ffe3c632Sopenharmony_ci } 203ffe3c632Sopenharmony_ci 204ffe3c632Sopenharmony_ci /** 205ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 number = 3;</code> 206ffe3c632Sopenharmony_ci * @return int 207ffe3c632Sopenharmony_ci */ 208ffe3c632Sopenharmony_ci public function getNumber() 209ffe3c632Sopenharmony_ci { 210ffe3c632Sopenharmony_ci return isset($this->number) ? $this->number : 0; 211ffe3c632Sopenharmony_ci } 212ffe3c632Sopenharmony_ci 213ffe3c632Sopenharmony_ci public function hasNumber() 214ffe3c632Sopenharmony_ci { 215ffe3c632Sopenharmony_ci return isset($this->number); 216ffe3c632Sopenharmony_ci } 217ffe3c632Sopenharmony_ci 218ffe3c632Sopenharmony_ci public function clearNumber() 219ffe3c632Sopenharmony_ci { 220ffe3c632Sopenharmony_ci unset($this->number); 221ffe3c632Sopenharmony_ci } 222ffe3c632Sopenharmony_ci 223ffe3c632Sopenharmony_ci /** 224ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 number = 3;</code> 225ffe3c632Sopenharmony_ci * @param int $var 226ffe3c632Sopenharmony_ci * @return $this 227ffe3c632Sopenharmony_ci */ 228ffe3c632Sopenharmony_ci public function setNumber($var) 229ffe3c632Sopenharmony_ci { 230ffe3c632Sopenharmony_ci GPBUtil::checkInt32($var); 231ffe3c632Sopenharmony_ci $this->number = $var; 232ffe3c632Sopenharmony_ci 233ffe3c632Sopenharmony_ci return $this; 234ffe3c632Sopenharmony_ci } 235ffe3c632Sopenharmony_ci 236ffe3c632Sopenharmony_ci /** 237ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code> 238ffe3c632Sopenharmony_ci * @return int 239ffe3c632Sopenharmony_ci */ 240ffe3c632Sopenharmony_ci public function getLabel() 241ffe3c632Sopenharmony_ci { 242ffe3c632Sopenharmony_ci return isset($this->label) ? $this->label : 0; 243ffe3c632Sopenharmony_ci } 244ffe3c632Sopenharmony_ci 245ffe3c632Sopenharmony_ci public function hasLabel() 246ffe3c632Sopenharmony_ci { 247ffe3c632Sopenharmony_ci return isset($this->label); 248ffe3c632Sopenharmony_ci } 249ffe3c632Sopenharmony_ci 250ffe3c632Sopenharmony_ci public function clearLabel() 251ffe3c632Sopenharmony_ci { 252ffe3c632Sopenharmony_ci unset($this->label); 253ffe3c632Sopenharmony_ci } 254ffe3c632Sopenharmony_ci 255ffe3c632Sopenharmony_ci /** 256ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Label label = 4;</code> 257ffe3c632Sopenharmony_ci * @param int $var 258ffe3c632Sopenharmony_ci * @return $this 259ffe3c632Sopenharmony_ci */ 260ffe3c632Sopenharmony_ci public function setLabel($var) 261ffe3c632Sopenharmony_ci { 262ffe3c632Sopenharmony_ci GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Label::class); 263ffe3c632Sopenharmony_ci $this->label = $var; 264ffe3c632Sopenharmony_ci 265ffe3c632Sopenharmony_ci return $this; 266ffe3c632Sopenharmony_ci } 267ffe3c632Sopenharmony_ci 268ffe3c632Sopenharmony_ci /** 269ffe3c632Sopenharmony_ci * If type_name is set, this need not be set. If both this and type_name 270ffe3c632Sopenharmony_ci * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 271ffe3c632Sopenharmony_ci * 272ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code> 273ffe3c632Sopenharmony_ci * @return int 274ffe3c632Sopenharmony_ci */ 275ffe3c632Sopenharmony_ci public function getType() 276ffe3c632Sopenharmony_ci { 277ffe3c632Sopenharmony_ci return isset($this->type) ? $this->type : 0; 278ffe3c632Sopenharmony_ci } 279ffe3c632Sopenharmony_ci 280ffe3c632Sopenharmony_ci public function hasType() 281ffe3c632Sopenharmony_ci { 282ffe3c632Sopenharmony_ci return isset($this->type); 283ffe3c632Sopenharmony_ci } 284ffe3c632Sopenharmony_ci 285ffe3c632Sopenharmony_ci public function clearType() 286ffe3c632Sopenharmony_ci { 287ffe3c632Sopenharmony_ci unset($this->type); 288ffe3c632Sopenharmony_ci } 289ffe3c632Sopenharmony_ci 290ffe3c632Sopenharmony_ci /** 291ffe3c632Sopenharmony_ci * If type_name is set, this need not be set. If both this and type_name 292ffe3c632Sopenharmony_ci * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 293ffe3c632Sopenharmony_ci * 294ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code> 295ffe3c632Sopenharmony_ci * @param int $var 296ffe3c632Sopenharmony_ci * @return $this 297ffe3c632Sopenharmony_ci */ 298ffe3c632Sopenharmony_ci public function setType($var) 299ffe3c632Sopenharmony_ci { 300ffe3c632Sopenharmony_ci GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto\Type::class); 301ffe3c632Sopenharmony_ci $this->type = $var; 302ffe3c632Sopenharmony_ci 303ffe3c632Sopenharmony_ci return $this; 304ffe3c632Sopenharmony_ci } 305ffe3c632Sopenharmony_ci 306ffe3c632Sopenharmony_ci /** 307ffe3c632Sopenharmony_ci * For message and enum types, this is the name of the type. If the name 308ffe3c632Sopenharmony_ci * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 309ffe3c632Sopenharmony_ci * rules are used to find the type (i.e. first the nested types within this 310ffe3c632Sopenharmony_ci * message are searched, then within the parent, on up to the root 311ffe3c632Sopenharmony_ci * namespace). 312ffe3c632Sopenharmony_ci * 313ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string type_name = 6;</code> 314ffe3c632Sopenharmony_ci * @return string 315ffe3c632Sopenharmony_ci */ 316ffe3c632Sopenharmony_ci public function getTypeName() 317ffe3c632Sopenharmony_ci { 318ffe3c632Sopenharmony_ci return isset($this->type_name) ? $this->type_name : ''; 319ffe3c632Sopenharmony_ci } 320ffe3c632Sopenharmony_ci 321ffe3c632Sopenharmony_ci public function hasTypeName() 322ffe3c632Sopenharmony_ci { 323ffe3c632Sopenharmony_ci return isset($this->type_name); 324ffe3c632Sopenharmony_ci } 325ffe3c632Sopenharmony_ci 326ffe3c632Sopenharmony_ci public function clearTypeName() 327ffe3c632Sopenharmony_ci { 328ffe3c632Sopenharmony_ci unset($this->type_name); 329ffe3c632Sopenharmony_ci } 330ffe3c632Sopenharmony_ci 331ffe3c632Sopenharmony_ci /** 332ffe3c632Sopenharmony_ci * For message and enum types, this is the name of the type. If the name 333ffe3c632Sopenharmony_ci * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 334ffe3c632Sopenharmony_ci * rules are used to find the type (i.e. first the nested types within this 335ffe3c632Sopenharmony_ci * message are searched, then within the parent, on up to the root 336ffe3c632Sopenharmony_ci * namespace). 337ffe3c632Sopenharmony_ci * 338ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string type_name = 6;</code> 339ffe3c632Sopenharmony_ci * @param string $var 340ffe3c632Sopenharmony_ci * @return $this 341ffe3c632Sopenharmony_ci */ 342ffe3c632Sopenharmony_ci public function setTypeName($var) 343ffe3c632Sopenharmony_ci { 344ffe3c632Sopenharmony_ci GPBUtil::checkString($var, True); 345ffe3c632Sopenharmony_ci $this->type_name = $var; 346ffe3c632Sopenharmony_ci 347ffe3c632Sopenharmony_ci return $this; 348ffe3c632Sopenharmony_ci } 349ffe3c632Sopenharmony_ci 350ffe3c632Sopenharmony_ci /** 351ffe3c632Sopenharmony_ci * For extensions, this is the name of the type being extended. It is 352ffe3c632Sopenharmony_ci * resolved in the same manner as type_name. 353ffe3c632Sopenharmony_ci * 354ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string extendee = 2;</code> 355ffe3c632Sopenharmony_ci * @return string 356ffe3c632Sopenharmony_ci */ 357ffe3c632Sopenharmony_ci public function getExtendee() 358ffe3c632Sopenharmony_ci { 359ffe3c632Sopenharmony_ci return isset($this->extendee) ? $this->extendee : ''; 360ffe3c632Sopenharmony_ci } 361ffe3c632Sopenharmony_ci 362ffe3c632Sopenharmony_ci public function hasExtendee() 363ffe3c632Sopenharmony_ci { 364ffe3c632Sopenharmony_ci return isset($this->extendee); 365ffe3c632Sopenharmony_ci } 366ffe3c632Sopenharmony_ci 367ffe3c632Sopenharmony_ci public function clearExtendee() 368ffe3c632Sopenharmony_ci { 369ffe3c632Sopenharmony_ci unset($this->extendee); 370ffe3c632Sopenharmony_ci } 371ffe3c632Sopenharmony_ci 372ffe3c632Sopenharmony_ci /** 373ffe3c632Sopenharmony_ci * For extensions, this is the name of the type being extended. It is 374ffe3c632Sopenharmony_ci * resolved in the same manner as type_name. 375ffe3c632Sopenharmony_ci * 376ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string extendee = 2;</code> 377ffe3c632Sopenharmony_ci * @param string $var 378ffe3c632Sopenharmony_ci * @return $this 379ffe3c632Sopenharmony_ci */ 380ffe3c632Sopenharmony_ci public function setExtendee($var) 381ffe3c632Sopenharmony_ci { 382ffe3c632Sopenharmony_ci GPBUtil::checkString($var, True); 383ffe3c632Sopenharmony_ci $this->extendee = $var; 384ffe3c632Sopenharmony_ci 385ffe3c632Sopenharmony_ci return $this; 386ffe3c632Sopenharmony_ci } 387ffe3c632Sopenharmony_ci 388ffe3c632Sopenharmony_ci /** 389ffe3c632Sopenharmony_ci * For numeric types, contains the original text representation of the value. 390ffe3c632Sopenharmony_ci * For booleans, "true" or "false". 391ffe3c632Sopenharmony_ci * For strings, contains the default text contents (not escaped in any way). 392ffe3c632Sopenharmony_ci * For bytes, contains the C escaped value. All bytes >= 128 are escaped. 393ffe3c632Sopenharmony_ci * TODO(kenton): Base-64 encode? 394ffe3c632Sopenharmony_ci * 395ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string default_value = 7;</code> 396ffe3c632Sopenharmony_ci * @return string 397ffe3c632Sopenharmony_ci */ 398ffe3c632Sopenharmony_ci public function getDefaultValue() 399ffe3c632Sopenharmony_ci { 400ffe3c632Sopenharmony_ci return isset($this->default_value) ? $this->default_value : ''; 401ffe3c632Sopenharmony_ci } 402ffe3c632Sopenharmony_ci 403ffe3c632Sopenharmony_ci public function hasDefaultValue() 404ffe3c632Sopenharmony_ci { 405ffe3c632Sopenharmony_ci return isset($this->default_value); 406ffe3c632Sopenharmony_ci } 407ffe3c632Sopenharmony_ci 408ffe3c632Sopenharmony_ci public function clearDefaultValue() 409ffe3c632Sopenharmony_ci { 410ffe3c632Sopenharmony_ci unset($this->default_value); 411ffe3c632Sopenharmony_ci } 412ffe3c632Sopenharmony_ci 413ffe3c632Sopenharmony_ci /** 414ffe3c632Sopenharmony_ci * For numeric types, contains the original text representation of the value. 415ffe3c632Sopenharmony_ci * For booleans, "true" or "false". 416ffe3c632Sopenharmony_ci * For strings, contains the default text contents (not escaped in any way). 417ffe3c632Sopenharmony_ci * For bytes, contains the C escaped value. All bytes >= 128 are escaped. 418ffe3c632Sopenharmony_ci * TODO(kenton): Base-64 encode? 419ffe3c632Sopenharmony_ci * 420ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string default_value = 7;</code> 421ffe3c632Sopenharmony_ci * @param string $var 422ffe3c632Sopenharmony_ci * @return $this 423ffe3c632Sopenharmony_ci */ 424ffe3c632Sopenharmony_ci public function setDefaultValue($var) 425ffe3c632Sopenharmony_ci { 426ffe3c632Sopenharmony_ci GPBUtil::checkString($var, True); 427ffe3c632Sopenharmony_ci $this->default_value = $var; 428ffe3c632Sopenharmony_ci 429ffe3c632Sopenharmony_ci return $this; 430ffe3c632Sopenharmony_ci } 431ffe3c632Sopenharmony_ci 432ffe3c632Sopenharmony_ci /** 433ffe3c632Sopenharmony_ci * If set, gives the index of a oneof in the containing type's oneof_decl 434ffe3c632Sopenharmony_ci * list. This field is a member of that oneof. 435ffe3c632Sopenharmony_ci * 436ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 oneof_index = 9;</code> 437ffe3c632Sopenharmony_ci * @return int 438ffe3c632Sopenharmony_ci */ 439ffe3c632Sopenharmony_ci public function getOneofIndex() 440ffe3c632Sopenharmony_ci { 441ffe3c632Sopenharmony_ci return isset($this->oneof_index) ? $this->oneof_index : 0; 442ffe3c632Sopenharmony_ci } 443ffe3c632Sopenharmony_ci 444ffe3c632Sopenharmony_ci public function hasOneofIndex() 445ffe3c632Sopenharmony_ci { 446ffe3c632Sopenharmony_ci return isset($this->oneof_index); 447ffe3c632Sopenharmony_ci } 448ffe3c632Sopenharmony_ci 449ffe3c632Sopenharmony_ci public function clearOneofIndex() 450ffe3c632Sopenharmony_ci { 451ffe3c632Sopenharmony_ci unset($this->oneof_index); 452ffe3c632Sopenharmony_ci } 453ffe3c632Sopenharmony_ci 454ffe3c632Sopenharmony_ci /** 455ffe3c632Sopenharmony_ci * If set, gives the index of a oneof in the containing type's oneof_decl 456ffe3c632Sopenharmony_ci * list. This field is a member of that oneof. 457ffe3c632Sopenharmony_ci * 458ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional int32 oneof_index = 9;</code> 459ffe3c632Sopenharmony_ci * @param int $var 460ffe3c632Sopenharmony_ci * @return $this 461ffe3c632Sopenharmony_ci */ 462ffe3c632Sopenharmony_ci public function setOneofIndex($var) 463ffe3c632Sopenharmony_ci { 464ffe3c632Sopenharmony_ci GPBUtil::checkInt32($var); 465ffe3c632Sopenharmony_ci $this->oneof_index = $var; 466ffe3c632Sopenharmony_ci 467ffe3c632Sopenharmony_ci return $this; 468ffe3c632Sopenharmony_ci } 469ffe3c632Sopenharmony_ci 470ffe3c632Sopenharmony_ci /** 471ffe3c632Sopenharmony_ci * JSON name of this field. The value is set by protocol compiler. If the 472ffe3c632Sopenharmony_ci * user has set a "json_name" option on this field, that option's value 473ffe3c632Sopenharmony_ci * will be used. Otherwise, it's deduced from the field's name by converting 474ffe3c632Sopenharmony_ci * it to camelCase. 475ffe3c632Sopenharmony_ci * 476ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string json_name = 10;</code> 477ffe3c632Sopenharmony_ci * @return string 478ffe3c632Sopenharmony_ci */ 479ffe3c632Sopenharmony_ci public function getJsonName() 480ffe3c632Sopenharmony_ci { 481ffe3c632Sopenharmony_ci return isset($this->json_name) ? $this->json_name : ''; 482ffe3c632Sopenharmony_ci } 483ffe3c632Sopenharmony_ci 484ffe3c632Sopenharmony_ci public function hasJsonName() 485ffe3c632Sopenharmony_ci { 486ffe3c632Sopenharmony_ci return isset($this->json_name); 487ffe3c632Sopenharmony_ci } 488ffe3c632Sopenharmony_ci 489ffe3c632Sopenharmony_ci public function clearJsonName() 490ffe3c632Sopenharmony_ci { 491ffe3c632Sopenharmony_ci unset($this->json_name); 492ffe3c632Sopenharmony_ci } 493ffe3c632Sopenharmony_ci 494ffe3c632Sopenharmony_ci /** 495ffe3c632Sopenharmony_ci * JSON name of this field. The value is set by protocol compiler. If the 496ffe3c632Sopenharmony_ci * user has set a "json_name" option on this field, that option's value 497ffe3c632Sopenharmony_ci * will be used. Otherwise, it's deduced from the field's name by converting 498ffe3c632Sopenharmony_ci * it to camelCase. 499ffe3c632Sopenharmony_ci * 500ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional string json_name = 10;</code> 501ffe3c632Sopenharmony_ci * @param string $var 502ffe3c632Sopenharmony_ci * @return $this 503ffe3c632Sopenharmony_ci */ 504ffe3c632Sopenharmony_ci public function setJsonName($var) 505ffe3c632Sopenharmony_ci { 506ffe3c632Sopenharmony_ci GPBUtil::checkString($var, True); 507ffe3c632Sopenharmony_ci $this->json_name = $var; 508ffe3c632Sopenharmony_ci 509ffe3c632Sopenharmony_ci return $this; 510ffe3c632Sopenharmony_ci } 511ffe3c632Sopenharmony_ci 512ffe3c632Sopenharmony_ci /** 513ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code> 514ffe3c632Sopenharmony_ci * @return \Google\Protobuf\Internal\FieldOptions 515ffe3c632Sopenharmony_ci */ 516ffe3c632Sopenharmony_ci public function getOptions() 517ffe3c632Sopenharmony_ci { 518ffe3c632Sopenharmony_ci return isset($this->options) ? $this->options : null; 519ffe3c632Sopenharmony_ci } 520ffe3c632Sopenharmony_ci 521ffe3c632Sopenharmony_ci public function hasOptions() 522ffe3c632Sopenharmony_ci { 523ffe3c632Sopenharmony_ci return isset($this->options); 524ffe3c632Sopenharmony_ci } 525ffe3c632Sopenharmony_ci 526ffe3c632Sopenharmony_ci public function clearOptions() 527ffe3c632Sopenharmony_ci { 528ffe3c632Sopenharmony_ci unset($this->options); 529ffe3c632Sopenharmony_ci } 530ffe3c632Sopenharmony_ci 531ffe3c632Sopenharmony_ci /** 532ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional .google.protobuf.FieldOptions options = 8;</code> 533ffe3c632Sopenharmony_ci * @param \Google\Protobuf\Internal\FieldOptions $var 534ffe3c632Sopenharmony_ci * @return $this 535ffe3c632Sopenharmony_ci */ 536ffe3c632Sopenharmony_ci public function setOptions($var) 537ffe3c632Sopenharmony_ci { 538ffe3c632Sopenharmony_ci GPBUtil::checkMessage($var, \Google\Protobuf\Internal\FieldOptions::class); 539ffe3c632Sopenharmony_ci $this->options = $var; 540ffe3c632Sopenharmony_ci 541ffe3c632Sopenharmony_ci return $this; 542ffe3c632Sopenharmony_ci } 543ffe3c632Sopenharmony_ci 544ffe3c632Sopenharmony_ci /** 545ffe3c632Sopenharmony_ci * If true, this is a proto3 "optional". When a proto3 field is optional, it 546ffe3c632Sopenharmony_ci * tracks presence regardless of field type. 547ffe3c632Sopenharmony_ci * When proto3_optional is true, this field must be belong to a oneof to 548ffe3c632Sopenharmony_ci * signal to old proto3 clients that presence is tracked for this field. This 549ffe3c632Sopenharmony_ci * oneof is known as a "synthetic" oneof, and this field must be its sole 550ffe3c632Sopenharmony_ci * member (each proto3 optional field gets its own synthetic oneof). Synthetic 551ffe3c632Sopenharmony_ci * oneofs exist in the descriptor only, and do not generate any API. Synthetic 552ffe3c632Sopenharmony_ci * oneofs must be ordered after all "real" oneofs. 553ffe3c632Sopenharmony_ci * For message fields, proto3_optional doesn't create any semantic change, 554ffe3c632Sopenharmony_ci * since non-repeated message fields always track presence. However it still 555ffe3c632Sopenharmony_ci * indicates the semantic detail of whether the user wrote "optional" or not. 556ffe3c632Sopenharmony_ci * This can be useful for round-tripping the .proto file. For consistency we 557ffe3c632Sopenharmony_ci * give message fields a synthetic oneof also, even though it is not required 558ffe3c632Sopenharmony_ci * to track presence. This is especially important because the parser can't 559ffe3c632Sopenharmony_ci * tell if a field is a message or an enum, so it must always create a 560ffe3c632Sopenharmony_ci * synthetic oneof. 561ffe3c632Sopenharmony_ci * Proto2 optional fields do not set this flag, because they already indicate 562ffe3c632Sopenharmony_ci * optional with `LABEL_OPTIONAL`. 563ffe3c632Sopenharmony_ci * 564ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional bool proto3_optional = 17;</code> 565ffe3c632Sopenharmony_ci * @return bool 566ffe3c632Sopenharmony_ci */ 567ffe3c632Sopenharmony_ci public function getProto3Optional() 568ffe3c632Sopenharmony_ci { 569ffe3c632Sopenharmony_ci return isset($this->proto3_optional) ? $this->proto3_optional : false; 570ffe3c632Sopenharmony_ci } 571ffe3c632Sopenharmony_ci 572ffe3c632Sopenharmony_ci public function hasProto3Optional() 573ffe3c632Sopenharmony_ci { 574ffe3c632Sopenharmony_ci return isset($this->proto3_optional); 575ffe3c632Sopenharmony_ci } 576ffe3c632Sopenharmony_ci 577ffe3c632Sopenharmony_ci public function clearProto3Optional() 578ffe3c632Sopenharmony_ci { 579ffe3c632Sopenharmony_ci unset($this->proto3_optional); 580ffe3c632Sopenharmony_ci } 581ffe3c632Sopenharmony_ci 582ffe3c632Sopenharmony_ci /** 583ffe3c632Sopenharmony_ci * If true, this is a proto3 "optional". When a proto3 field is optional, it 584ffe3c632Sopenharmony_ci * tracks presence regardless of field type. 585ffe3c632Sopenharmony_ci * When proto3_optional is true, this field must be belong to a oneof to 586ffe3c632Sopenharmony_ci * signal to old proto3 clients that presence is tracked for this field. This 587ffe3c632Sopenharmony_ci * oneof is known as a "synthetic" oneof, and this field must be its sole 588ffe3c632Sopenharmony_ci * member (each proto3 optional field gets its own synthetic oneof). Synthetic 589ffe3c632Sopenharmony_ci * oneofs exist in the descriptor only, and do not generate any API. Synthetic 590ffe3c632Sopenharmony_ci * oneofs must be ordered after all "real" oneofs. 591ffe3c632Sopenharmony_ci * For message fields, proto3_optional doesn't create any semantic change, 592ffe3c632Sopenharmony_ci * since non-repeated message fields always track presence. However it still 593ffe3c632Sopenharmony_ci * indicates the semantic detail of whether the user wrote "optional" or not. 594ffe3c632Sopenharmony_ci * This can be useful for round-tripping the .proto file. For consistency we 595ffe3c632Sopenharmony_ci * give message fields a synthetic oneof also, even though it is not required 596ffe3c632Sopenharmony_ci * to track presence. This is especially important because the parser can't 597ffe3c632Sopenharmony_ci * tell if a field is a message or an enum, so it must always create a 598ffe3c632Sopenharmony_ci * synthetic oneof. 599ffe3c632Sopenharmony_ci * Proto2 optional fields do not set this flag, because they already indicate 600ffe3c632Sopenharmony_ci * optional with `LABEL_OPTIONAL`. 601ffe3c632Sopenharmony_ci * 602ffe3c632Sopenharmony_ci * Generated from protobuf field <code>optional bool proto3_optional = 17;</code> 603ffe3c632Sopenharmony_ci * @param bool $var 604ffe3c632Sopenharmony_ci * @return $this 605ffe3c632Sopenharmony_ci */ 606ffe3c632Sopenharmony_ci public function setProto3Optional($var) 607ffe3c632Sopenharmony_ci { 608ffe3c632Sopenharmony_ci GPBUtil::checkBool($var); 609ffe3c632Sopenharmony_ci $this->proto3_optional = $var; 610ffe3c632Sopenharmony_ci 611ffe3c632Sopenharmony_ci return $this; 612ffe3c632Sopenharmony_ci } 613ffe3c632Sopenharmony_ci 614ffe3c632Sopenharmony_ci} 615ffe3c632Sopenharmony_ci 616