ServiceDescriptorProto.php 3.7 KB

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