EndpointInfo.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_discovery.proto
  4. namespace Ydb\Discovery;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.Discovery.EndpointInfo</code>
  10. */
  11. class EndpointInfo extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * This is an address (usually fqdn) and port of this node's grpc endpoint
  15. *
  16. * Generated from protobuf field <code>string address = 1;</code>
  17. */
  18. protected $address = '';
  19. /**
  20. * Generated from protobuf field <code>uint32 port = 2;</code>
  21. */
  22. protected $port = 0;
  23. /**
  24. * Generated from protobuf field <code>float load_factor = 3;</code>
  25. */
  26. protected $load_factor = 0.0;
  27. /**
  28. * Generated from protobuf field <code>bool ssl = 4;</code>
  29. */
  30. protected $ssl = false;
  31. /**
  32. * Generated from protobuf field <code>repeated string service = 5;</code>
  33. */
  34. private $service;
  35. /**
  36. * Generated from protobuf field <code>string location = 6;</code>
  37. */
  38. protected $location = '';
  39. /**
  40. * Generated from protobuf field <code>uint32 node_id = 7;</code>
  41. */
  42. protected $node_id = 0;
  43. /**
  44. * Optional ipv4 and/or ipv6 addresses of the endpoint, which clients may
  45. * use instead of a dns name in the address field.
  46. *
  47. * Generated from protobuf field <code>repeated string ip_v4 = 8;</code>
  48. */
  49. private $ip_v4;
  50. /**
  51. * Generated from protobuf field <code>repeated string ip_v6 = 9;</code>
  52. */
  53. private $ip_v6;
  54. /**
  55. * Optional value for grpc.ssl_target_name_override option that must be
  56. * used when connecting to this endpoint. This may be specified when an ssl
  57. * endpoint is using certificate chain valid for a balancer hostname, and
  58. * not this specific node hostname.
  59. *
  60. * Generated from protobuf field <code>string ssl_target_name_override = 10;</code>
  61. */
  62. protected $ssl_target_name_override = '';
  63. /**
  64. * Constructor.
  65. *
  66. * @param array $data {
  67. * Optional. Data for populating the Message object.
  68. *
  69. * @type string $address
  70. * This is an address (usually fqdn) and port of this node's grpc endpoint
  71. * @type int $port
  72. * @type float $load_factor
  73. * @type bool $ssl
  74. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $service
  75. * @type string $location
  76. * @type int $node_id
  77. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $ip_v4
  78. * Optional ipv4 and/or ipv6 addresses of the endpoint, which clients may
  79. * use instead of a dns name in the address field.
  80. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $ip_v6
  81. * @type string $ssl_target_name_override
  82. * Optional value for grpc.ssl_target_name_override option that must be
  83. * used when connecting to this endpoint. This may be specified when an ssl
  84. * endpoint is using certificate chain valid for a balancer hostname, and
  85. * not this specific node hostname.
  86. * }
  87. */
  88. public function __construct($data = NULL) {
  89. \GPBMetadata\Protos\YdbDiscovery::initOnce();
  90. parent::__construct($data);
  91. }
  92. /**
  93. * This is an address (usually fqdn) and port of this node's grpc endpoint
  94. *
  95. * Generated from protobuf field <code>string address = 1;</code>
  96. * @return string
  97. */
  98. public function getAddress()
  99. {
  100. return $this->address;
  101. }
  102. /**
  103. * This is an address (usually fqdn) and port of this node's grpc endpoint
  104. *
  105. * Generated from protobuf field <code>string address = 1;</code>
  106. * @param string $var
  107. * @return $this
  108. */
  109. public function setAddress($var)
  110. {
  111. GPBUtil::checkString($var, True);
  112. $this->address = $var;
  113. return $this;
  114. }
  115. /**
  116. * Generated from protobuf field <code>uint32 port = 2;</code>
  117. * @return int
  118. */
  119. public function getPort()
  120. {
  121. return $this->port;
  122. }
  123. /**
  124. * Generated from protobuf field <code>uint32 port = 2;</code>
  125. * @param int $var
  126. * @return $this
  127. */
  128. public function setPort($var)
  129. {
  130. GPBUtil::checkUint32($var);
  131. $this->port = $var;
  132. return $this;
  133. }
  134. /**
  135. * Generated from protobuf field <code>float load_factor = 3;</code>
  136. * @return float
  137. */
  138. public function getLoadFactor()
  139. {
  140. return $this->load_factor;
  141. }
  142. /**
  143. * Generated from protobuf field <code>float load_factor = 3;</code>
  144. * @param float $var
  145. * @return $this
  146. */
  147. public function setLoadFactor($var)
  148. {
  149. GPBUtil::checkFloat($var);
  150. $this->load_factor = $var;
  151. return $this;
  152. }
  153. /**
  154. * Generated from protobuf field <code>bool ssl = 4;</code>
  155. * @return bool
  156. */
  157. public function getSsl()
  158. {
  159. return $this->ssl;
  160. }
  161. /**
  162. * Generated from protobuf field <code>bool ssl = 4;</code>
  163. * @param bool $var
  164. * @return $this
  165. */
  166. public function setSsl($var)
  167. {
  168. GPBUtil::checkBool($var);
  169. $this->ssl = $var;
  170. return $this;
  171. }
  172. /**
  173. * Generated from protobuf field <code>repeated string service = 5;</code>
  174. * @return \Google\Protobuf\Internal\RepeatedField
  175. */
  176. public function getService()
  177. {
  178. return $this->service;
  179. }
  180. /**
  181. * Generated from protobuf field <code>repeated string service = 5;</code>
  182. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  183. * @return $this
  184. */
  185. public function setService($var)
  186. {
  187. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  188. $this->service = $arr;
  189. return $this;
  190. }
  191. /**
  192. * Generated from protobuf field <code>string location = 6;</code>
  193. * @return string
  194. */
  195. public function getLocation()
  196. {
  197. return $this->location;
  198. }
  199. /**
  200. * Generated from protobuf field <code>string location = 6;</code>
  201. * @param string $var
  202. * @return $this
  203. */
  204. public function setLocation($var)
  205. {
  206. GPBUtil::checkString($var, True);
  207. $this->location = $var;
  208. return $this;
  209. }
  210. /**
  211. * Generated from protobuf field <code>uint32 node_id = 7;</code>
  212. * @return int
  213. */
  214. public function getNodeId()
  215. {
  216. return $this->node_id;
  217. }
  218. /**
  219. * Generated from protobuf field <code>uint32 node_id = 7;</code>
  220. * @param int $var
  221. * @return $this
  222. */
  223. public function setNodeId($var)
  224. {
  225. GPBUtil::checkUint32($var);
  226. $this->node_id = $var;
  227. return $this;
  228. }
  229. /**
  230. * Optional ipv4 and/or ipv6 addresses of the endpoint, which clients may
  231. * use instead of a dns name in the address field.
  232. *
  233. * Generated from protobuf field <code>repeated string ip_v4 = 8;</code>
  234. * @return \Google\Protobuf\Internal\RepeatedField
  235. */
  236. public function getIpV4()
  237. {
  238. return $this->ip_v4;
  239. }
  240. /**
  241. * Optional ipv4 and/or ipv6 addresses of the endpoint, which clients may
  242. * use instead of a dns name in the address field.
  243. *
  244. * Generated from protobuf field <code>repeated string ip_v4 = 8;</code>
  245. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  246. * @return $this
  247. */
  248. public function setIpV4($var)
  249. {
  250. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  251. $this->ip_v4 = $arr;
  252. return $this;
  253. }
  254. /**
  255. * Generated from protobuf field <code>repeated string ip_v6 = 9;</code>
  256. * @return \Google\Protobuf\Internal\RepeatedField
  257. */
  258. public function getIpV6()
  259. {
  260. return $this->ip_v6;
  261. }
  262. /**
  263. * Generated from protobuf field <code>repeated string ip_v6 = 9;</code>
  264. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  265. * @return $this
  266. */
  267. public function setIpV6($var)
  268. {
  269. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  270. $this->ip_v6 = $arr;
  271. return $this;
  272. }
  273. /**
  274. * Optional value for grpc.ssl_target_name_override option that must be
  275. * used when connecting to this endpoint. This may be specified when an ssl
  276. * endpoint is using certificate chain valid for a balancer hostname, and
  277. * not this specific node hostname.
  278. *
  279. * Generated from protobuf field <code>string ssl_target_name_override = 10;</code>
  280. * @return string
  281. */
  282. public function getSslTargetNameOverride()
  283. {
  284. return $this->ssl_target_name_override;
  285. }
  286. /**
  287. * Optional value for grpc.ssl_target_name_override option that must be
  288. * used when connecting to this endpoint. This may be specified when an ssl
  289. * endpoint is using certificate chain valid for a balancer hostname, and
  290. * not this specific node hostname.
  291. *
  292. * Generated from protobuf field <code>string ssl_target_name_override = 10;</code>
  293. * @param string $var
  294. * @return $this
  295. */
  296. public function setSslTargetNameOverride($var)
  297. {
  298. GPBUtil::checkString($var, True);
  299. $this->ssl_target_name_override = $var;
  300. return $this;
  301. }
  302. }