Image.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931
  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 Image extends \Google\Collection
  19. {
  20. /**
  21. * Default value indicating Architecture is not set.
  22. */
  23. public const ARCHITECTURE_ARCHITECTURE_UNSPECIFIED = 'ARCHITECTURE_UNSPECIFIED';
  24. /**
  25. * Machines with architecture ARM64
  26. */
  27. public const ARCHITECTURE_ARM64 = 'ARM64';
  28. /**
  29. * Machines with architecture X86_64
  30. */
  31. public const ARCHITECTURE_X86_64 = 'X86_64';
  32. public const SOURCE_TYPE_RAW = 'RAW';
  33. /**
  34. * Image is deleting.
  35. */
  36. public const STATUS_DELETING = 'DELETING';
  37. /**
  38. * Image creation failed due to an error.
  39. */
  40. public const STATUS_FAILED = 'FAILED';
  41. /**
  42. * Image hasn't been created as yet.
  43. */
  44. public const STATUS_PENDING = 'PENDING';
  45. /**
  46. * Image has been successfully created.
  47. */
  48. public const STATUS_READY = 'READY';
  49. protected $collection_key = 'storageLocations';
  50. /**
  51. * The architecture of the image. Valid values are ARM64 or X86_64.
  52. *
  53. * @var string
  54. */
  55. public $architecture;
  56. /**
  57. * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
  58. *
  59. * @var string
  60. */
  61. public $archiveSizeBytes;
  62. /**
  63. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  64. *
  65. * @var string
  66. */
  67. public $creationTimestamp;
  68. protected $deprecatedType = DeprecationStatus::class;
  69. protected $deprecatedDataType = '';
  70. /**
  71. * An optional description of this resource. Provide this property when you
  72. * create the resource.
  73. *
  74. * @var string
  75. */
  76. public $description;
  77. /**
  78. * Size of the image when restored onto a persistent disk (in GB).
  79. *
  80. * @var string
  81. */
  82. public $diskSizeGb;
  83. /**
  84. * Output only. Whether this image is created from a confidential compute mode
  85. * disk. [Output Only]: This field is not set by user, but from source disk.
  86. *
  87. * @var bool
  88. */
  89. public $enableConfidentialCompute;
  90. /**
  91. * The name of the image family to which this image belongs. The image family
  92. * name can be from a publicly managed image family provided by Compute
  93. * Engine, or from a custom image family you create. For example,centos-
  94. * stream-9 is a publicly available image family. For more information, see
  95. * Image family best practices.
  96. *
  97. * When creating disks, you can specify an image family instead of a specific
  98. * image name. The image family always returns its latest image that is not
  99. * deprecated. The name of the image family must comply with RFC1035.
  100. *
  101. * @var string
  102. */
  103. public $family;
  104. protected $guestOsFeaturesType = GuestOsFeature::class;
  105. protected $guestOsFeaturesDataType = 'array';
  106. /**
  107. * Output only. [Output Only] The unique identifier for the resource. This
  108. * identifier is defined by the server.
  109. *
  110. * @var string
  111. */
  112. public $id;
  113. protected $imageEncryptionKeyType = CustomerEncryptionKey::class;
  114. protected $imageEncryptionKeyDataType = '';
  115. /**
  116. * Output only. [Output Only] Type of the resource. Always compute#image for
  117. * images.
  118. *
  119. * @var string
  120. */
  121. public $kind;
  122. /**
  123. * A fingerprint for the labels being applied to this image, which is
  124. * essentially a hash of the labels used for optimistic locking. The
  125. * fingerprint is initially generated by Compute Engine and changes after
  126. * every request to modify or update labels. You must always provide an up-to-
  127. * date fingerprint hash in order to update or change labels, otherwise the
  128. * request will fail with error412 conditionNotMet.
  129. *
  130. * To see the latest fingerprint, make a get() request to retrieve an image.
  131. *
  132. * @var string
  133. */
  134. public $labelFingerprint;
  135. /**
  136. * Labels to apply to this image. These can be later modified by the setLabels
  137. * method.
  138. *
  139. * @var string[]
  140. */
  141. public $labels;
  142. /**
  143. * Integer license codes indicating which licenses are attached to this image.
  144. *
  145. * @var string[]
  146. */
  147. public $licenseCodes;
  148. /**
  149. * Any applicable license URI.
  150. *
  151. * @var string[]
  152. */
  153. public $licenses;
  154. /**
  155. * Name of the resource; provided by the client when the resource is created.
  156. * The name must be 1-63 characters long, and comply withRFC1035.
  157. * Specifically, the name must be 1-63 characters long and match the regular
  158. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  159. * must be a lowercase letter, and all following characters must be a dash,
  160. * lowercase letter, or digit, except the last character, which cannot be a
  161. * dash.
  162. *
  163. * @var string
  164. */
  165. public $name;
  166. protected $paramsType = ImageParams::class;
  167. protected $paramsDataType = '';
  168. protected $rawDiskType = ImageRawDisk::class;
  169. protected $rawDiskDataType = '';
  170. /**
  171. * Output only. Reserved for future use.
  172. *
  173. * @var bool
  174. */
  175. public $satisfiesPzi;
  176. /**
  177. * Output only. [Output Only] Reserved for future use.
  178. *
  179. * @var bool
  180. */
  181. public $satisfiesPzs;
  182. /**
  183. * Output only. [Output Only] Server-defined URL for the resource.
  184. *
  185. * @var string
  186. */
  187. public $selfLink;
  188. protected $shieldedInstanceInitialStateType = InitialStateConfig::class;
  189. protected $shieldedInstanceInitialStateDataType = '';
  190. /**
  191. * URL of the source disk used to create this image. For example, the
  192. * following are valid values: - https://www.googleapis.com/compute/v1/
  193. * projects/project/zones/zone/disks/disk -
  194. * projects/project/zones/zone/disks/disk - zones/zone/disks/disk
  195. *
  196. * In order to create an image, you must provide the full or partial URL of
  197. * one of the following: - The rawDisk.source URL - The sourceDisk
  198. * URL - The sourceImage URL - The sourceSnapshot URL
  199. *
  200. * @var string
  201. */
  202. public $sourceDisk;
  203. protected $sourceDiskEncryptionKeyType = CustomerEncryptionKey::class;
  204. protected $sourceDiskEncryptionKeyDataType = '';
  205. /**
  206. * Output only. [Output Only] The ID value of the disk used to create this
  207. * image. This value may be used to determine whether the image was taken from
  208. * the current or a previous instance of a given disk name.
  209. *
  210. * @var string
  211. */
  212. public $sourceDiskId;
  213. /**
  214. * URL of the source image used to create this image. The following are valid
  215. * formats for the URL: -
  216. * https://www.googleapis.com/compute/v1/projects/project_id/global/
  217. * images/image_name - projects/project_id/global/images/image_name
  218. *
  219. * In order to create an image, you must provide the full or partial URL of
  220. * one of the following: - The rawDisk.source URL - The sourceDisk
  221. * URL - The sourceImage URL - The sourceSnapshot URL
  222. *
  223. * @var string
  224. */
  225. public $sourceImage;
  226. protected $sourceImageEncryptionKeyType = CustomerEncryptionKey::class;
  227. protected $sourceImageEncryptionKeyDataType = '';
  228. /**
  229. * Output only. [Output Only] The ID value of the image used to create this
  230. * image. This value may be used to determine whether the image was taken from
  231. * the current or a previous instance of a given image name.
  232. *
  233. * @var string
  234. */
  235. public $sourceImageId;
  236. /**
  237. * URL of the source snapshot used to create this image. The following are
  238. * valid formats for the URL: -
  239. * https://www.googleapis.com/compute/v1/projects/project_id/global/
  240. * snapshots/snapshot_name -
  241. * projects/project_id/global/snapshots/snapshot_name
  242. *
  243. * In order to create an image, you must provide the full or partial URL of
  244. * one of the following: - The rawDisk.source URL - The sourceDisk
  245. * URL - The sourceImage URL - The sourceSnapshot URL
  246. *
  247. * @var string
  248. */
  249. public $sourceSnapshot;
  250. protected $sourceSnapshotEncryptionKeyType = CustomerEncryptionKey::class;
  251. protected $sourceSnapshotEncryptionKeyDataType = '';
  252. /**
  253. * Output only. [Output Only] The ID value of the snapshot used to create this
  254. * image. This value may be used to determine whether the snapshot was taken
  255. * from the current or a previous instance of a given snapshot name.
  256. *
  257. * @var string
  258. */
  259. public $sourceSnapshotId;
  260. /**
  261. * The type of the image used to create this disk. The default and only valid
  262. * value is RAW.
  263. *
  264. * @var string
  265. */
  266. public $sourceType;
  267. /**
  268. * Output only. [Output Only] The status of the image. An image can be used to
  269. * create other resources, such as instances, only after the image has been
  270. * successfully created and the status is set to READY. Possible values are
  271. * FAILED, PENDING, orREADY.
  272. *
  273. * @var string
  274. */
  275. public $status;
  276. /**
  277. * Cloud Storage bucket storage location of the image (regional or multi-
  278. * regional).
  279. *
  280. * @var string[]
  281. */
  282. public $storageLocations;
  283. /**
  284. * The architecture of the image. Valid values are ARM64 or X86_64.
  285. *
  286. * Accepted values: ARCHITECTURE_UNSPECIFIED, ARM64, X86_64
  287. *
  288. * @param self::ARCHITECTURE_* $architecture
  289. */
  290. public function setArchitecture($architecture)
  291. {
  292. $this->architecture = $architecture;
  293. }
  294. /**
  295. * @return self::ARCHITECTURE_*
  296. */
  297. public function getArchitecture()
  298. {
  299. return $this->architecture;
  300. }
  301. /**
  302. * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
  303. *
  304. * @param string $archiveSizeBytes
  305. */
  306. public function setArchiveSizeBytes($archiveSizeBytes)
  307. {
  308. $this->archiveSizeBytes = $archiveSizeBytes;
  309. }
  310. /**
  311. * @return string
  312. */
  313. public function getArchiveSizeBytes()
  314. {
  315. return $this->archiveSizeBytes;
  316. }
  317. /**
  318. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  319. *
  320. * @param string $creationTimestamp
  321. */
  322. public function setCreationTimestamp($creationTimestamp)
  323. {
  324. $this->creationTimestamp = $creationTimestamp;
  325. }
  326. /**
  327. * @return string
  328. */
  329. public function getCreationTimestamp()
  330. {
  331. return $this->creationTimestamp;
  332. }
  333. /**
  334. * Output only. The deprecation status associated with this image.
  335. *
  336. * @param DeprecationStatus $deprecated
  337. */
  338. public function setDeprecated(DeprecationStatus $deprecated)
  339. {
  340. $this->deprecated = $deprecated;
  341. }
  342. /**
  343. * @return DeprecationStatus
  344. */
  345. public function getDeprecated()
  346. {
  347. return $this->deprecated;
  348. }
  349. /**
  350. * An optional description of this resource. Provide this property when you
  351. * create the resource.
  352. *
  353. * @param string $description
  354. */
  355. public function setDescription($description)
  356. {
  357. $this->description = $description;
  358. }
  359. /**
  360. * @return string
  361. */
  362. public function getDescription()
  363. {
  364. return $this->description;
  365. }
  366. /**
  367. * Size of the image when restored onto a persistent disk (in GB).
  368. *
  369. * @param string $diskSizeGb
  370. */
  371. public function setDiskSizeGb($diskSizeGb)
  372. {
  373. $this->diskSizeGb = $diskSizeGb;
  374. }
  375. /**
  376. * @return string
  377. */
  378. public function getDiskSizeGb()
  379. {
  380. return $this->diskSizeGb;
  381. }
  382. /**
  383. * Output only. Whether this image is created from a confidential compute mode
  384. * disk. [Output Only]: This field is not set by user, but from source disk.
  385. *
  386. * @param bool $enableConfidentialCompute
  387. */
  388. public function setEnableConfidentialCompute($enableConfidentialCompute)
  389. {
  390. $this->enableConfidentialCompute = $enableConfidentialCompute;
  391. }
  392. /**
  393. * @return bool
  394. */
  395. public function getEnableConfidentialCompute()
  396. {
  397. return $this->enableConfidentialCompute;
  398. }
  399. /**
  400. * The name of the image family to which this image belongs. The image family
  401. * name can be from a publicly managed image family provided by Compute
  402. * Engine, or from a custom image family you create. For example,centos-
  403. * stream-9 is a publicly available image family. For more information, see
  404. * Image family best practices.
  405. *
  406. * When creating disks, you can specify an image family instead of a specific
  407. * image name. The image family always returns its latest image that is not
  408. * deprecated. The name of the image family must comply with RFC1035.
  409. *
  410. * @param string $family
  411. */
  412. public function setFamily($family)
  413. {
  414. $this->family = $family;
  415. }
  416. /**
  417. * @return string
  418. */
  419. public function getFamily()
  420. {
  421. return $this->family;
  422. }
  423. /**
  424. * A list of features to enable on the guest operating system. Applicable only
  425. * for bootable images. To see a list of available options, see
  426. * theguestOSfeatures[].type parameter.
  427. *
  428. * @param GuestOsFeature[] $guestOsFeatures
  429. */
  430. public function setGuestOsFeatures($guestOsFeatures)
  431. {
  432. $this->guestOsFeatures = $guestOsFeatures;
  433. }
  434. /**
  435. * @return GuestOsFeature[]
  436. */
  437. public function getGuestOsFeatures()
  438. {
  439. return $this->guestOsFeatures;
  440. }
  441. /**
  442. * Output only. [Output Only] The unique identifier for the resource. This
  443. * identifier is defined by the server.
  444. *
  445. * @param string $id
  446. */
  447. public function setId($id)
  448. {
  449. $this->id = $id;
  450. }
  451. /**
  452. * @return string
  453. */
  454. public function getId()
  455. {
  456. return $this->id;
  457. }
  458. /**
  459. * Encrypts the image using acustomer-supplied encryption key.
  460. *
  461. * After you encrypt an image with a customer-supplied key, you must provide
  462. * the same key if you use the image later (e.g. to create a disk from the
  463. * image).
  464. *
  465. * Customer-supplied encryption keys do not protect access to metadata of the
  466. * disk.
  467. *
  468. * If you do not provide an encryption key when creating the image, then the
  469. * disk will be encrypted using an automatically generated key and you do not
  470. * need to provide a key to use the image later.
  471. *
  472. * @param CustomerEncryptionKey $imageEncryptionKey
  473. */
  474. public function setImageEncryptionKey(CustomerEncryptionKey $imageEncryptionKey)
  475. {
  476. $this->imageEncryptionKey = $imageEncryptionKey;
  477. }
  478. /**
  479. * @return CustomerEncryptionKey
  480. */
  481. public function getImageEncryptionKey()
  482. {
  483. return $this->imageEncryptionKey;
  484. }
  485. /**
  486. * Output only. [Output Only] Type of the resource. Always compute#image for
  487. * images.
  488. *
  489. * @param string $kind
  490. */
  491. public function setKind($kind)
  492. {
  493. $this->kind = $kind;
  494. }
  495. /**
  496. * @return string
  497. */
  498. public function getKind()
  499. {
  500. return $this->kind;
  501. }
  502. /**
  503. * A fingerprint for the labels being applied to this image, which is
  504. * essentially a hash of the labels used for optimistic locking. The
  505. * fingerprint is initially generated by Compute Engine and changes after
  506. * every request to modify or update labels. You must always provide an up-to-
  507. * date fingerprint hash in order to update or change labels, otherwise the
  508. * request will fail with error412 conditionNotMet.
  509. *
  510. * To see the latest fingerprint, make a get() request to retrieve an image.
  511. *
  512. * @param string $labelFingerprint
  513. */
  514. public function setLabelFingerprint($labelFingerprint)
  515. {
  516. $this->labelFingerprint = $labelFingerprint;
  517. }
  518. /**
  519. * @return string
  520. */
  521. public function getLabelFingerprint()
  522. {
  523. return $this->labelFingerprint;
  524. }
  525. /**
  526. * Labels to apply to this image. These can be later modified by the setLabels
  527. * method.
  528. *
  529. * @param string[] $labels
  530. */
  531. public function setLabels($labels)
  532. {
  533. $this->labels = $labels;
  534. }
  535. /**
  536. * @return string[]
  537. */
  538. public function getLabels()
  539. {
  540. return $this->labels;
  541. }
  542. /**
  543. * Integer license codes indicating which licenses are attached to this image.
  544. *
  545. * @param string[] $licenseCodes
  546. */
  547. public function setLicenseCodes($licenseCodes)
  548. {
  549. $this->licenseCodes = $licenseCodes;
  550. }
  551. /**
  552. * @return string[]
  553. */
  554. public function getLicenseCodes()
  555. {
  556. return $this->licenseCodes;
  557. }
  558. /**
  559. * Any applicable license URI.
  560. *
  561. * @param string[] $licenses
  562. */
  563. public function setLicenses($licenses)
  564. {
  565. $this->licenses = $licenses;
  566. }
  567. /**
  568. * @return string[]
  569. */
  570. public function getLicenses()
  571. {
  572. return $this->licenses;
  573. }
  574. /**
  575. * Name of the resource; provided by the client when the resource is created.
  576. * The name must be 1-63 characters long, and comply withRFC1035.
  577. * Specifically, the name must be 1-63 characters long and match the regular
  578. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  579. * must be a lowercase letter, and all following characters must be a dash,
  580. * lowercase letter, or digit, except the last character, which cannot be a
  581. * dash.
  582. *
  583. * @param string $name
  584. */
  585. public function setName($name)
  586. {
  587. $this->name = $name;
  588. }
  589. /**
  590. * @return string
  591. */
  592. public function getName()
  593. {
  594. return $this->name;
  595. }
  596. /**
  597. * Input only. [Input Only] Additional params passed with the request, but not
  598. * persisted as part of resource payload.
  599. *
  600. * @param ImageParams $params
  601. */
  602. public function setParams(ImageParams $params)
  603. {
  604. $this->params = $params;
  605. }
  606. /**
  607. * @return ImageParams
  608. */
  609. public function getParams()
  610. {
  611. return $this->params;
  612. }
  613. /**
  614. * The parameters of the raw disk image.
  615. *
  616. * @param ImageRawDisk $rawDisk
  617. */
  618. public function setRawDisk(ImageRawDisk $rawDisk)
  619. {
  620. $this->rawDisk = $rawDisk;
  621. }
  622. /**
  623. * @return ImageRawDisk
  624. */
  625. public function getRawDisk()
  626. {
  627. return $this->rawDisk;
  628. }
  629. /**
  630. * Output only. Reserved for future use.
  631. *
  632. * @param bool $satisfiesPzi
  633. */
  634. public function setSatisfiesPzi($satisfiesPzi)
  635. {
  636. $this->satisfiesPzi = $satisfiesPzi;
  637. }
  638. /**
  639. * @return bool
  640. */
  641. public function getSatisfiesPzi()
  642. {
  643. return $this->satisfiesPzi;
  644. }
  645. /**
  646. * Output only. [Output Only] Reserved for future use.
  647. *
  648. * @param bool $satisfiesPzs
  649. */
  650. public function setSatisfiesPzs($satisfiesPzs)
  651. {
  652. $this->satisfiesPzs = $satisfiesPzs;
  653. }
  654. /**
  655. * @return bool
  656. */
  657. public function getSatisfiesPzs()
  658. {
  659. return $this->satisfiesPzs;
  660. }
  661. /**
  662. * Output only. [Output Only] Server-defined URL for the resource.
  663. *
  664. * @param string $selfLink
  665. */
  666. public function setSelfLink($selfLink)
  667. {
  668. $this->selfLink = $selfLink;
  669. }
  670. /**
  671. * @return string
  672. */
  673. public function getSelfLink()
  674. {
  675. return $this->selfLink;
  676. }
  677. /**
  678. * Set the secure boot keys of shielded instance.
  679. *
  680. * @param InitialStateConfig $shieldedInstanceInitialState
  681. */
  682. public function setShieldedInstanceInitialState(InitialStateConfig $shieldedInstanceInitialState)
  683. {
  684. $this->shieldedInstanceInitialState = $shieldedInstanceInitialState;
  685. }
  686. /**
  687. * @return InitialStateConfig
  688. */
  689. public function getShieldedInstanceInitialState()
  690. {
  691. return $this->shieldedInstanceInitialState;
  692. }
  693. /**
  694. * URL of the source disk used to create this image. For example, the
  695. * following are valid values: - https://www.googleapis.com/compute/v1/
  696. * projects/project/zones/zone/disks/disk -
  697. * projects/project/zones/zone/disks/disk - zones/zone/disks/disk
  698. *
  699. * In order to create an image, you must provide the full or partial URL of
  700. * one of the following: - The rawDisk.source URL - The sourceDisk
  701. * URL - The sourceImage URL - The sourceSnapshot URL
  702. *
  703. * @param string $sourceDisk
  704. */
  705. public function setSourceDisk($sourceDisk)
  706. {
  707. $this->sourceDisk = $sourceDisk;
  708. }
  709. /**
  710. * @return string
  711. */
  712. public function getSourceDisk()
  713. {
  714. return $this->sourceDisk;
  715. }
  716. /**
  717. * Thecustomer-supplied encryption key of the source disk. Required if the
  718. * source disk is protected by a customer-supplied encryption key.
  719. *
  720. * @param CustomerEncryptionKey $sourceDiskEncryptionKey
  721. */
  722. public function setSourceDiskEncryptionKey(CustomerEncryptionKey $sourceDiskEncryptionKey)
  723. {
  724. $this->sourceDiskEncryptionKey = $sourceDiskEncryptionKey;
  725. }
  726. /**
  727. * @return CustomerEncryptionKey
  728. */
  729. public function getSourceDiskEncryptionKey()
  730. {
  731. return $this->sourceDiskEncryptionKey;
  732. }
  733. /**
  734. * Output only. [Output Only] The ID value of the disk used to create this
  735. * image. This value may be used to determine whether the image was taken from
  736. * the current or a previous instance of a given disk name.
  737. *
  738. * @param string $sourceDiskId
  739. */
  740. public function setSourceDiskId($sourceDiskId)
  741. {
  742. $this->sourceDiskId = $sourceDiskId;
  743. }
  744. /**
  745. * @return string
  746. */
  747. public function getSourceDiskId()
  748. {
  749. return $this->sourceDiskId;
  750. }
  751. /**
  752. * URL of the source image used to create this image. The following are valid
  753. * formats for the URL: -
  754. * https://www.googleapis.com/compute/v1/projects/project_id/global/
  755. * images/image_name - projects/project_id/global/images/image_name
  756. *
  757. * In order to create an image, you must provide the full or partial URL of
  758. * one of the following: - The rawDisk.source URL - The sourceDisk
  759. * URL - The sourceImage URL - The sourceSnapshot URL
  760. *
  761. * @param string $sourceImage
  762. */
  763. public function setSourceImage($sourceImage)
  764. {
  765. $this->sourceImage = $sourceImage;
  766. }
  767. /**
  768. * @return string
  769. */
  770. public function getSourceImage()
  771. {
  772. return $this->sourceImage;
  773. }
  774. /**
  775. * The customer-supplied encryption key of the source image. Required if the
  776. * source image is protected by a customer-supplied encryption key.
  777. *
  778. * @param CustomerEncryptionKey $sourceImageEncryptionKey
  779. */
  780. public function setSourceImageEncryptionKey(CustomerEncryptionKey $sourceImageEncryptionKey)
  781. {
  782. $this->sourceImageEncryptionKey = $sourceImageEncryptionKey;
  783. }
  784. /**
  785. * @return CustomerEncryptionKey
  786. */
  787. public function getSourceImageEncryptionKey()
  788. {
  789. return $this->sourceImageEncryptionKey;
  790. }
  791. /**
  792. * Output only. [Output Only] The ID value of the image used to create this
  793. * image. This value may be used to determine whether the image was taken from
  794. * the current or a previous instance of a given image name.
  795. *
  796. * @param string $sourceImageId
  797. */
  798. public function setSourceImageId($sourceImageId)
  799. {
  800. $this->sourceImageId = $sourceImageId;
  801. }
  802. /**
  803. * @return string
  804. */
  805. public function getSourceImageId()
  806. {
  807. return $this->sourceImageId;
  808. }
  809. /**
  810. * URL of the source snapshot used to create this image. The following are
  811. * valid formats for the URL: -
  812. * https://www.googleapis.com/compute/v1/projects/project_id/global/
  813. * snapshots/snapshot_name -
  814. * projects/project_id/global/snapshots/snapshot_name
  815. *
  816. * In order to create an image, you must provide the full or partial URL of
  817. * one of the following: - The rawDisk.source URL - The sourceDisk
  818. * URL - The sourceImage URL - The sourceSnapshot URL
  819. *
  820. * @param string $sourceSnapshot
  821. */
  822. public function setSourceSnapshot($sourceSnapshot)
  823. {
  824. $this->sourceSnapshot = $sourceSnapshot;
  825. }
  826. /**
  827. * @return string
  828. */
  829. public function getSourceSnapshot()
  830. {
  831. return $this->sourceSnapshot;
  832. }
  833. /**
  834. * The customer-supplied encryption key of the source snapshot. Required if
  835. * the source snapshot is protected by a customer-supplied encryption key.
  836. *
  837. * @param CustomerEncryptionKey $sourceSnapshotEncryptionKey
  838. */
  839. public function setSourceSnapshotEncryptionKey(CustomerEncryptionKey $sourceSnapshotEncryptionKey)
  840. {
  841. $this->sourceSnapshotEncryptionKey = $sourceSnapshotEncryptionKey;
  842. }
  843. /**
  844. * @return CustomerEncryptionKey
  845. */
  846. public function getSourceSnapshotEncryptionKey()
  847. {
  848. return $this->sourceSnapshotEncryptionKey;
  849. }
  850. /**
  851. * Output only. [Output Only] The ID value of the snapshot used to create this
  852. * image. This value may be used to determine whether the snapshot was taken
  853. * from the current or a previous instance of a given snapshot name.
  854. *
  855. * @param string $sourceSnapshotId
  856. */
  857. public function setSourceSnapshotId($sourceSnapshotId)
  858. {
  859. $this->sourceSnapshotId = $sourceSnapshotId;
  860. }
  861. /**
  862. * @return string
  863. */
  864. public function getSourceSnapshotId()
  865. {
  866. return $this->sourceSnapshotId;
  867. }
  868. /**
  869. * The type of the image used to create this disk. The default and only valid
  870. * value is RAW.
  871. *
  872. * Accepted values: RAW
  873. *
  874. * @param self::SOURCE_TYPE_* $sourceType
  875. */
  876. public function setSourceType($sourceType)
  877. {
  878. $this->sourceType = $sourceType;
  879. }
  880. /**
  881. * @return self::SOURCE_TYPE_*
  882. */
  883. public function getSourceType()
  884. {
  885. return $this->sourceType;
  886. }
  887. /**
  888. * Output only. [Output Only] The status of the image. An image can be used to
  889. * create other resources, such as instances, only after the image has been
  890. * successfully created and the status is set to READY. Possible values are
  891. * FAILED, PENDING, orREADY.
  892. *
  893. * Accepted values: DELETING, FAILED, PENDING, READY
  894. *
  895. * @param self::STATUS_* $status
  896. */
  897. public function setStatus($status)
  898. {
  899. $this->status = $status;
  900. }
  901. /**
  902. * @return self::STATUS_*
  903. */
  904. public function getStatus()
  905. {
  906. return $this->status;
  907. }
  908. /**
  909. * Cloud Storage bucket storage location of the image (regional or multi-
  910. * regional).
  911. *
  912. * @param string[] $storageLocations
  913. */
  914. public function setStorageLocations($storageLocations)
  915. {
  916. $this->storageLocations = $storageLocations;
  917. }
  918. /**
  919. * @return string[]
  920. */
  921. public function getStorageLocations()
  922. {
  923. return $this->storageLocations;
  924. }
  925. }
  926. // Adding a class alias for backwards compatibility with the previous class name.
  927. class_alias(Image::class, 'Google_Service_Compute_Image');