ServiceDescriptorProto.php 2.6 KB

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