| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727 |
- <?php
- /*
- * Copyright 2014 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
- namespace Google\Service\Compute;
- class Reservation extends \Google\Collection
- {
- /**
- * The reserved capacity is made up of densely deployed reservation blocks.
- */
- public const DEPLOYMENT_TYPE_DENSE = 'DENSE';
- public const DEPLOYMENT_TYPE_DEPLOYMENT_TYPE_UNSPECIFIED = 'DEPLOYMENT_TYPE_UNSPECIFIED';
- /**
- * No early access.
- */
- public const EARLY_ACCESS_MAINTENANCE_NO_EARLY_ACCESS = 'NO_EARLY_ACCESS';
- /**
- * Wave 1: Fastest notification period
- */
- public const EARLY_ACCESS_MAINTENANCE_WAVE1 = 'WAVE1';
- /**
- * Wave 2: Medium notification period
- */
- public const EARLY_ACCESS_MAINTENANCE_WAVE2 = 'WAVE2';
- /**
- * CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling) at
- * the data center during normal operating conditions. In the event of
- * infrastructure failures at data center (e.g. power and/or cooling
- * failures), this workload may be disrupted. As a consequence, it has a
- * weaker availability SLO than STANDARD.
- */
- public const PROTECTION_TIER_CAPACITY_OPTIMIZED = 'CAPACITY_OPTIMIZED';
- /**
- * Unspecified protection tier.
- */
- public const PROTECTION_TIER_PROTECTION_TIER_UNSPECIFIED = 'PROTECTION_TIER_UNSPECIFIED';
- /**
- * STANDARD protection for workload that should be protected by redundancies
- * (e.g. power, cooling) at the data center level. In the event of
- * infrastructure failures at data center (e.g. power and/or cooling
- * failures), this workload is expected to continue as normal using the
- * redundancies.
- */
- public const PROTECTION_TIER_STANDARD = 'STANDARD';
- /**
- * Maintenance on all reserved instances in the reservation is synchronized.
- */
- public const SCHEDULING_TYPE_GROUPED = 'GROUPED';
- /**
- * Unknown maintenance type.
- */
- public const SCHEDULING_TYPE_GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 'GROUP_MAINTENANCE_TYPE_UNSPECIFIED';
- /**
- * Maintenance is not synchronized for this reservation. Instead, each
- * instance has its own maintenance window.
- */
- public const SCHEDULING_TYPE_INDEPENDENT = 'INDEPENDENT';
- /**
- * Reservation resources are being allocated.
- */
- public const STATUS_CREATING = 'CREATING';
- /**
- * Reservation deletion is in progress.
- */
- public const STATUS_DELETING = 'DELETING';
- public const STATUS_INVALID = 'INVALID';
- /**
- * Reservation resources have been allocated, and the reservation is ready for
- * use.
- */
- public const STATUS_READY = 'READY';
- /**
- * Reservation update is in progress.
- */
- public const STATUS_UPDATING = 'UPDATING';
- protected $collection_key = 'linkedCommitments';
- protected $advancedDeploymentControlType = ReservationAdvancedDeploymentControl::class;
- protected $advancedDeploymentControlDataType = '';
- protected $aggregateReservationType = AllocationAggregateReservation::class;
- protected $aggregateReservationDataType = '';
- /**
- * Output only. [Output Only] Full or partial URL to a parent commitment. This
- * field displays for reservations that are tied to a commitment.
- *
- * @var string
- */
- public $commitment;
- /**
- * Output only. [Output Only] Creation timestamp inRFC3339 text format.
- *
- * @var string
- */
- public $creationTimestamp;
- protected $deleteAfterDurationType = Duration::class;
- protected $deleteAfterDurationDataType = '';
- /**
- * Absolute time in future when the reservation will be auto-deleted by
- * Compute Engine. Timestamp is represented inRFC3339 text format.
- *
- * @var string
- */
- public $deleteAtTime;
- /**
- * Specifies the deployment strategy for this reservation.
- *
- * @var string
- */
- public $deploymentType;
- /**
- * An optional description of this resource. Provide this property when you
- * create the resource.
- *
- * @var string
- */
- public $description;
- /**
- * Indicates the early access maintenance for the reservation. If this field
- * is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in
- * early access maintenance and the standard notice applies.
- *
- * @var string
- */
- public $earlyAccessMaintenance;
- /**
- * Indicates whether Compute Engine allows unplanned maintenance for your VMs;
- * for example, to fix hardware errors.
- *
- * @var bool
- */
- public $enableEmergentMaintenance;
- /**
- * Output only. [Output Only] The unique identifier for the resource. This
- * identifier is defined by the server.
- *
- * @var string
- */
- public $id;
- /**
- * Output only. [Output Only] Type of the resource. Alwayscompute#reservations
- * for reservations.
- *
- * @var string
- */
- public $kind;
- /**
- * Output only. [Output Only] Full or partial URL to parent commitments. This
- * field displays for reservations that are tied to multiple commitments.
- *
- * @var string[]
- */
- public $linkedCommitments;
- /**
- * The name of the resource, provided by the client when initially creating
- * the resource. The resource name must be 1-63 characters long, and comply
- * withRFC1035. Specifically, the name must be 1-63 characters long and match
- * the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
- * character must be a lowercase letter, and all following characters must be
- * a dash, lowercase letter, or digit, except the last character, which cannot
- * be a dash.
- *
- * @var string
- */
- public $name;
- protected $paramsType = ReservationParams::class;
- protected $paramsDataType = '';
- /**
- * Protection tier for the workload which specifies the workload expectations
- * in the event of infrastructure failures at data center (e.g. power and/or
- * cooling failures).
- *
- * @var string
- */
- public $protectionTier;
- protected $reservationSharingPolicyType = AllocationReservationSharingPolicy::class;
- protected $reservationSharingPolicyDataType = '';
- /**
- * Resource policies to be added to this reservation. The key is defined by
- * user, and the value is resource policy url. This is to define placement
- * policy with reservation.
- *
- * @var string[]
- */
- public $resourcePolicies;
- protected $resourceStatusType = AllocationResourceStatus::class;
- protected $resourceStatusDataType = '';
- /**
- * Output only. [Output Only] Reserved for future use.
- *
- * @var bool
- */
- public $satisfiesPzs;
- /**
- * The type of maintenance for the reservation.
- *
- * @var string
- */
- public $schedulingType;
- /**
- * Output only. [Output Only] Server-defined fully-qualified URL for this
- * resource.
- *
- * @var string
- */
- public $selfLink;
- protected $shareSettingsType = ShareSettings::class;
- protected $shareSettingsDataType = '';
- protected $specificReservationType = AllocationSpecificSKUReservation::class;
- protected $specificReservationDataType = '';
- /**
- * Indicates whether the reservation can be consumed by VMs with affinity for
- * "any" reservation. If the field is set, then only VMs that target the
- * reservation by name can consume from this reservation.
- *
- * @var bool
- */
- public $specificReservationRequired;
- /**
- * Output only. [Output Only] The status of the reservation. -
- * CREATING: Reservation resources are being allocated. - READY:
- * Reservation resources have been allocated, and the reservation is
- * ready for use. - DELETING: Reservation deletion is in progress. -
- * UPDATING: Reservation update is in progress.
- *
- * @var string
- */
- public $status;
- /**
- * Zone in which the reservation resides. A zone must be provided if the
- * reservation is created within a commitment.
- *
- * @var string
- */
- public $zone;
- /**
- * Advanced control for cluster management, applicable only to DENSE
- * deployment type reservations.
- *
- * @param ReservationAdvancedDeploymentControl $advancedDeploymentControl
- */
- public function setAdvancedDeploymentControl(ReservationAdvancedDeploymentControl $advancedDeploymentControl)
- {
- $this->advancedDeploymentControl = $advancedDeploymentControl;
- }
- /**
- * @return ReservationAdvancedDeploymentControl
- */
- public function getAdvancedDeploymentControl()
- {
- return $this->advancedDeploymentControl;
- }
- /**
- * Reservation for aggregated resources, providing shape flexibility.
- *
- * @param AllocationAggregateReservation $aggregateReservation
- */
- public function setAggregateReservation(AllocationAggregateReservation $aggregateReservation)
- {
- $this->aggregateReservation = $aggregateReservation;
- }
- /**
- * @return AllocationAggregateReservation
- */
- public function getAggregateReservation()
- {
- return $this->aggregateReservation;
- }
- /**
- * Output only. [Output Only] Full or partial URL to a parent commitment. This
- * field displays for reservations that are tied to a commitment.
- *
- * @param string $commitment
- */
- public function setCommitment($commitment)
- {
- $this->commitment = $commitment;
- }
- /**
- * @return string
- */
- public function getCommitment()
- {
- return $this->commitment;
- }
- /**
- * Output only. [Output Only] Creation timestamp inRFC3339 text format.
- *
- * @param string $creationTimestamp
- */
- public function setCreationTimestamp($creationTimestamp)
- {
- $this->creationTimestamp = $creationTimestamp;
- }
- /**
- * @return string
- */
- public function getCreationTimestamp()
- {
- return $this->creationTimestamp;
- }
- /**
- * Duration time relative to reservation creation when Compute Engine will
- * automatically delete this resource.
- *
- * @param Duration $deleteAfterDuration
- */
- public function setDeleteAfterDuration(Duration $deleteAfterDuration)
- {
- $this->deleteAfterDuration = $deleteAfterDuration;
- }
- /**
- * @return Duration
- */
- public function getDeleteAfterDuration()
- {
- return $this->deleteAfterDuration;
- }
- /**
- * Absolute time in future when the reservation will be auto-deleted by
- * Compute Engine. Timestamp is represented inRFC3339 text format.
- *
- * @param string $deleteAtTime
- */
- public function setDeleteAtTime($deleteAtTime)
- {
- $this->deleteAtTime = $deleteAtTime;
- }
- /**
- * @return string
- */
- public function getDeleteAtTime()
- {
- return $this->deleteAtTime;
- }
- /**
- * Specifies the deployment strategy for this reservation.
- *
- * Accepted values: DENSE, DEPLOYMENT_TYPE_UNSPECIFIED
- *
- * @param self::DEPLOYMENT_TYPE_* $deploymentType
- */
- public function setDeploymentType($deploymentType)
- {
- $this->deploymentType = $deploymentType;
- }
- /**
- * @return self::DEPLOYMENT_TYPE_*
- */
- public function getDeploymentType()
- {
- return $this->deploymentType;
- }
- /**
- * An optional description of this resource. Provide this property when you
- * create the resource.
- *
- * @param string $description
- */
- public function setDescription($description)
- {
- $this->description = $description;
- }
- /**
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
- /**
- * Indicates the early access maintenance for the reservation. If this field
- * is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in
- * early access maintenance and the standard notice applies.
- *
- * Accepted values: NO_EARLY_ACCESS, WAVE1, WAVE2
- *
- * @param self::EARLY_ACCESS_MAINTENANCE_* $earlyAccessMaintenance
- */
- public function setEarlyAccessMaintenance($earlyAccessMaintenance)
- {
- $this->earlyAccessMaintenance = $earlyAccessMaintenance;
- }
- /**
- * @return self::EARLY_ACCESS_MAINTENANCE_*
- */
- public function getEarlyAccessMaintenance()
- {
- return $this->earlyAccessMaintenance;
- }
- /**
- * Indicates whether Compute Engine allows unplanned maintenance for your VMs;
- * for example, to fix hardware errors.
- *
- * @param bool $enableEmergentMaintenance
- */
- public function setEnableEmergentMaintenance($enableEmergentMaintenance)
- {
- $this->enableEmergentMaintenance = $enableEmergentMaintenance;
- }
- /**
- * @return bool
- */
- public function getEnableEmergentMaintenance()
- {
- return $this->enableEmergentMaintenance;
- }
- /**
- * Output only. [Output Only] The unique identifier for the resource. This
- * identifier is defined by the server.
- *
- * @param string $id
- */
- public function setId($id)
- {
- $this->id = $id;
- }
- /**
- * @return string
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Output only. [Output Only] Type of the resource. Alwayscompute#reservations
- * for reservations.
- *
- * @param string $kind
- */
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- /**
- * @return string
- */
- public function getKind()
- {
- return $this->kind;
- }
- /**
- * Output only. [Output Only] Full or partial URL to parent commitments. This
- * field displays for reservations that are tied to multiple commitments.
- *
- * @param string[] $linkedCommitments
- */
- public function setLinkedCommitments($linkedCommitments)
- {
- $this->linkedCommitments = $linkedCommitments;
- }
- /**
- * @return string[]
- */
- public function getLinkedCommitments()
- {
- return $this->linkedCommitments;
- }
- /**
- * The name of the resource, provided by the client when initially creating
- * the resource. The resource name must be 1-63 characters long, and comply
- * withRFC1035. Specifically, the name must be 1-63 characters long and match
- * the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
- * character must be a lowercase letter, and all following characters must be
- * a dash, lowercase letter, or digit, except the last character, which cannot
- * be a dash.
- *
- * @param string $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Input only. Additional params passed with the request, but not persisted as
- * part of resource payload.
- *
- * @param ReservationParams $params
- */
- public function setParams(ReservationParams $params)
- {
- $this->params = $params;
- }
- /**
- * @return ReservationParams
- */
- public function getParams()
- {
- return $this->params;
- }
- /**
- * Protection tier for the workload which specifies the workload expectations
- * in the event of infrastructure failures at data center (e.g. power and/or
- * cooling failures).
- *
- * Accepted values: CAPACITY_OPTIMIZED, PROTECTION_TIER_UNSPECIFIED, STANDARD
- *
- * @param self::PROTECTION_TIER_* $protectionTier
- */
- public function setProtectionTier($protectionTier)
- {
- $this->protectionTier = $protectionTier;
- }
- /**
- * @return self::PROTECTION_TIER_*
- */
- public function getProtectionTier()
- {
- return $this->protectionTier;
- }
- /**
- * Specify the reservation sharing policy. If unspecified, the reservation
- * will not be shared with Google Cloud managed services.
- *
- * @param AllocationReservationSharingPolicy $reservationSharingPolicy
- */
- public function setReservationSharingPolicy(AllocationReservationSharingPolicy $reservationSharingPolicy)
- {
- $this->reservationSharingPolicy = $reservationSharingPolicy;
- }
- /**
- * @return AllocationReservationSharingPolicy
- */
- public function getReservationSharingPolicy()
- {
- return $this->reservationSharingPolicy;
- }
- /**
- * Resource policies to be added to this reservation. The key is defined by
- * user, and the value is resource policy url. This is to define placement
- * policy with reservation.
- *
- * @param string[] $resourcePolicies
- */
- public function setResourcePolicies($resourcePolicies)
- {
- $this->resourcePolicies = $resourcePolicies;
- }
- /**
- * @return string[]
- */
- public function getResourcePolicies()
- {
- return $this->resourcePolicies;
- }
- /**
- * Output only. [Output Only] Status information for Reservation resource.
- *
- * @param AllocationResourceStatus $resourceStatus
- */
- public function setResourceStatus(AllocationResourceStatus $resourceStatus)
- {
- $this->resourceStatus = $resourceStatus;
- }
- /**
- * @return AllocationResourceStatus
- */
- public function getResourceStatus()
- {
- return $this->resourceStatus;
- }
- /**
- * Output only. [Output Only] Reserved for future use.
- *
- * @param bool $satisfiesPzs
- */
- public function setSatisfiesPzs($satisfiesPzs)
- {
- $this->satisfiesPzs = $satisfiesPzs;
- }
- /**
- * @return bool
- */
- public function getSatisfiesPzs()
- {
- return $this->satisfiesPzs;
- }
- /**
- * The type of maintenance for the reservation.
- *
- * Accepted values: GROUPED, GROUP_MAINTENANCE_TYPE_UNSPECIFIED, INDEPENDENT
- *
- * @param self::SCHEDULING_TYPE_* $schedulingType
- */
- public function setSchedulingType($schedulingType)
- {
- $this->schedulingType = $schedulingType;
- }
- /**
- * @return self::SCHEDULING_TYPE_*
- */
- public function getSchedulingType()
- {
- return $this->schedulingType;
- }
- /**
- * Output only. [Output Only] Server-defined fully-qualified URL for this
- * resource.
- *
- * @param string $selfLink
- */
- public function setSelfLink($selfLink)
- {
- $this->selfLink = $selfLink;
- }
- /**
- * @return string
- */
- public function getSelfLink()
- {
- return $this->selfLink;
- }
- /**
- * Specify share-settings to create a shared reservation. This property is
- * optional. For more information about the syntax and options for this field
- * and its subfields, see the guide for creating a shared reservation.
- *
- * @param ShareSettings $shareSettings
- */
- public function setShareSettings(ShareSettings $shareSettings)
- {
- $this->shareSettings = $shareSettings;
- }
- /**
- * @return ShareSettings
- */
- public function getShareSettings()
- {
- return $this->shareSettings;
- }
- /**
- * Reservation for instances with specific machine shapes.
- *
- * @param AllocationSpecificSKUReservation $specificReservation
- */
- public function setSpecificReservation(AllocationSpecificSKUReservation $specificReservation)
- {
- $this->specificReservation = $specificReservation;
- }
- /**
- * @return AllocationSpecificSKUReservation
- */
- public function getSpecificReservation()
- {
- return $this->specificReservation;
- }
- /**
- * Indicates whether the reservation can be consumed by VMs with affinity for
- * "any" reservation. If the field is set, then only VMs that target the
- * reservation by name can consume from this reservation.
- *
- * @param bool $specificReservationRequired
- */
- public function setSpecificReservationRequired($specificReservationRequired)
- {
- $this->specificReservationRequired = $specificReservationRequired;
- }
- /**
- * @return bool
- */
- public function getSpecificReservationRequired()
- {
- return $this->specificReservationRequired;
- }
- /**
- * Output only. [Output Only] The status of the reservation. -
- * CREATING: Reservation resources are being allocated. - READY:
- * Reservation resources have been allocated, and the reservation is
- * ready for use. - DELETING: Reservation deletion is in progress. -
- * UPDATING: Reservation update is in progress.
- *
- * Accepted values: CREATING, DELETING, INVALID, READY, UPDATING
- *
- * @param self::STATUS_* $status
- */
- public function setStatus($status)
- {
- $this->status = $status;
- }
- /**
- * @return self::STATUS_*
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Zone in which the reservation resides. A zone must be provided if the
- * reservation is created within a commitment.
- *
- * @param string $zone
- */
- public function setZone($zone)
- {
- $this->zone = $zone;
- }
- /**
- * @return string
- */
- public function getZone()
- {
- return $this->zone;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(Reservation::class, 'Google_Service_Compute_Reservation');
|