SslPolicy.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 SslPolicy extends \Google\Collection
  19. {
  20. /**
  21. * TLS 1.0
  22. */
  23. public const MIN_TLS_VERSION_TLS_1_0 = 'TLS_1_0';
  24. /**
  25. * TLS 1.1
  26. */
  27. public const MIN_TLS_VERSION_TLS_1_1 = 'TLS_1_1';
  28. /**
  29. * TLS 1.2
  30. */
  31. public const MIN_TLS_VERSION_TLS_1_2 = 'TLS_1_2';
  32. /**
  33. * TLS 1.3
  34. */
  35. public const MIN_TLS_VERSION_TLS_1_3 = 'TLS_1_3';
  36. /**
  37. * Compatible profile. Allows the broadset set of clients, even those which
  38. * support only out-of-date SSL features to negotiate with the load balancer.
  39. */
  40. public const PROFILE_COMPATIBLE = 'COMPATIBLE';
  41. /**
  42. * Custom profile. Allow only the set of allowed SSL features specified in the
  43. * customFeatures field.
  44. */
  45. public const PROFILE_CUSTOM = 'CUSTOM';
  46. /**
  47. * FIPS compatible profile. Supports a reduced set of SSL features, intended
  48. * to meet FIPS 140-3 compliance requirements.
  49. */
  50. public const PROFILE_FIPS_202205 = 'FIPS_202205';
  51. /**
  52. * Modern profile. Supports a wide set of SSL features, allowing modern
  53. * clients to negotiate SSL with the load balancer.
  54. */
  55. public const PROFILE_MODERN = 'MODERN';
  56. /**
  57. * Restricted profile. Supports a reduced set of SSL features, intended to
  58. * meet stricter compliance requirements.
  59. */
  60. public const PROFILE_RESTRICTED = 'RESTRICTED';
  61. protected $collection_key = 'warnings';
  62. /**
  63. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  64. *
  65. * @var string
  66. */
  67. public $creationTimestamp;
  68. /**
  69. * A list of features enabled when the selected profile is CUSTOM. The method
  70. * returns the set of features that can be specified in this list. This field
  71. * must be empty if the profile is notCUSTOM.
  72. *
  73. * @var string[]
  74. */
  75. public $customFeatures;
  76. /**
  77. * An optional description of this resource. Provide this property when you
  78. * create the resource.
  79. *
  80. * @var string
  81. */
  82. public $description;
  83. /**
  84. * Output only. [Output Only] The list of features enabled in the SSL policy.
  85. *
  86. * @var string[]
  87. */
  88. public $enabledFeatures;
  89. /**
  90. * Fingerprint of this resource. A hash of the contents stored in this object.
  91. * This field is used in optimistic locking. This field will be ignored when
  92. * inserting a SslPolicy. An up-to-date fingerprint must be provided in order
  93. * to update the SslPolicy, otherwise the request will fail with error 412
  94. * conditionNotMet.
  95. *
  96. * To see the latest fingerprint, make a get() request to retrieve an
  97. * SslPolicy.
  98. *
  99. * @var string
  100. */
  101. public $fingerprint;
  102. /**
  103. * Output only. [Output Only] The unique identifier for the resource. This
  104. * identifier is defined by the server.
  105. *
  106. * @var string
  107. */
  108. public $id;
  109. /**
  110. * Output only. [Output only] Type of the resource. Alwayscompute#sslPolicyfor
  111. * SSL policies.
  112. *
  113. * @var string
  114. */
  115. public $kind;
  116. /**
  117. * The minimum version of SSL protocol that can be used by the clients to
  118. * establish a connection with the load balancer. This can be one ofTLS_1_0,
  119. * TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field must be
  120. * set to RESTRICTED.
  121. *
  122. * @var string
  123. */
  124. public $minTlsVersion;
  125. /**
  126. * Name of the resource. The name must be 1-63 characters long, and comply
  127. * with RFC1035. Specifically, the name must be 1-63 characters long and match
  128. * the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
  129. * character must be a lowercase letter, and all following characters must be
  130. * a dash, lowercase letter, or digit, except the last character, which cannot
  131. * be a dash.
  132. *
  133. * @var string
  134. */
  135. public $name;
  136. /**
  137. * Profile specifies the set of SSL features that can be used by the load
  138. * balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE,
  139. * MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features to
  140. * enable must be specified in the customFeatures field.
  141. *
  142. * @var string
  143. */
  144. public $profile;
  145. /**
  146. * Output only. [Output Only] URL of the region where the regional SSL policy
  147. * resides. This field is not applicable to global SSL policies.
  148. *
  149. * @var string
  150. */
  151. public $region;
  152. /**
  153. * Output only. [Output Only] Server-defined URL for the resource.
  154. *
  155. * @var string
  156. */
  157. public $selfLink;
  158. protected $warningsType = SslPolicyWarnings::class;
  159. protected $warningsDataType = 'array';
  160. /**
  161. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  162. *
  163. * @param string $creationTimestamp
  164. */
  165. public function setCreationTimestamp($creationTimestamp)
  166. {
  167. $this->creationTimestamp = $creationTimestamp;
  168. }
  169. /**
  170. * @return string
  171. */
  172. public function getCreationTimestamp()
  173. {
  174. return $this->creationTimestamp;
  175. }
  176. /**
  177. * A list of features enabled when the selected profile is CUSTOM. The method
  178. * returns the set of features that can be specified in this list. This field
  179. * must be empty if the profile is notCUSTOM.
  180. *
  181. * @param string[] $customFeatures
  182. */
  183. public function setCustomFeatures($customFeatures)
  184. {
  185. $this->customFeatures = $customFeatures;
  186. }
  187. /**
  188. * @return string[]
  189. */
  190. public function getCustomFeatures()
  191. {
  192. return $this->customFeatures;
  193. }
  194. /**
  195. * An optional description of this resource. Provide this property when you
  196. * create the resource.
  197. *
  198. * @param string $description
  199. */
  200. public function setDescription($description)
  201. {
  202. $this->description = $description;
  203. }
  204. /**
  205. * @return string
  206. */
  207. public function getDescription()
  208. {
  209. return $this->description;
  210. }
  211. /**
  212. * Output only. [Output Only] The list of features enabled in the SSL policy.
  213. *
  214. * @param string[] $enabledFeatures
  215. */
  216. public function setEnabledFeatures($enabledFeatures)
  217. {
  218. $this->enabledFeatures = $enabledFeatures;
  219. }
  220. /**
  221. * @return string[]
  222. */
  223. public function getEnabledFeatures()
  224. {
  225. return $this->enabledFeatures;
  226. }
  227. /**
  228. * Fingerprint of this resource. A hash of the contents stored in this object.
  229. * This field is used in optimistic locking. This field will be ignored when
  230. * inserting a SslPolicy. An up-to-date fingerprint must be provided in order
  231. * to update the SslPolicy, otherwise the request will fail with error 412
  232. * conditionNotMet.
  233. *
  234. * To see the latest fingerprint, make a get() request to retrieve an
  235. * SslPolicy.
  236. *
  237. * @param string $fingerprint
  238. */
  239. public function setFingerprint($fingerprint)
  240. {
  241. $this->fingerprint = $fingerprint;
  242. }
  243. /**
  244. * @return string
  245. */
  246. public function getFingerprint()
  247. {
  248. return $this->fingerprint;
  249. }
  250. /**
  251. * Output only. [Output Only] The unique identifier for the resource. This
  252. * identifier is defined by the server.
  253. *
  254. * @param string $id
  255. */
  256. public function setId($id)
  257. {
  258. $this->id = $id;
  259. }
  260. /**
  261. * @return string
  262. */
  263. public function getId()
  264. {
  265. return $this->id;
  266. }
  267. /**
  268. * Output only. [Output only] Type of the resource. Alwayscompute#sslPolicyfor
  269. * SSL policies.
  270. *
  271. * @param string $kind
  272. */
  273. public function setKind($kind)
  274. {
  275. $this->kind = $kind;
  276. }
  277. /**
  278. * @return string
  279. */
  280. public function getKind()
  281. {
  282. return $this->kind;
  283. }
  284. /**
  285. * The minimum version of SSL protocol that can be used by the clients to
  286. * establish a connection with the load balancer. This can be one ofTLS_1_0,
  287. * TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field must be
  288. * set to RESTRICTED.
  289. *
  290. * Accepted values: TLS_1_0, TLS_1_1, TLS_1_2, TLS_1_3
  291. *
  292. * @param self::MIN_TLS_VERSION_* $minTlsVersion
  293. */
  294. public function setMinTlsVersion($minTlsVersion)
  295. {
  296. $this->minTlsVersion = $minTlsVersion;
  297. }
  298. /**
  299. * @return self::MIN_TLS_VERSION_*
  300. */
  301. public function getMinTlsVersion()
  302. {
  303. return $this->minTlsVersion;
  304. }
  305. /**
  306. * Name of the resource. The name must be 1-63 characters long, and comply
  307. * with RFC1035. Specifically, the name must be 1-63 characters long and match
  308. * the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
  309. * character must be a lowercase letter, and all following characters must be
  310. * a dash, lowercase letter, or digit, except the last character, which cannot
  311. * be a dash.
  312. *
  313. * @param string $name
  314. */
  315. public function setName($name)
  316. {
  317. $this->name = $name;
  318. }
  319. /**
  320. * @return string
  321. */
  322. public function getName()
  323. {
  324. return $this->name;
  325. }
  326. /**
  327. * Profile specifies the set of SSL features that can be used by the load
  328. * balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE,
  329. * MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features to
  330. * enable must be specified in the customFeatures field.
  331. *
  332. * Accepted values: COMPATIBLE, CUSTOM, FIPS_202205, MODERN, RESTRICTED
  333. *
  334. * @param self::PROFILE_* $profile
  335. */
  336. public function setProfile($profile)
  337. {
  338. $this->profile = $profile;
  339. }
  340. /**
  341. * @return self::PROFILE_*
  342. */
  343. public function getProfile()
  344. {
  345. return $this->profile;
  346. }
  347. /**
  348. * Output only. [Output Only] URL of the region where the regional SSL policy
  349. * resides. This field is not applicable to global SSL policies.
  350. *
  351. * @param string $region
  352. */
  353. public function setRegion($region)
  354. {
  355. $this->region = $region;
  356. }
  357. /**
  358. * @return string
  359. */
  360. public function getRegion()
  361. {
  362. return $this->region;
  363. }
  364. /**
  365. * Output only. [Output Only] Server-defined URL for the resource.
  366. *
  367. * @param string $selfLink
  368. */
  369. public function setSelfLink($selfLink)
  370. {
  371. $this->selfLink = $selfLink;
  372. }
  373. /**
  374. * @return string
  375. */
  376. public function getSelfLink()
  377. {
  378. return $this->selfLink;
  379. }
  380. /**
  381. * Output only. [Output Only] If potential misconfigurations are detected for
  382. * this SSL policy, this field will be populated with warning messages.
  383. *
  384. * @param SslPolicyWarnings[] $warnings
  385. */
  386. public function setWarnings($warnings)
  387. {
  388. $this->warnings = $warnings;
  389. }
  390. /**
  391. * @return SslPolicyWarnings[]
  392. */
  393. public function getWarnings()
  394. {
  395. return $this->warnings;
  396. }
  397. }
  398. // Adding a class alias for backwards compatibility with the previous class name.
  399. class_alias(SslPolicy::class, 'Google_Service_Compute_SslPolicy');