| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542 |
- <?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 MachineImage extends \Google\Collection
- {
- public const STATUS_CREATING = 'CREATING';
- public const STATUS_DELETING = 'DELETING';
- public const STATUS_INVALID = 'INVALID';
- public const STATUS_READY = 'READY';
- public const STATUS_UPLOADING = 'UPLOADING';
- protected $collection_key = 'storageLocations';
- /**
- * Output only. [Output Only] The creation timestamp for this machine image
- * inRFC3339 text format.
- *
- * @var string
- */
- public $creationTimestamp;
- /**
- * An optional description of this resource. Provide this property when you
- * create the resource.
- *
- * @var string
- */
- public $description;
- /**
- * [Input Only] Whether to attempt an application consistent machine image by
- * informing the OS to prepare for the snapshot process.
- *
- * @var bool
- */
- public $guestFlush;
- /**
- * Output only. [Output Only] A unique identifier for this machine image. The
- * server defines this identifier.
- *
- * @var string
- */
- public $id;
- protected $instancePropertiesType = InstanceProperties::class;
- protected $instancePropertiesDataType = '';
- /**
- * Output only. [Output Only] The resource type, which is
- * alwayscompute#machineImage for machine image.
- *
- * @var string
- */
- public $kind;
- /**
- * A fingerprint for the labels being applied to this machine image, which is
- * essentially a hash of the labels set used for optimistic locking. The
- * fingerprint is initially generated by Compute Engine and changes after
- * every request to modify or update labels. You must always provide an up-to-
- * date fingerprint hash in order to update or change labels.
- *
- * To see the latest fingerprint, make get() request to the machine image.
- *
- * @var string
- */
- public $labelFingerprint;
- /**
- * Labels to apply to this machine image. These can be later modified by the
- * setLabels method.
- *
- * @var string[]
- */
- public $labels;
- protected $machineImageEncryptionKeyType = CustomerEncryptionKey::class;
- protected $machineImageEncryptionKeyDataType = '';
- /**
- * Name of the resource; provided by the client when the resource is created.
- * The 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 = MachineImageParams::class;
- protected $paramsDataType = '';
- /**
- * Output only. Reserved for future use.
- *
- * @var bool
- */
- public $satisfiesPzi;
- /**
- * Output only. [Output Only] Reserved for future use.
- *
- * @var bool
- */
- public $satisfiesPzs;
- protected $savedDisksType = SavedDisk::class;
- protected $savedDisksDataType = 'array';
- /**
- * Output only. [Output Only] The URL for this machine image. The server
- * defines this URL.
- *
- * @var string
- */
- public $selfLink;
- protected $sourceDiskEncryptionKeysType = SourceDiskEncryptionKey::class;
- protected $sourceDiskEncryptionKeysDataType = 'array';
- /**
- * The source instance used to create the machine image. You can provide this
- * as a partial or full URL to the resource. For example, the following are
- * valid values: - https://www.googleapis.com/compute/v1/project
- * s/project/zones/zone/instances/instance -
- * projects/project/zones/zone/instances/instance
- *
- * @var string
- */
- public $sourceInstance;
- protected $sourceInstancePropertiesType = SourceInstanceProperties::class;
- protected $sourceInstancePropertiesDataType = '';
- /**
- * Output only. [Output Only] The status of the machine image. One of the
- * following values:INVALID, CREATING, READY,DELETING, and UPLOADING.
- *
- * @var string
- */
- public $status;
- /**
- * The regional or multi-regional Cloud Storage bucket location where
- * themachine image is stored.
- *
- * @var string[]
- */
- public $storageLocations;
- /**
- * Output only. [Output Only] Total size of the storage used by the machine
- * image.
- *
- * @var string
- */
- public $totalStorageBytes;
- /**
- * Output only. [Output Only] The creation timestamp for this machine image
- * inRFC3339 text format.
- *
- * @param string $creationTimestamp
- */
- public function setCreationTimestamp($creationTimestamp)
- {
- $this->creationTimestamp = $creationTimestamp;
- }
- /**
- * @return string
- */
- public function getCreationTimestamp()
- {
- return $this->creationTimestamp;
- }
- /**
- * 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;
- }
- /**
- * [Input Only] Whether to attempt an application consistent machine image by
- * informing the OS to prepare for the snapshot process.
- *
- * @param bool $guestFlush
- */
- public function setGuestFlush($guestFlush)
- {
- $this->guestFlush = $guestFlush;
- }
- /**
- * @return bool
- */
- public function getGuestFlush()
- {
- return $this->guestFlush;
- }
- /**
- * Output only. [Output Only] A unique identifier for this machine image. The
- * server defines this identifier.
- *
- * @param string $id
- */
- public function setId($id)
- {
- $this->id = $id;
- }
- /**
- * @return string
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * [Output Only] Properties of source instance
- *
- * @param InstanceProperties $instanceProperties
- */
- public function setInstanceProperties(InstanceProperties $instanceProperties)
- {
- $this->instanceProperties = $instanceProperties;
- }
- /**
- * @return InstanceProperties
- */
- public function getInstanceProperties()
- {
- return $this->instanceProperties;
- }
- /**
- * Output only. [Output Only] The resource type, which is
- * alwayscompute#machineImage for machine image.
- *
- * @param string $kind
- */
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- /**
- * @return string
- */
- public function getKind()
- {
- return $this->kind;
- }
- /**
- * A fingerprint for the labels being applied to this machine image, which is
- * essentially a hash of the labels set used for optimistic locking. The
- * fingerprint is initially generated by Compute Engine and changes after
- * every request to modify or update labels. You must always provide an up-to-
- * date fingerprint hash in order to update or change labels.
- *
- * To see the latest fingerprint, make get() request to the machine image.
- *
- * @param string $labelFingerprint
- */
- public function setLabelFingerprint($labelFingerprint)
- {
- $this->labelFingerprint = $labelFingerprint;
- }
- /**
- * @return string
- */
- public function getLabelFingerprint()
- {
- return $this->labelFingerprint;
- }
- /**
- * Labels to apply to this machine image. These can be later modified by the
- * setLabels method.
- *
- * @param string[] $labels
- */
- public function setLabels($labels)
- {
- $this->labels = $labels;
- }
- /**
- * @return string[]
- */
- public function getLabels()
- {
- return $this->labels;
- }
- /**
- * Encrypts the machine image using acustomer-supplied encryption key.
- *
- * After you encrypt a machine image using a customer-supplied key, you must
- * provide the same key if you use the machine image later. For example, you
- * must provide the encryption key when you create an instance from the
- * encrypted machine image in a future request.
- *
- * Customer-supplied encryption keys do not protect access to metadata of the
- * machine image.
- *
- * If you do not provide an encryption key when creating the machine image,
- * then the machine image will be encrypted using an automatically generated
- * key and you do not need to provide a key to use the machine image later.
- *
- * @param CustomerEncryptionKey $machineImageEncryptionKey
- */
- public function setMachineImageEncryptionKey(CustomerEncryptionKey $machineImageEncryptionKey)
- {
- $this->machineImageEncryptionKey = $machineImageEncryptionKey;
- }
- /**
- * @return CustomerEncryptionKey
- */
- public function getMachineImageEncryptionKey()
- {
- return $this->machineImageEncryptionKey;
- }
- /**
- * Name of the resource; provided by the client when the resource is created.
- * The 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. [Input Only] Additional parameters that are passed in the
- * request, but are not persisted in the resource.
- *
- * @param MachineImageParams $params
- */
- public function setParams(MachineImageParams $params)
- {
- $this->params = $params;
- }
- /**
- * @return MachineImageParams
- */
- public function getParams()
- {
- return $this->params;
- }
- /**
- * Output only. Reserved for future use.
- *
- * @param bool $satisfiesPzi
- */
- public function setSatisfiesPzi($satisfiesPzi)
- {
- $this->satisfiesPzi = $satisfiesPzi;
- }
- /**
- * @return bool
- */
- public function getSatisfiesPzi()
- {
- return $this->satisfiesPzi;
- }
- /**
- * 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;
- }
- /**
- * Output only. An array of Machine Image specific properties for disks
- * attached to the source instance
- *
- * @param SavedDisk[] $savedDisks
- */
- public function setSavedDisks($savedDisks)
- {
- $this->savedDisks = $savedDisks;
- }
- /**
- * @return SavedDisk[]
- */
- public function getSavedDisks()
- {
- return $this->savedDisks;
- }
- /**
- * Output only. [Output Only] The URL for this machine image. The server
- * defines this URL.
- *
- * @param string $selfLink
- */
- public function setSelfLink($selfLink)
- {
- $this->selfLink = $selfLink;
- }
- /**
- * @return string
- */
- public function getSelfLink()
- {
- return $this->selfLink;
- }
- /**
- * [Input Only] Thecustomer-supplied encryption key of the disks attached to
- * the source instance. Required if the source disk is protected by a
- * customer-supplied encryption key.
- *
- * @param SourceDiskEncryptionKey[] $sourceDiskEncryptionKeys
- */
- public function setSourceDiskEncryptionKeys($sourceDiskEncryptionKeys)
- {
- $this->sourceDiskEncryptionKeys = $sourceDiskEncryptionKeys;
- }
- /**
- * @return SourceDiskEncryptionKey[]
- */
- public function getSourceDiskEncryptionKeys()
- {
- return $this->sourceDiskEncryptionKeys;
- }
- /**
- * The source instance used to create the machine image. You can provide this
- * as a partial or full URL to the resource. For example, the following are
- * valid values: - https://www.googleapis.com/compute/v1/project
- * s/project/zones/zone/instances/instance -
- * projects/project/zones/zone/instances/instance
- *
- * @param string $sourceInstance
- */
- public function setSourceInstance($sourceInstance)
- {
- $this->sourceInstance = $sourceInstance;
- }
- /**
- * @return string
- */
- public function getSourceInstance()
- {
- return $this->sourceInstance;
- }
- /**
- * Output only. [Output Only] DEPRECATED: Please use instance_properties
- * instead for source instance related properties. New properties will not be
- * added to this field.
- *
- * @param SourceInstanceProperties $sourceInstanceProperties
- */
- public function setSourceInstanceProperties(SourceInstanceProperties $sourceInstanceProperties)
- {
- $this->sourceInstanceProperties = $sourceInstanceProperties;
- }
- /**
- * @return SourceInstanceProperties
- */
- public function getSourceInstanceProperties()
- {
- return $this->sourceInstanceProperties;
- }
- /**
- * Output only. [Output Only] The status of the machine image. One of the
- * following values:INVALID, CREATING, READY,DELETING, and UPLOADING.
- *
- * Accepted values: CREATING, DELETING, INVALID, READY, UPLOADING
- *
- * @param self::STATUS_* $status
- */
- public function setStatus($status)
- {
- $this->status = $status;
- }
- /**
- * @return self::STATUS_*
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * The regional or multi-regional Cloud Storage bucket location where
- * themachine image is stored.
- *
- * @param string[] $storageLocations
- */
- public function setStorageLocations($storageLocations)
- {
- $this->storageLocations = $storageLocations;
- }
- /**
- * @return string[]
- */
- public function getStorageLocations()
- {
- return $this->storageLocations;
- }
- /**
- * Output only. [Output Only] Total size of the storage used by the machine
- * image.
- *
- * @param string $totalStorageBytes
- */
- public function setTotalStorageBytes($totalStorageBytes)
- {
- $this->totalStorageBytes = $totalStorageBytes;
- }
- /**
- * @return string
- */
- public function getTotalStorageBytes()
- {
- return $this->totalStorageBytes;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(MachineImage::class, 'Google_Service_Compute_MachineImage');
|