ExchangedPeeringRoute.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 ExchangedPeeringRoute extends \Google\Model
  19. {
  20. /**
  21. * For routes exported from local network.
  22. */
  23. public const TYPE_DYNAMIC_PEERING_ROUTE = 'DYNAMIC_PEERING_ROUTE';
  24. /**
  25. * The peering route.
  26. */
  27. public const TYPE_STATIC_PEERING_ROUTE = 'STATIC_PEERING_ROUTE';
  28. /**
  29. * The peering route corresponding to subnetwork range.
  30. */
  31. public const TYPE_SUBNET_PEERING_ROUTE = 'SUBNET_PEERING_ROUTE';
  32. /**
  33. * The destination range of the route.
  34. *
  35. * @var string
  36. */
  37. public $destRange;
  38. /**
  39. * True if the peering route has been imported from a peer. The actual import
  40. * happens if the field networkPeering.importCustomRoutes is true for this
  41. * network, and networkPeering.exportCustomRoutes is true for the peer
  42. * network, and the import does not result in a route conflict.
  43. *
  44. * @var bool
  45. */
  46. public $imported;
  47. /**
  48. * The region of peering route next hop, only applies to dynamic routes.
  49. *
  50. * @var string
  51. */
  52. public $nextHopRegion;
  53. /**
  54. * The priority of the peering route.
  55. *
  56. * @var string
  57. */
  58. public $priority;
  59. /**
  60. * The type of the peering route.
  61. *
  62. * @var string
  63. */
  64. public $type;
  65. /**
  66. * The destination range of the route.
  67. *
  68. * @param string $destRange
  69. */
  70. public function setDestRange($destRange)
  71. {
  72. $this->destRange = $destRange;
  73. }
  74. /**
  75. * @return string
  76. */
  77. public function getDestRange()
  78. {
  79. return $this->destRange;
  80. }
  81. /**
  82. * True if the peering route has been imported from a peer. The actual import
  83. * happens if the field networkPeering.importCustomRoutes is true for this
  84. * network, and networkPeering.exportCustomRoutes is true for the peer
  85. * network, and the import does not result in a route conflict.
  86. *
  87. * @param bool $imported
  88. */
  89. public function setImported($imported)
  90. {
  91. $this->imported = $imported;
  92. }
  93. /**
  94. * @return bool
  95. */
  96. public function getImported()
  97. {
  98. return $this->imported;
  99. }
  100. /**
  101. * The region of peering route next hop, only applies to dynamic routes.
  102. *
  103. * @param string $nextHopRegion
  104. */
  105. public function setNextHopRegion($nextHopRegion)
  106. {
  107. $this->nextHopRegion = $nextHopRegion;
  108. }
  109. /**
  110. * @return string
  111. */
  112. public function getNextHopRegion()
  113. {
  114. return $this->nextHopRegion;
  115. }
  116. /**
  117. * The priority of the peering route.
  118. *
  119. * @param string $priority
  120. */
  121. public function setPriority($priority)
  122. {
  123. $this->priority = $priority;
  124. }
  125. /**
  126. * @return string
  127. */
  128. public function getPriority()
  129. {
  130. return $this->priority;
  131. }
  132. /**
  133. * The type of the peering route.
  134. *
  135. * Accepted values: DYNAMIC_PEERING_ROUTE, STATIC_PEERING_ROUTE,
  136. * SUBNET_PEERING_ROUTE
  137. *
  138. * @param self::TYPE_* $type
  139. */
  140. public function setType($type)
  141. {
  142. $this->type = $type;
  143. }
  144. /**
  145. * @return self::TYPE_*
  146. */
  147. public function getType()
  148. {
  149. return $this->type;
  150. }
  151. }
  152. // Adding a class alias for backwards compatibility with the previous class name.
  153. class_alias(ExchangedPeeringRoute::class, 'Google_Service_Compute_ExchangedPeeringRoute');