1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: google/protobuf/descriptor.proto 4 5namespace Google\Protobuf\Internal; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\GPBWire; 9use Google\Protobuf\Internal\RepeatedField; 10use Google\Protobuf\Internal\InputStream; 11use Google\Protobuf\Internal\GPBUtil; 12 13/** 14 * Describes a service. 15 * 16 * Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code> 17 */ 18class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message 19{ 20 /** 21 * Generated from protobuf field <code>optional string name = 1;</code> 22 */ 23 protected $name = null; 24 /** 25 * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> 26 */ 27 private $method; 28 /** 29 * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> 30 */ 31 protected $options = null; 32 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 /** 50 * Generated from protobuf field <code>optional string name = 1;</code> 51 * @return string 52 */ 53 public function getName() 54 { 55 return isset($this->name) ? $this->name : ''; 56 } 57 58 public function hasName() 59 { 60 return isset($this->name); 61 } 62 63 public function clearName() 64 { 65 unset($this->name); 66 } 67 68 /** 69 * Generated from protobuf field <code>optional string name = 1;</code> 70 * @param string $var 71 * @return $this 72 */ 73 public function setName($var) 74 { 75 GPBUtil::checkString($var, True); 76 $this->name = $var; 77 78 return $this; 79 } 80 81 /** 82 * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> 83 * @return \Google\Protobuf\Internal\RepeatedField 84 */ 85 public function getMethod() 86 { 87 return $this->method; 88 } 89 90 /** 91 * Generated from protobuf field <code>repeated .google.protobuf.MethodDescriptorProto method = 2;</code> 92 * @param \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var 93 * @return $this 94 */ 95 public function setMethod($var) 96 { 97 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class); 98 $this->method = $arr; 99 100 return $this; 101 } 102 103 /** 104 * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> 105 * @return \Google\Protobuf\Internal\ServiceOptions 106 */ 107 public function getOptions() 108 { 109 return isset($this->options) ? $this->options : null; 110 } 111 112 public function hasOptions() 113 { 114 return isset($this->options); 115 } 116 117 public function clearOptions() 118 { 119 unset($this->options); 120 } 121 122 /** 123 * Generated from protobuf field <code>optional .google.protobuf.ServiceOptions options = 3;</code> 124 * @param \Google\Protobuf\Internal\ServiceOptions $var 125 * @return $this 126 */ 127 public function setOptions($var) 128 { 129 GPBUtil::checkMessage($var, \Google\Protobuf\Internal\ServiceOptions::class); 130 $this->options = $var; 131 132 return $this; 133 } 134 135} 136 137