NamePart.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/descriptor.proto
  4. namespace Google\Protobuf\Internal\UninterpretedOption;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\GPBWire;
  7. use Google\Protobuf\Internal\RepeatedField;
  8. use Google\Protobuf\Internal\InputStream;
  9. use Google\Protobuf\Internal\GPBUtil;
  10. /**
  11. * The name of the uninterpreted option. Each string represents a segment in
  12. * a dot-separated name. is_extension is true iff a segment represents an
  13. * extension (denoted with parentheses in options specs in .proto files).
  14. * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
  15. * "foo.(bar.baz).qux".
  16. *
  17. * Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
  18. */
  19. class NamePart extends \Google\Protobuf\Internal\Message
  20. {
  21. /**
  22. * Generated from protobuf field <code>required string name_part = 1;</code>
  23. */
  24. protected $name_part = '';
  25. private $has_name_part = false;
  26. /**
  27. * Generated from protobuf field <code>required bool is_extension = 2;</code>
  28. */
  29. protected $is_extension = false;
  30. private $has_is_extension = false;
  31. /**
  32. * Constructor.
  33. *
  34. * @param array $data {
  35. * Optional. Data for populating the Message object.
  36. *
  37. * @type string $name_part
  38. * @type bool $is_extension
  39. * }
  40. */
  41. public function __construct($data = NULL) {
  42. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  43. parent::__construct($data);
  44. }
  45. /**
  46. * Generated from protobuf field <code>required string name_part = 1;</code>
  47. * @return string
  48. */
  49. public function getNamePart()
  50. {
  51. return $this->name_part;
  52. }
  53. /**
  54. * Generated from protobuf field <code>required string name_part = 1;</code>
  55. * @param string $var
  56. * @return $this
  57. */
  58. public function setNamePart($var)
  59. {
  60. GPBUtil::checkString($var, True);
  61. $this->name_part = $var;
  62. $this->has_name_part = true;
  63. return $this;
  64. }
  65. public function hasNamePart()
  66. {
  67. return $this->has_name_part;
  68. }
  69. /**
  70. * Generated from protobuf field <code>required bool is_extension = 2;</code>
  71. * @return bool
  72. */
  73. public function getIsExtension()
  74. {
  75. return $this->is_extension;
  76. }
  77. /**
  78. * Generated from protobuf field <code>required bool is_extension = 2;</code>
  79. * @param bool $var
  80. * @return $this
  81. */
  82. public function setIsExtension($var)
  83. {
  84. GPBUtil::checkBool($var);
  85. $this->is_extension = $var;
  86. $this->has_is_extension = true;
  87. return $this;
  88. }
  89. public function hasIsExtension()
  90. {
  91. return $this->has_is_extension;
  92. }
  93. }
  94. // Adding a class alias for backwards compatibility with the previous class name.
  95. class_alias(NamePart::class, \Google\Protobuf\Internal\UninterpretedOption_NamePart::class);