ServiceDescriptorProto.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: google/protobuf/descriptor.proto
  4. namespace Google\Protobuf\Internal;
  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. * Describes a service.
  12. *
  13. * Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code>
  14. */
  15. class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
  16. {
  17. /**
  18. * Generated from protobuf field <code>optional string name = 1;</code>
  19. */
  20. private $name = '';
  21. private $has_name = false;
  22. /**
  23. * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
  24. */
  25. private $method;
  26. private $has_method = false;
  27. /**
  28. * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
  29. */
  30. private $options = null;
  31. private $has_options = false;
  32. public function __construct() {
  33. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  34. parent::__construct();
  35. }
  36. /**
  37. * Generated from protobuf field <code>optional string name = 1;</code>
  38. * @return string
  39. */
  40. public function getName()
  41. {
  42. return $this->name;
  43. }
  44. /**
  45. * Generated from protobuf field <code>optional string name = 1;</code>
  46. * @param string $var
  47. * @return $this
  48. */
  49. public function setName($var)
  50. {
  51. GPBUtil::checkString($var, True);
  52. $this->name = $var;
  53. $this->has_name = true;
  54. return $this;
  55. }
  56. public function hasName()
  57. {
  58. return $this->has_name;
  59. }
  60. /**
  61. * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
  62. * @return \Google\Protobuf\Internal\RepeatedField
  63. */
  64. public function getMethod()
  65. {
  66. return $this->method;
  67. }
  68. /**
  69. * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code>
  70. * @param \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
  71. * @return $this
  72. */
  73. public function setMethod(&$var)
  74. {
  75. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
  76. $this->method = $arr;
  77. $this->has_method = true;
  78. return $this;
  79. }
  80. public function hasMethod()
  81. {
  82. return $this->has_method;
  83. }
  84. /**
  85. * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
  86. * @return \Google\Protobuf\Internal\ServiceOptions
  87. */
  88. public function getOptions()
  89. {
  90. return $this->options;
  91. }
  92. /**
  93. * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code>
  94. * @param \Google\Protobuf\Internal\ServiceOptions $var
  95. * @return $this
  96. */
  97. public function setOptions(&$var)
  98. {
  99. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class);
  100. $this->options = $var;
  101. $this->has_options = true;
  102. return $this;
  103. }
  104. public function hasOptions()
  105. {
  106. return $this->has_options;
  107. }
  108. }