RouterStatusBgpPeerStatus.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Compute;
  18. class RouterStatusBgpPeerStatus extends \Google\Collection
  19. {
  20. public const STATUS_DOWN = 'DOWN';
  21. public const STATUS_UNKNOWN = 'UNKNOWN';
  22. public const STATUS_UP = 'UP';
  23. /**
  24. * BGP peer disabled because it requires IPv4 but the underlying connection is
  25. * IPv6-only.
  26. */
  27. public const STATUS_REASON_IPV4_PEER_ON_IPV6_ONLY_CONNECTION = 'IPV4_PEER_ON_IPV6_ONLY_CONNECTION';
  28. /**
  29. * BGP peer disabled because it requires IPv6 but the underlying connection is
  30. * IPv4-only.
  31. */
  32. public const STATUS_REASON_IPV6_PEER_ON_IPV4_ONLY_CONNECTION = 'IPV6_PEER_ON_IPV4_ONLY_CONNECTION';
  33. /**
  34. * Indicates internal problems with configuration of MD5 authentication. This
  35. * particular reason can only be returned when md5AuthEnabled is true and
  36. * status is DOWN.
  37. */
  38. public const STATUS_REASON_MD5_AUTH_INTERNAL_PROBLEM = 'MD5_AUTH_INTERNAL_PROBLEM';
  39. public const STATUS_REASON_STATUS_REASON_UNSPECIFIED = 'STATUS_REASON_UNSPECIFIED';
  40. protected $collection_key = 'advertisedRoutes';
  41. protected $advertisedRoutesType = Route::class;
  42. protected $advertisedRoutesDataType = 'array';
  43. protected $bfdStatusType = BfdStatus::class;
  44. protected $bfdStatusDataType = '';
  45. /**
  46. * Output only. Enable IPv4 traffic over BGP Peer. It is enabled by default if
  47. * the peerIpAddress is version 4.
  48. *
  49. * @var bool
  50. */
  51. public $enableIpv4;
  52. /**
  53. * Output only. Enable IPv6 traffic over BGP Peer. It is enabled by default if
  54. * the peerIpAddress is version 6.
  55. *
  56. * @var bool
  57. */
  58. public $enableIpv6;
  59. /**
  60. * Output only. IP address of the local BGP interface.
  61. *
  62. * @var string
  63. */
  64. public $ipAddress;
  65. /**
  66. * Output only. IPv4 address of the local BGP interface.
  67. *
  68. * @var string
  69. */
  70. public $ipv4NexthopAddress;
  71. /**
  72. * Output only. IPv6 address of the local BGP interface.
  73. *
  74. * @var string
  75. */
  76. public $ipv6NexthopAddress;
  77. /**
  78. * Output only. URL of the VPN tunnel that this BGP peer controls.
  79. *
  80. * @var string
  81. */
  82. public $linkedVpnTunnel;
  83. /**
  84. * Informs whether MD5 authentication is enabled on this BGP peer.
  85. *
  86. * @var bool
  87. */
  88. public $md5AuthEnabled;
  89. /**
  90. * Output only. Name of this BGP peer. Unique within the Routers resource.
  91. *
  92. * @var string
  93. */
  94. public $name;
  95. /**
  96. * Output only. Number of routes learned from the remote BGP Peer.
  97. *
  98. * @var string
  99. */
  100. public $numLearnedRoutes;
  101. /**
  102. * Output only. IP address of the remote BGP interface.
  103. *
  104. * @var string
  105. */
  106. public $peerIpAddress;
  107. /**
  108. * Output only. IPv4 address of the remote BGP interface.
  109. *
  110. * @var string
  111. */
  112. public $peerIpv4NexthopAddress;
  113. /**
  114. * Output only. IPv6 address of the remote BGP interface.
  115. *
  116. * @var string
  117. */
  118. public $peerIpv6NexthopAddress;
  119. /**
  120. * Output only. [Output only] URI of the VM instance that is used as third-
  121. * party router appliances such as Next Gen Firewalls, Virtual Routers, or
  122. * Router Appliances. The VM instance is the peer side of the BGP session.
  123. *
  124. * @var string
  125. */
  126. public $routerApplianceInstance;
  127. /**
  128. * Output only. The state of the BGP session. For a list of possible values
  129. * for this field, seeBGP session states.
  130. *
  131. * @var string
  132. */
  133. public $state;
  134. /**
  135. * Output only. Status of the BGP peer: {UP, DOWN}
  136. *
  137. * @var string
  138. */
  139. public $status;
  140. /**
  141. * Indicates why particular status was returned.
  142. *
  143. * @var string
  144. */
  145. public $statusReason;
  146. /**
  147. * Output only. Time this session has been up. Format: 14 years, 51 weeks, 6
  148. * days, 23 hours, 59 minutes, 59 seconds
  149. *
  150. * @var string
  151. */
  152. public $uptime;
  153. /**
  154. * Output only. Time this session has been up, in seconds. Format: 145
  155. *
  156. * @var string
  157. */
  158. public $uptimeSeconds;
  159. /**
  160. * Routes that were advertised to the remote BGP peer
  161. *
  162. * @param Route[] $advertisedRoutes
  163. */
  164. public function setAdvertisedRoutes($advertisedRoutes)
  165. {
  166. $this->advertisedRoutes = $advertisedRoutes;
  167. }
  168. /**
  169. * @return Route[]
  170. */
  171. public function getAdvertisedRoutes()
  172. {
  173. return $this->advertisedRoutes;
  174. }
  175. /**
  176. * @param BfdStatus $bfdStatus
  177. */
  178. public function setBfdStatus(BfdStatus $bfdStatus)
  179. {
  180. $this->bfdStatus = $bfdStatus;
  181. }
  182. /**
  183. * @return BfdStatus
  184. */
  185. public function getBfdStatus()
  186. {
  187. return $this->bfdStatus;
  188. }
  189. /**
  190. * Output only. Enable IPv4 traffic over BGP Peer. It is enabled by default if
  191. * the peerIpAddress is version 4.
  192. *
  193. * @param bool $enableIpv4
  194. */
  195. public function setEnableIpv4($enableIpv4)
  196. {
  197. $this->enableIpv4 = $enableIpv4;
  198. }
  199. /**
  200. * @return bool
  201. */
  202. public function getEnableIpv4()
  203. {
  204. return $this->enableIpv4;
  205. }
  206. /**
  207. * Output only. Enable IPv6 traffic over BGP Peer. It is enabled by default if
  208. * the peerIpAddress is version 6.
  209. *
  210. * @param bool $enableIpv6
  211. */
  212. public function setEnableIpv6($enableIpv6)
  213. {
  214. $this->enableIpv6 = $enableIpv6;
  215. }
  216. /**
  217. * @return bool
  218. */
  219. public function getEnableIpv6()
  220. {
  221. return $this->enableIpv6;
  222. }
  223. /**
  224. * Output only. IP address of the local BGP interface.
  225. *
  226. * @param string $ipAddress
  227. */
  228. public function setIpAddress($ipAddress)
  229. {
  230. $this->ipAddress = $ipAddress;
  231. }
  232. /**
  233. * @return string
  234. */
  235. public function getIpAddress()
  236. {
  237. return $this->ipAddress;
  238. }
  239. /**
  240. * Output only. IPv4 address of the local BGP interface.
  241. *
  242. * @param string $ipv4NexthopAddress
  243. */
  244. public function setIpv4NexthopAddress($ipv4NexthopAddress)
  245. {
  246. $this->ipv4NexthopAddress = $ipv4NexthopAddress;
  247. }
  248. /**
  249. * @return string
  250. */
  251. public function getIpv4NexthopAddress()
  252. {
  253. return $this->ipv4NexthopAddress;
  254. }
  255. /**
  256. * Output only. IPv6 address of the local BGP interface.
  257. *
  258. * @param string $ipv6NexthopAddress
  259. */
  260. public function setIpv6NexthopAddress($ipv6NexthopAddress)
  261. {
  262. $this->ipv6NexthopAddress = $ipv6NexthopAddress;
  263. }
  264. /**
  265. * @return string
  266. */
  267. public function getIpv6NexthopAddress()
  268. {
  269. return $this->ipv6NexthopAddress;
  270. }
  271. /**
  272. * Output only. URL of the VPN tunnel that this BGP peer controls.
  273. *
  274. * @param string $linkedVpnTunnel
  275. */
  276. public function setLinkedVpnTunnel($linkedVpnTunnel)
  277. {
  278. $this->linkedVpnTunnel = $linkedVpnTunnel;
  279. }
  280. /**
  281. * @return string
  282. */
  283. public function getLinkedVpnTunnel()
  284. {
  285. return $this->linkedVpnTunnel;
  286. }
  287. /**
  288. * Informs whether MD5 authentication is enabled on this BGP peer.
  289. *
  290. * @param bool $md5AuthEnabled
  291. */
  292. public function setMd5AuthEnabled($md5AuthEnabled)
  293. {
  294. $this->md5AuthEnabled = $md5AuthEnabled;
  295. }
  296. /**
  297. * @return bool
  298. */
  299. public function getMd5AuthEnabled()
  300. {
  301. return $this->md5AuthEnabled;
  302. }
  303. /**
  304. * Output only. Name of this BGP peer. Unique within the Routers resource.
  305. *
  306. * @param string $name
  307. */
  308. public function setName($name)
  309. {
  310. $this->name = $name;
  311. }
  312. /**
  313. * @return string
  314. */
  315. public function getName()
  316. {
  317. return $this->name;
  318. }
  319. /**
  320. * Output only. Number of routes learned from the remote BGP Peer.
  321. *
  322. * @param string $numLearnedRoutes
  323. */
  324. public function setNumLearnedRoutes($numLearnedRoutes)
  325. {
  326. $this->numLearnedRoutes = $numLearnedRoutes;
  327. }
  328. /**
  329. * @return string
  330. */
  331. public function getNumLearnedRoutes()
  332. {
  333. return $this->numLearnedRoutes;
  334. }
  335. /**
  336. * Output only. IP address of the remote BGP interface.
  337. *
  338. * @param string $peerIpAddress
  339. */
  340. public function setPeerIpAddress($peerIpAddress)
  341. {
  342. $this->peerIpAddress = $peerIpAddress;
  343. }
  344. /**
  345. * @return string
  346. */
  347. public function getPeerIpAddress()
  348. {
  349. return $this->peerIpAddress;
  350. }
  351. /**
  352. * Output only. IPv4 address of the remote BGP interface.
  353. *
  354. * @param string $peerIpv4NexthopAddress
  355. */
  356. public function setPeerIpv4NexthopAddress($peerIpv4NexthopAddress)
  357. {
  358. $this->peerIpv4NexthopAddress = $peerIpv4NexthopAddress;
  359. }
  360. /**
  361. * @return string
  362. */
  363. public function getPeerIpv4NexthopAddress()
  364. {
  365. return $this->peerIpv4NexthopAddress;
  366. }
  367. /**
  368. * Output only. IPv6 address of the remote BGP interface.
  369. *
  370. * @param string $peerIpv6NexthopAddress
  371. */
  372. public function setPeerIpv6NexthopAddress($peerIpv6NexthopAddress)
  373. {
  374. $this->peerIpv6NexthopAddress = $peerIpv6NexthopAddress;
  375. }
  376. /**
  377. * @return string
  378. */
  379. public function getPeerIpv6NexthopAddress()
  380. {
  381. return $this->peerIpv6NexthopAddress;
  382. }
  383. /**
  384. * Output only. [Output only] URI of the VM instance that is used as third-
  385. * party router appliances such as Next Gen Firewalls, Virtual Routers, or
  386. * Router Appliances. The VM instance is the peer side of the BGP session.
  387. *
  388. * @param string $routerApplianceInstance
  389. */
  390. public function setRouterApplianceInstance($routerApplianceInstance)
  391. {
  392. $this->routerApplianceInstance = $routerApplianceInstance;
  393. }
  394. /**
  395. * @return string
  396. */
  397. public function getRouterApplianceInstance()
  398. {
  399. return $this->routerApplianceInstance;
  400. }
  401. /**
  402. * Output only. The state of the BGP session. For a list of possible values
  403. * for this field, seeBGP session states.
  404. *
  405. * @param string $state
  406. */
  407. public function setState($state)
  408. {
  409. $this->state = $state;
  410. }
  411. /**
  412. * @return string
  413. */
  414. public function getState()
  415. {
  416. return $this->state;
  417. }
  418. /**
  419. * Output only. Status of the BGP peer: {UP, DOWN}
  420. *
  421. * Accepted values: DOWN, UNKNOWN, UP
  422. *
  423. * @param self::STATUS_* $status
  424. */
  425. public function setStatus($status)
  426. {
  427. $this->status = $status;
  428. }
  429. /**
  430. * @return self::STATUS_*
  431. */
  432. public function getStatus()
  433. {
  434. return $this->status;
  435. }
  436. /**
  437. * Indicates why particular status was returned.
  438. *
  439. * Accepted values: IPV4_PEER_ON_IPV6_ONLY_CONNECTION,
  440. * IPV6_PEER_ON_IPV4_ONLY_CONNECTION, MD5_AUTH_INTERNAL_PROBLEM,
  441. * STATUS_REASON_UNSPECIFIED
  442. *
  443. * @param self::STATUS_REASON_* $statusReason
  444. */
  445. public function setStatusReason($statusReason)
  446. {
  447. $this->statusReason = $statusReason;
  448. }
  449. /**
  450. * @return self::STATUS_REASON_*
  451. */
  452. public function getStatusReason()
  453. {
  454. return $this->statusReason;
  455. }
  456. /**
  457. * Output only. Time this session has been up. Format: 14 years, 51 weeks, 6
  458. * days, 23 hours, 59 minutes, 59 seconds
  459. *
  460. * @param string $uptime
  461. */
  462. public function setUptime($uptime)
  463. {
  464. $this->uptime = $uptime;
  465. }
  466. /**
  467. * @return string
  468. */
  469. public function getUptime()
  470. {
  471. return $this->uptime;
  472. }
  473. /**
  474. * Output only. Time this session has been up, in seconds. Format: 145
  475. *
  476. * @param string $uptimeSeconds
  477. */
  478. public function setUptimeSeconds($uptimeSeconds)
  479. {
  480. $this->uptimeSeconds = $uptimeSeconds;
  481. }
  482. /**
  483. * @return string
  484. */
  485. public function getUptimeSeconds()
  486. {
  487. return $this->uptimeSeconds;
  488. }
  489. }
  490. // Adding a class alias for backwards compatibility with the previous class name.
  491. class_alias(RouterStatusBgpPeerStatus::class, 'Google_Service_Compute_RouterStatusBgpPeerStatus');