ServiceDescriptorProto.php 3.7 KB

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