diff options
Diffstat (limited to 'php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php index 624bde84..8de7afd0 100644 --- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php +++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php @@ -8,41 +8,50 @@ use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\GPBWire; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\InputStream; - use Google\Protobuf\Internal\GPBUtil; /** - * <pre> * Describes a service. - * </pre> * - * Protobuf type <code>google.protobuf.ServiceDescriptorProto</code> + * Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code> */ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message { /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> */ private $name = ''; private $has_name = false; /** - * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> */ private $method; private $has_method = false; /** - * <code>optional .google.protobuf.ServiceOptions options = 3;</code> + * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> */ private $options = null; private $has_options = false; - public function __construct() { + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $method + * @type \Google\Protobuf\Internal\ServiceOptions $options + * } + */ + public function __construct($data = NULL) { \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); - parent::__construct(); + parent::__construct($data); } /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> + * @return string */ public function getName() { @@ -50,13 +59,17 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional string name = 1;</code> + * Generated from protobuf field <code>optional string name = 1;</code> + * @param string $var + * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; $this->has_name = true; + + return $this; } public function hasName() @@ -65,7 +78,8 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> + * @return \Google\Protobuf\Internal\RepeatedField */ public function getMethod() { @@ -73,13 +87,17 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> + * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> + * @param \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setMethod(&$var) + public function setMethod($var) { - GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class); - $this->method = $var; + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class); + $this->method = $arr; $this->has_method = true; + + return $this; } public function hasMethod() @@ -88,7 +106,8 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional .google.protobuf.ServiceOptions options = 3;</code> + * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> + * @return \Google\Protobuf\Internal\ServiceOptions */ public function getOptions() { @@ -96,13 +115,17 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message } /** - * <code>optional .google.protobuf.ServiceOptions options = 3;</code> + * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> + * @param \Google\Protobuf\Internal\ServiceOptions $var + * @return $this */ - public function setOptions(&$var) + public function setOptions($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class); $this->options = $var; $this->has_options = true; + + return $this; } public function hasOptions() |