AccessConfig.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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 AccessConfig extends \Google\Model
  19. {
  20. /**
  21. * Public internet quality with fixed bandwidth.
  22. */
  23. public const NETWORK_TIER_FIXED_STANDARD = 'FIXED_STANDARD';
  24. /**
  25. * High quality, Google-grade network tier, support for all networking
  26. * products.
  27. */
  28. public const NETWORK_TIER_PREMIUM = 'PREMIUM';
  29. /**
  30. * Public internet quality, only limited support for other networking
  31. * products.
  32. */
  33. public const NETWORK_TIER_STANDARD = 'STANDARD';
  34. /**
  35. * (Output only) Temporary tier for FIXED_STANDARD when fixed standard tier is
  36. * expired or not configured.
  37. */
  38. public const NETWORK_TIER_STANDARD_OVERRIDES_FIXED_STANDARD = 'STANDARD_OVERRIDES_FIXED_STANDARD';
  39. public const TYPE_DIRECT_IPV6 = 'DIRECT_IPV6';
  40. public const TYPE_ONE_TO_ONE_NAT = 'ONE_TO_ONE_NAT';
  41. /**
  42. * Applies to ipv6AccessConfigs only. The first IPv6 address of the external
  43. * IPv6 range associated with this instance, prefix length is stored
  44. * inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP
  45. * address, it must be unused and in the same region as the instance's zone.
  46. * If not specified, Google Cloud will automatically assign an external IPv6
  47. * address from the instance's subnetwork.
  48. *
  49. * @var string
  50. */
  51. public $externalIpv6;
  52. /**
  53. * Applies to ipv6AccessConfigs only. The prefix length of the external IPv6
  54. * range.
  55. *
  56. * @var int
  57. */
  58. public $externalIpv6PrefixLength;
  59. /**
  60. * Output only. [Output Only] Type of the resource. Alwayscompute#accessConfig
  61. * for access configs.
  62. *
  63. * @var string
  64. */
  65. public $kind;
  66. /**
  67. * The name of this access configuration. In accessConfigs (IPv4), the default
  68. * and recommended name is External NAT, but you can use any arbitrary string,
  69. * such as My external IP orNetwork Access. In ipv6AccessConfigs, the
  70. * recommend name is External IPv6.
  71. *
  72. * @var string
  73. */
  74. public $name;
  75. /**
  76. * Applies to accessConfigs (IPv4) only. Anexternal IP address associated with
  77. * this instance. Specify an unused static external IP address available to
  78. * the project or leave this field undefined to use an IP from a shared
  79. * ephemeral IP address pool. If you specify a static external IP address, it
  80. * must live in the same region as the zone of the instance.
  81. *
  82. * @var string
  83. */
  84. public $natIP;
  85. /**
  86. * This signifies the networking tier used for configuring this access
  87. * configuration and can only take the following values: PREMIUM,STANDARD.
  88. *
  89. * If an AccessConfig is specified without a valid external IP address, an
  90. * ephemeral IP will be created with this networkTier.
  91. *
  92. * If an AccessConfig with a valid external IP address is specified, it must
  93. * match that of the networkTier associated with the Address resource owning
  94. * that IP.
  95. *
  96. * @var string
  97. */
  98. public $networkTier;
  99. /**
  100. * The DNS domain name for the public PTR record.
  101. *
  102. * You can set this field only if the `setPublicPtr` field is enabled
  103. * inaccessConfig. If this field is unspecified inipv6AccessConfig, a default
  104. * PTR record will be created for first IP in associated external IPv6 range.
  105. *
  106. * @var string
  107. */
  108. public $publicPtrDomainName;
  109. /**
  110. * The resource URL for the security policy associated with this access
  111. * config.
  112. *
  113. * @var string
  114. */
  115. public $securityPolicy;
  116. /**
  117. * Specifies whether a public DNS 'PTR' record should be created to map the
  118. * external IP address of the instance to a DNS domain name.
  119. *
  120. * This field is not used in ipv6AccessConfig. A default PTR record will be
  121. * created if the VM has external IPv6 range associated.
  122. *
  123. * @var bool
  124. */
  125. public $setPublicPtr;
  126. /**
  127. * The type of configuration. In accessConfigs (IPv4), the default and only
  128. * option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option
  129. * isDIRECT_IPV6.
  130. *
  131. * @var string
  132. */
  133. public $type;
  134. /**
  135. * Applies to ipv6AccessConfigs only. The first IPv6 address of the external
  136. * IPv6 range associated with this instance, prefix length is stored
  137. * inexternalIpv6PrefixLength in ipv6AccessConfig. To use a static external IP
  138. * address, it must be unused and in the same region as the instance's zone.
  139. * If not specified, Google Cloud will automatically assign an external IPv6
  140. * address from the instance's subnetwork.
  141. *
  142. * @param string $externalIpv6
  143. */
  144. public function setExternalIpv6($externalIpv6)
  145. {
  146. $this->externalIpv6 = $externalIpv6;
  147. }
  148. /**
  149. * @return string
  150. */
  151. public function getExternalIpv6()
  152. {
  153. return $this->externalIpv6;
  154. }
  155. /**
  156. * Applies to ipv6AccessConfigs only. The prefix length of the external IPv6
  157. * range.
  158. *
  159. * @param int $externalIpv6PrefixLength
  160. */
  161. public function setExternalIpv6PrefixLength($externalIpv6PrefixLength)
  162. {
  163. $this->externalIpv6PrefixLength = $externalIpv6PrefixLength;
  164. }
  165. /**
  166. * @return int
  167. */
  168. public function getExternalIpv6PrefixLength()
  169. {
  170. return $this->externalIpv6PrefixLength;
  171. }
  172. /**
  173. * Output only. [Output Only] Type of the resource. Alwayscompute#accessConfig
  174. * for access configs.
  175. *
  176. * @param string $kind
  177. */
  178. public function setKind($kind)
  179. {
  180. $this->kind = $kind;
  181. }
  182. /**
  183. * @return string
  184. */
  185. public function getKind()
  186. {
  187. return $this->kind;
  188. }
  189. /**
  190. * The name of this access configuration. In accessConfigs (IPv4), the default
  191. * and recommended name is External NAT, but you can use any arbitrary string,
  192. * such as My external IP orNetwork Access. In ipv6AccessConfigs, the
  193. * recommend name is External IPv6.
  194. *
  195. * @param string $name
  196. */
  197. public function setName($name)
  198. {
  199. $this->name = $name;
  200. }
  201. /**
  202. * @return string
  203. */
  204. public function getName()
  205. {
  206. return $this->name;
  207. }
  208. /**
  209. * Applies to accessConfigs (IPv4) only. Anexternal IP address associated with
  210. * this instance. Specify an unused static external IP address available to
  211. * the project or leave this field undefined to use an IP from a shared
  212. * ephemeral IP address pool. If you specify a static external IP address, it
  213. * must live in the same region as the zone of the instance.
  214. *
  215. * @param string $natIP
  216. */
  217. public function setNatIP($natIP)
  218. {
  219. $this->natIP = $natIP;
  220. }
  221. /**
  222. * @return string
  223. */
  224. public function getNatIP()
  225. {
  226. return $this->natIP;
  227. }
  228. /**
  229. * This signifies the networking tier used for configuring this access
  230. * configuration and can only take the following values: PREMIUM,STANDARD.
  231. *
  232. * If an AccessConfig is specified without a valid external IP address, an
  233. * ephemeral IP will be created with this networkTier.
  234. *
  235. * If an AccessConfig with a valid external IP address is specified, it must
  236. * match that of the networkTier associated with the Address resource owning
  237. * that IP.
  238. *
  239. * Accepted values: FIXED_STANDARD, PREMIUM, STANDARD,
  240. * STANDARD_OVERRIDES_FIXED_STANDARD
  241. *
  242. * @param self::NETWORK_TIER_* $networkTier
  243. */
  244. public function setNetworkTier($networkTier)
  245. {
  246. $this->networkTier = $networkTier;
  247. }
  248. /**
  249. * @return self::NETWORK_TIER_*
  250. */
  251. public function getNetworkTier()
  252. {
  253. return $this->networkTier;
  254. }
  255. /**
  256. * The DNS domain name for the public PTR record.
  257. *
  258. * You can set this field only if the `setPublicPtr` field is enabled
  259. * inaccessConfig. If this field is unspecified inipv6AccessConfig, a default
  260. * PTR record will be created for first IP in associated external IPv6 range.
  261. *
  262. * @param string $publicPtrDomainName
  263. */
  264. public function setPublicPtrDomainName($publicPtrDomainName)
  265. {
  266. $this->publicPtrDomainName = $publicPtrDomainName;
  267. }
  268. /**
  269. * @return string
  270. */
  271. public function getPublicPtrDomainName()
  272. {
  273. return $this->publicPtrDomainName;
  274. }
  275. /**
  276. * The resource URL for the security policy associated with this access
  277. * config.
  278. *
  279. * @param string $securityPolicy
  280. */
  281. public function setSecurityPolicy($securityPolicy)
  282. {
  283. $this->securityPolicy = $securityPolicy;
  284. }
  285. /**
  286. * @return string
  287. */
  288. public function getSecurityPolicy()
  289. {
  290. return $this->securityPolicy;
  291. }
  292. /**
  293. * Specifies whether a public DNS 'PTR' record should be created to map the
  294. * external IP address of the instance to a DNS domain name.
  295. *
  296. * This field is not used in ipv6AccessConfig. A default PTR record will be
  297. * created if the VM has external IPv6 range associated.
  298. *
  299. * @param bool $setPublicPtr
  300. */
  301. public function setSetPublicPtr($setPublicPtr)
  302. {
  303. $this->setPublicPtr = $setPublicPtr;
  304. }
  305. /**
  306. * @return bool
  307. */
  308. public function getSetPublicPtr()
  309. {
  310. return $this->setPublicPtr;
  311. }
  312. /**
  313. * The type of configuration. In accessConfigs (IPv4), the default and only
  314. * option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option
  315. * isDIRECT_IPV6.
  316. *
  317. * Accepted values: DIRECT_IPV6, ONE_TO_ONE_NAT
  318. *
  319. * @param self::TYPE_* $type
  320. */
  321. public function setType($type)
  322. {
  323. $this->type = $type;
  324. }
  325. /**
  326. * @return self::TYPE_*
  327. */
  328. public function getType()
  329. {
  330. return $this->type;
  331. }
  332. }
  333. // Adding a class alias for backwards compatibility with the previous class name.
  334. class_alias(AccessConfig::class, 'Google_Service_Compute_AccessConfig');