FutureReservation.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  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 FutureReservation extends \Google\Model
  19. {
  20. /**
  21. * The reserved capacity is made up of densely deployed reservation blocks.
  22. */
  23. public const DEPLOYMENT_TYPE_DENSE = 'DENSE';
  24. public const DEPLOYMENT_TYPE_DEPLOYMENT_TYPE_UNSPECIFIED = 'DEPLOYMENT_TYPE_UNSPECIFIED';
  25. /**
  26. * Future Reservation is being drafted.
  27. */
  28. public const PLANNING_STATUS_DRAFT = 'DRAFT';
  29. public const PLANNING_STATUS_PLANNING_STATUS_UNSPECIFIED = 'PLANNING_STATUS_UNSPECIFIED';
  30. /**
  31. * Future Reservation has been submitted for evaluation by GCP.
  32. */
  33. public const PLANNING_STATUS_SUBMITTED = 'SUBMITTED';
  34. /**
  35. * The delivered reservations will delivered at specified start time and
  36. * terminated at specified end time along with terminating the VMs running on
  37. * it.
  38. */
  39. public const RESERVATION_MODE_CALENDAR = 'CALENDAR';
  40. /**
  41. * The delivered reservations do not terminate VMs at the end of reservations.
  42. * This is default mode.
  43. */
  44. public const RESERVATION_MODE_DEFAULT = 'DEFAULT';
  45. public const RESERVATION_MODE_RESERVATION_MODE_UNSPECIFIED = 'RESERVATION_MODE_UNSPECIFIED';
  46. /**
  47. * Maintenance on all reserved instances in the reservation is synchronized.
  48. */
  49. public const SCHEDULING_TYPE_GROUPED = 'GROUPED';
  50. /**
  51. * Unknown maintenance type.
  52. */
  53. public const SCHEDULING_TYPE_GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 'GROUP_MAINTENANCE_TYPE_UNSPECIFIED';
  54. /**
  55. * Maintenance is not synchronized for this reservation. Instead, each
  56. * instance has its own maintenance window.
  57. */
  58. public const SCHEDULING_TYPE_INDEPENDENT = 'INDEPENDENT';
  59. protected $aggregateReservationType = AllocationAggregateReservation::class;
  60. protected $aggregateReservationDataType = '';
  61. /**
  62. * Future timestamp when the FR auto-created reservations will be deleted by
  63. * Compute Engine. Format of this field must be a valid
  64. * href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value.
  65. *
  66. * @var string
  67. */
  68. public $autoCreatedReservationsDeleteTime;
  69. protected $autoCreatedReservationsDurationType = Duration::class;
  70. protected $autoCreatedReservationsDurationDataType = '';
  71. /**
  72. * Setting for enabling or disabling automatic deletion for auto-created
  73. * reservation. If set to true, auto-created reservations will be deleted at
  74. * Future Reservation's end time (default) or at user's defined timestamp if
  75. * any of the [auto_created_reservations_delete_time,
  76. * auto_created_reservations_duration] values is specified. For keeping auto-
  77. * created reservation indefinitely, this value should be set to false.
  78. *
  79. * @var bool
  80. */
  81. public $autoDeleteAutoCreatedReservations;
  82. protected $commitmentInfoType = FutureReservationCommitmentInfo::class;
  83. protected $commitmentInfoDataType = '';
  84. /**
  85. * Output only. [Output Only] The creation timestamp for this future
  86. * reservation inRFC3339 text format.
  87. *
  88. * @var string
  89. */
  90. public $creationTimestamp;
  91. /**
  92. * Type of the deployment requested as part of future reservation.
  93. *
  94. * @var string
  95. */
  96. public $deploymentType;
  97. /**
  98. * An optional description of this resource. Provide this property when you
  99. * create the future reservation.
  100. *
  101. * @var string
  102. */
  103. public $description;
  104. /**
  105. * Indicates if this group of VMs have emergent maintenance enabled.
  106. *
  107. * @var bool
  108. */
  109. public $enableEmergentMaintenance;
  110. /**
  111. * Output only. [Output Only] A unique identifier for this future reservation.
  112. * The server defines this identifier.
  113. *
  114. * @var string
  115. */
  116. public $id;
  117. /**
  118. * Output only. [Output Only] Type of the resource.
  119. * Alwayscompute#futureReservation for future reservations.
  120. *
  121. * @var string
  122. */
  123. public $kind;
  124. /**
  125. * The name of the resource, provided by the client when initially creating
  126. * the resource. The resource name must be 1-63 characters long, and comply
  127. * withRFC1035. 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. * Name prefix for the reservations to be created at the time of delivery. The
  138. * name prefix must comply with RFC1035. Maximum allowed length for name
  139. * prefix is 20. Automatically created reservations name format will be
  140. * -date-####.
  141. *
  142. * @var string
  143. */
  144. public $namePrefix;
  145. /**
  146. * Planning state before being submitted for evaluation
  147. *
  148. * @var string
  149. */
  150. public $planningStatus;
  151. /**
  152. * The reservation mode which determines reservation-termination behavior and
  153. * expected pricing.
  154. *
  155. * @var string
  156. */
  157. public $reservationMode;
  158. /**
  159. * Name of reservations where the capacity is provisioned at the time of
  160. * delivery of future reservations. If the reservation with the given name
  161. * does not exist already, it is created automatically at the time of Approval
  162. * with INACTIVE state till specified start-time. Either provide the
  163. * reservation_name or a name_prefix.
  164. *
  165. * @var string
  166. */
  167. public $reservationName;
  168. /**
  169. * Maintenance information for this reservation
  170. *
  171. * @var string
  172. */
  173. public $schedulingType;
  174. /**
  175. * Output only. [Output Only] Server-defined fully-qualified URL for this
  176. * resource.
  177. *
  178. * @var string
  179. */
  180. public $selfLink;
  181. /**
  182. * Output only. [Output Only] Server-defined URL for this resource with the
  183. * resource id.
  184. *
  185. * @var string
  186. */
  187. public $selfLinkWithId;
  188. protected $shareSettingsType = ShareSettings::class;
  189. protected $shareSettingsDataType = '';
  190. /**
  191. * Indicates whether the auto-created reservation can be consumed by VMs with
  192. * affinity for "any" reservation. If the field is set, then only VMs that
  193. * target the reservation by name can consume from the delivered reservation.
  194. *
  195. * @var bool
  196. */
  197. public $specificReservationRequired;
  198. protected $specificSkuPropertiesType = FutureReservationSpecificSKUProperties::class;
  199. protected $specificSkuPropertiesDataType = '';
  200. protected $statusType = FutureReservationStatus::class;
  201. protected $statusDataType = '';
  202. protected $timeWindowType = FutureReservationTimeWindow::class;
  203. protected $timeWindowDataType = '';
  204. /**
  205. * Output only. [Output Only] URL of the Zone where this future reservation
  206. * resides.
  207. *
  208. * @var string
  209. */
  210. public $zone;
  211. /**
  212. * Aggregate reservation details for the future reservation.
  213. *
  214. * @param AllocationAggregateReservation $aggregateReservation
  215. */
  216. public function setAggregateReservation(AllocationAggregateReservation $aggregateReservation)
  217. {
  218. $this->aggregateReservation = $aggregateReservation;
  219. }
  220. /**
  221. * @return AllocationAggregateReservation
  222. */
  223. public function getAggregateReservation()
  224. {
  225. return $this->aggregateReservation;
  226. }
  227. /**
  228. * Future timestamp when the FR auto-created reservations will be deleted by
  229. * Compute Engine. Format of this field must be a valid
  230. * href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value.
  231. *
  232. * @param string $autoCreatedReservationsDeleteTime
  233. */
  234. public function setAutoCreatedReservationsDeleteTime($autoCreatedReservationsDeleteTime)
  235. {
  236. $this->autoCreatedReservationsDeleteTime = $autoCreatedReservationsDeleteTime;
  237. }
  238. /**
  239. * @return string
  240. */
  241. public function getAutoCreatedReservationsDeleteTime()
  242. {
  243. return $this->autoCreatedReservationsDeleteTime;
  244. }
  245. /**
  246. * Specifies the duration of auto-created reservations. It represents relative
  247. * time to future reservation start_time when auto-created reservations will
  248. * be automatically deleted by Compute Engine. Duration time unit is
  249. * represented as a count of seconds and fractions of seconds at nanosecond
  250. * resolution.
  251. *
  252. * @param Duration $autoCreatedReservationsDuration
  253. */
  254. public function setAutoCreatedReservationsDuration(Duration $autoCreatedReservationsDuration)
  255. {
  256. $this->autoCreatedReservationsDuration = $autoCreatedReservationsDuration;
  257. }
  258. /**
  259. * @return Duration
  260. */
  261. public function getAutoCreatedReservationsDuration()
  262. {
  263. return $this->autoCreatedReservationsDuration;
  264. }
  265. /**
  266. * Setting for enabling or disabling automatic deletion for auto-created
  267. * reservation. If set to true, auto-created reservations will be deleted at
  268. * Future Reservation's end time (default) or at user's defined timestamp if
  269. * any of the [auto_created_reservations_delete_time,
  270. * auto_created_reservations_duration] values is specified. For keeping auto-
  271. * created reservation indefinitely, this value should be set to false.
  272. *
  273. * @param bool $autoDeleteAutoCreatedReservations
  274. */
  275. public function setAutoDeleteAutoCreatedReservations($autoDeleteAutoCreatedReservations)
  276. {
  277. $this->autoDeleteAutoCreatedReservations = $autoDeleteAutoCreatedReservations;
  278. }
  279. /**
  280. * @return bool
  281. */
  282. public function getAutoDeleteAutoCreatedReservations()
  283. {
  284. return $this->autoDeleteAutoCreatedReservations;
  285. }
  286. /**
  287. * If not present, then FR will not deliver a new commitment or update an
  288. * existing commitment.
  289. *
  290. * @param FutureReservationCommitmentInfo $commitmentInfo
  291. */
  292. public function setCommitmentInfo(FutureReservationCommitmentInfo $commitmentInfo)
  293. {
  294. $this->commitmentInfo = $commitmentInfo;
  295. }
  296. /**
  297. * @return FutureReservationCommitmentInfo
  298. */
  299. public function getCommitmentInfo()
  300. {
  301. return $this->commitmentInfo;
  302. }
  303. /**
  304. * Output only. [Output Only] The creation timestamp for this future
  305. * reservation inRFC3339 text format.
  306. *
  307. * @param string $creationTimestamp
  308. */
  309. public function setCreationTimestamp($creationTimestamp)
  310. {
  311. $this->creationTimestamp = $creationTimestamp;
  312. }
  313. /**
  314. * @return string
  315. */
  316. public function getCreationTimestamp()
  317. {
  318. return $this->creationTimestamp;
  319. }
  320. /**
  321. * Type of the deployment requested as part of future reservation.
  322. *
  323. * Accepted values: DENSE, DEPLOYMENT_TYPE_UNSPECIFIED
  324. *
  325. * @param self::DEPLOYMENT_TYPE_* $deploymentType
  326. */
  327. public function setDeploymentType($deploymentType)
  328. {
  329. $this->deploymentType = $deploymentType;
  330. }
  331. /**
  332. * @return self::DEPLOYMENT_TYPE_*
  333. */
  334. public function getDeploymentType()
  335. {
  336. return $this->deploymentType;
  337. }
  338. /**
  339. * An optional description of this resource. Provide this property when you
  340. * create the future reservation.
  341. *
  342. * @param string $description
  343. */
  344. public function setDescription($description)
  345. {
  346. $this->description = $description;
  347. }
  348. /**
  349. * @return string
  350. */
  351. public function getDescription()
  352. {
  353. return $this->description;
  354. }
  355. /**
  356. * Indicates if this group of VMs have emergent maintenance enabled.
  357. *
  358. * @param bool $enableEmergentMaintenance
  359. */
  360. public function setEnableEmergentMaintenance($enableEmergentMaintenance)
  361. {
  362. $this->enableEmergentMaintenance = $enableEmergentMaintenance;
  363. }
  364. /**
  365. * @return bool
  366. */
  367. public function getEnableEmergentMaintenance()
  368. {
  369. return $this->enableEmergentMaintenance;
  370. }
  371. /**
  372. * Output only. [Output Only] A unique identifier for this future reservation.
  373. * The server defines this identifier.
  374. *
  375. * @param string $id
  376. */
  377. public function setId($id)
  378. {
  379. $this->id = $id;
  380. }
  381. /**
  382. * @return string
  383. */
  384. public function getId()
  385. {
  386. return $this->id;
  387. }
  388. /**
  389. * Output only. [Output Only] Type of the resource.
  390. * Alwayscompute#futureReservation for future reservations.
  391. *
  392. * @param string $kind
  393. */
  394. public function setKind($kind)
  395. {
  396. $this->kind = $kind;
  397. }
  398. /**
  399. * @return string
  400. */
  401. public function getKind()
  402. {
  403. return $this->kind;
  404. }
  405. /**
  406. * The name of the resource, provided by the client when initially creating
  407. * the resource. The resource name must be 1-63 characters long, and comply
  408. * withRFC1035. Specifically, the name must be 1-63 characters long and match
  409. * the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
  410. * character must be a lowercase letter, and all following characters must be
  411. * a dash, lowercase letter, or digit, except the last character, which cannot
  412. * be a dash.
  413. *
  414. * @param string $name
  415. */
  416. public function setName($name)
  417. {
  418. $this->name = $name;
  419. }
  420. /**
  421. * @return string
  422. */
  423. public function getName()
  424. {
  425. return $this->name;
  426. }
  427. /**
  428. * Name prefix for the reservations to be created at the time of delivery. The
  429. * name prefix must comply with RFC1035. Maximum allowed length for name
  430. * prefix is 20. Automatically created reservations name format will be
  431. * -date-####.
  432. *
  433. * @param string $namePrefix
  434. */
  435. public function setNamePrefix($namePrefix)
  436. {
  437. $this->namePrefix = $namePrefix;
  438. }
  439. /**
  440. * @return string
  441. */
  442. public function getNamePrefix()
  443. {
  444. return $this->namePrefix;
  445. }
  446. /**
  447. * Planning state before being submitted for evaluation
  448. *
  449. * Accepted values: DRAFT, PLANNING_STATUS_UNSPECIFIED, SUBMITTED
  450. *
  451. * @param self::PLANNING_STATUS_* $planningStatus
  452. */
  453. public function setPlanningStatus($planningStatus)
  454. {
  455. $this->planningStatus = $planningStatus;
  456. }
  457. /**
  458. * @return self::PLANNING_STATUS_*
  459. */
  460. public function getPlanningStatus()
  461. {
  462. return $this->planningStatus;
  463. }
  464. /**
  465. * The reservation mode which determines reservation-termination behavior and
  466. * expected pricing.
  467. *
  468. * Accepted values: CALENDAR, DEFAULT, RESERVATION_MODE_UNSPECIFIED
  469. *
  470. * @param self::RESERVATION_MODE_* $reservationMode
  471. */
  472. public function setReservationMode($reservationMode)
  473. {
  474. $this->reservationMode = $reservationMode;
  475. }
  476. /**
  477. * @return self::RESERVATION_MODE_*
  478. */
  479. public function getReservationMode()
  480. {
  481. return $this->reservationMode;
  482. }
  483. /**
  484. * Name of reservations where the capacity is provisioned at the time of
  485. * delivery of future reservations. If the reservation with the given name
  486. * does not exist already, it is created automatically at the time of Approval
  487. * with INACTIVE state till specified start-time. Either provide the
  488. * reservation_name or a name_prefix.
  489. *
  490. * @param string $reservationName
  491. */
  492. public function setReservationName($reservationName)
  493. {
  494. $this->reservationName = $reservationName;
  495. }
  496. /**
  497. * @return string
  498. */
  499. public function getReservationName()
  500. {
  501. return $this->reservationName;
  502. }
  503. /**
  504. * Maintenance information for this reservation
  505. *
  506. * Accepted values: GROUPED, GROUP_MAINTENANCE_TYPE_UNSPECIFIED, INDEPENDENT
  507. *
  508. * @param self::SCHEDULING_TYPE_* $schedulingType
  509. */
  510. public function setSchedulingType($schedulingType)
  511. {
  512. $this->schedulingType = $schedulingType;
  513. }
  514. /**
  515. * @return self::SCHEDULING_TYPE_*
  516. */
  517. public function getSchedulingType()
  518. {
  519. return $this->schedulingType;
  520. }
  521. /**
  522. * Output only. [Output Only] Server-defined fully-qualified URL for this
  523. * resource.
  524. *
  525. * @param string $selfLink
  526. */
  527. public function setSelfLink($selfLink)
  528. {
  529. $this->selfLink = $selfLink;
  530. }
  531. /**
  532. * @return string
  533. */
  534. public function getSelfLink()
  535. {
  536. return $this->selfLink;
  537. }
  538. /**
  539. * Output only. [Output Only] Server-defined URL for this resource with the
  540. * resource id.
  541. *
  542. * @param string $selfLinkWithId
  543. */
  544. public function setSelfLinkWithId($selfLinkWithId)
  545. {
  546. $this->selfLinkWithId = $selfLinkWithId;
  547. }
  548. /**
  549. * @return string
  550. */
  551. public function getSelfLinkWithId()
  552. {
  553. return $this->selfLinkWithId;
  554. }
  555. /**
  556. * List of Projects/Folders to share with.
  557. *
  558. * @param ShareSettings $shareSettings
  559. */
  560. public function setShareSettings(ShareSettings $shareSettings)
  561. {
  562. $this->shareSettings = $shareSettings;
  563. }
  564. /**
  565. * @return ShareSettings
  566. */
  567. public function getShareSettings()
  568. {
  569. return $this->shareSettings;
  570. }
  571. /**
  572. * Indicates whether the auto-created reservation can be consumed by VMs with
  573. * affinity for "any" reservation. If the field is set, then only VMs that
  574. * target the reservation by name can consume from the delivered reservation.
  575. *
  576. * @param bool $specificReservationRequired
  577. */
  578. public function setSpecificReservationRequired($specificReservationRequired)
  579. {
  580. $this->specificReservationRequired = $specificReservationRequired;
  581. }
  582. /**
  583. * @return bool
  584. */
  585. public function getSpecificReservationRequired()
  586. {
  587. return $this->specificReservationRequired;
  588. }
  589. /**
  590. * Future Reservation configuration to indicate instance properties and total
  591. * count.
  592. *
  593. * @param FutureReservationSpecificSKUProperties $specificSkuProperties
  594. */
  595. public function setSpecificSkuProperties(FutureReservationSpecificSKUProperties $specificSkuProperties)
  596. {
  597. $this->specificSkuProperties = $specificSkuProperties;
  598. }
  599. /**
  600. * @return FutureReservationSpecificSKUProperties
  601. */
  602. public function getSpecificSkuProperties()
  603. {
  604. return $this->specificSkuProperties;
  605. }
  606. /**
  607. * Output only. [Output only] Status of the Future Reservation
  608. *
  609. * @param FutureReservationStatus $status
  610. */
  611. public function setStatus(FutureReservationStatus $status)
  612. {
  613. $this->status = $status;
  614. }
  615. /**
  616. * @return FutureReservationStatus
  617. */
  618. public function getStatus()
  619. {
  620. return $this->status;
  621. }
  622. /**
  623. * Time window for this Future Reservation.
  624. *
  625. * @param FutureReservationTimeWindow $timeWindow
  626. */
  627. public function setTimeWindow(FutureReservationTimeWindow $timeWindow)
  628. {
  629. $this->timeWindow = $timeWindow;
  630. }
  631. /**
  632. * @return FutureReservationTimeWindow
  633. */
  634. public function getTimeWindow()
  635. {
  636. return $this->timeWindow;
  637. }
  638. /**
  639. * Output only. [Output Only] URL of the Zone where this future reservation
  640. * resides.
  641. *
  642. * @param string $zone
  643. */
  644. public function setZone($zone)
  645. {
  646. $this->zone = $zone;
  647. }
  648. /**
  649. * @return string
  650. */
  651. public function getZone()
  652. {
  653. return $this->zone;
  654. }
  655. }
  656. // Adding a class alias for backwards compatibility with the previous class name.
  657. class_alias(FutureReservation::class, 'Google_Service_Compute_FutureReservation');