InstantSnapshot.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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 InstantSnapshot extends \Google\Model
  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. /**
  33. * InstantSnapshot creation is in progress.
  34. */
  35. public const STATUS_CREATING = 'CREATING';
  36. /**
  37. * InstantSnapshot is currently being deleted.
  38. */
  39. public const STATUS_DELETING = 'DELETING';
  40. /**
  41. * InstantSnapshot creation failed.
  42. */
  43. public const STATUS_FAILED = 'FAILED';
  44. /**
  45. * InstantSnapshot has been created successfully.
  46. */
  47. public const STATUS_READY = 'READY';
  48. /**
  49. * InstantSnapshot is currently unavailable and cannot be used for Disk
  50. * restoration
  51. */
  52. public const STATUS_UNAVAILABLE = 'UNAVAILABLE';
  53. /**
  54. * Output only. [Output Only] The architecture of the instant snapshot. Valid
  55. * values are ARM64 or X86_64.
  56. *
  57. * @var string
  58. */
  59. public $architecture;
  60. /**
  61. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  62. *
  63. * @var string
  64. */
  65. public $creationTimestamp;
  66. /**
  67. * An optional description of this resource. Provide this property when you
  68. * create the resource.
  69. *
  70. * @var string
  71. */
  72. public $description;
  73. /**
  74. * Output only. [Output Only] Size of the source disk, specified in GB.
  75. *
  76. * @var string
  77. */
  78. public $diskSizeGb;
  79. /**
  80. * Output only. [Output Only] The unique identifier for the resource. This
  81. * identifier is defined by the server.
  82. *
  83. * @var string
  84. */
  85. public $id;
  86. /**
  87. * Output only. [Output Only] Type of the resource.
  88. * Alwayscompute#instantSnapshot for InstantSnapshot resources.
  89. *
  90. * @var string
  91. */
  92. public $kind;
  93. /**
  94. * A fingerprint for the labels being applied to this InstantSnapshot, which
  95. * is essentially a hash of the labels set used for optimistic locking. The
  96. * fingerprint is initially generated by Compute Engine and changes after
  97. * every request to modify or update labels. You must always provide an up-to-
  98. * date fingerprint hash in order to update or change labels, otherwise the
  99. * request will fail with error412 conditionNotMet.
  100. *
  101. * To see the latest fingerprint, make a get() request to retrieve a
  102. * InstantSnapshot.
  103. *
  104. * @var string
  105. */
  106. public $labelFingerprint;
  107. /**
  108. * Labels to apply to this InstantSnapshot. These can be later modified by the
  109. * setLabels method. Label values may be empty.
  110. *
  111. * @var string[]
  112. */
  113. public $labels;
  114. /**
  115. * Name of the resource; provided by the client when the resource is created.
  116. * The name must be 1-63 characters long, and comply withRFC1035.
  117. * Specifically, the name must be 1-63 characters long and match the regular
  118. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  119. * must be a lowercase letter, and all following characters must be a dash,
  120. * lowercase letter, or digit, except the last character, which cannot be a
  121. * dash.
  122. *
  123. * @var string
  124. */
  125. public $name;
  126. protected $paramsType = InstantSnapshotParams::class;
  127. protected $paramsDataType = '';
  128. /**
  129. * Output only. [Output Only] URL of the region where the instant snapshot
  130. * resides. You must specify this field as part of the HTTP request URL. It is
  131. * not settable as a field in the request body.
  132. *
  133. * @var string
  134. */
  135. public $region;
  136. protected $resourceStatusType = InstantSnapshotResourceStatus::class;
  137. protected $resourceStatusDataType = '';
  138. /**
  139. * Output only. Reserved for future use.
  140. *
  141. * @var bool
  142. */
  143. public $satisfiesPzi;
  144. /**
  145. * Output only. [Output Only] Reserved for future use.
  146. *
  147. * @var bool
  148. */
  149. public $satisfiesPzs;
  150. /**
  151. * Output only. [Output Only] Server-defined URL for the resource.
  152. *
  153. * @var string
  154. */
  155. public $selfLink;
  156. /**
  157. * Output only. [Output Only] Server-defined URL for this resource's resource
  158. * id.
  159. *
  160. * @var string
  161. */
  162. public $selfLinkWithId;
  163. /**
  164. * URL of the source disk used to create this instant snapshot. Note that the
  165. * source disk must be in the same zone/region as the instant snapshot to be
  166. * created. This can be a full or valid partial URL. For example, the
  167. * following are valid values: - https://www.googleapis.c
  168. * om/compute/v1/projects/project/zones/zone/disks/disk - h
  169. * ttps://www.googleapis.com/compute/v1/projects/project/regions/region/disks/
  170. * disk - projects/project/zones/zone/disks/disk
  171. * - projects/project/regions/region/disks/disk -
  172. * zones/zone/disks/disk - regions/region/disks/disk
  173. *
  174. * @var string
  175. */
  176. public $sourceDisk;
  177. /**
  178. * Output only. [Output Only] The ID value of the disk used to create this
  179. * InstantSnapshot. This value may be used to determine whether the
  180. * InstantSnapshot was taken from the current or a previous instance of a
  181. * given disk name.
  182. *
  183. * @var string
  184. */
  185. public $sourceDiskId;
  186. /**
  187. * Output only. [Output Only] The status of the instantSnapshot. This can
  188. * beCREATING, DELETING, FAILED, orREADY.
  189. *
  190. * @var string
  191. */
  192. public $status;
  193. /**
  194. * Output only. [Output Only] URL of the zone where the instant snapshot
  195. * resides. You must specify this field as part of the HTTP request URL. It is
  196. * not settable as a field in the request body.
  197. *
  198. * @var string
  199. */
  200. public $zone;
  201. /**
  202. * Output only. [Output Only] The architecture of the instant snapshot. Valid
  203. * values are ARM64 or X86_64.
  204. *
  205. * Accepted values: ARCHITECTURE_UNSPECIFIED, ARM64, X86_64
  206. *
  207. * @param self::ARCHITECTURE_* $architecture
  208. */
  209. public function setArchitecture($architecture)
  210. {
  211. $this->architecture = $architecture;
  212. }
  213. /**
  214. * @return self::ARCHITECTURE_*
  215. */
  216. public function getArchitecture()
  217. {
  218. return $this->architecture;
  219. }
  220. /**
  221. * Output only. [Output Only] Creation timestamp inRFC3339 text format.
  222. *
  223. * @param string $creationTimestamp
  224. */
  225. public function setCreationTimestamp($creationTimestamp)
  226. {
  227. $this->creationTimestamp = $creationTimestamp;
  228. }
  229. /**
  230. * @return string
  231. */
  232. public function getCreationTimestamp()
  233. {
  234. return $this->creationTimestamp;
  235. }
  236. /**
  237. * An optional description of this resource. Provide this property when you
  238. * create the resource.
  239. *
  240. * @param string $description
  241. */
  242. public function setDescription($description)
  243. {
  244. $this->description = $description;
  245. }
  246. /**
  247. * @return string
  248. */
  249. public function getDescription()
  250. {
  251. return $this->description;
  252. }
  253. /**
  254. * Output only. [Output Only] Size of the source disk, specified in GB.
  255. *
  256. * @param string $diskSizeGb
  257. */
  258. public function setDiskSizeGb($diskSizeGb)
  259. {
  260. $this->diskSizeGb = $diskSizeGb;
  261. }
  262. /**
  263. * @return string
  264. */
  265. public function getDiskSizeGb()
  266. {
  267. return $this->diskSizeGb;
  268. }
  269. /**
  270. * Output only. [Output Only] The unique identifier for the resource. This
  271. * identifier is defined by the server.
  272. *
  273. * @param string $id
  274. */
  275. public function setId($id)
  276. {
  277. $this->id = $id;
  278. }
  279. /**
  280. * @return string
  281. */
  282. public function getId()
  283. {
  284. return $this->id;
  285. }
  286. /**
  287. * Output only. [Output Only] Type of the resource.
  288. * Alwayscompute#instantSnapshot for InstantSnapshot resources.
  289. *
  290. * @param string $kind
  291. */
  292. public function setKind($kind)
  293. {
  294. $this->kind = $kind;
  295. }
  296. /**
  297. * @return string
  298. */
  299. public function getKind()
  300. {
  301. return $this->kind;
  302. }
  303. /**
  304. * A fingerprint for the labels being applied to this InstantSnapshot, which
  305. * is essentially a hash of the labels set used for optimistic locking. The
  306. * fingerprint is initially generated by Compute Engine and changes after
  307. * every request to modify or update labels. You must always provide an up-to-
  308. * date fingerprint hash in order to update or change labels, otherwise the
  309. * request will fail with error412 conditionNotMet.
  310. *
  311. * To see the latest fingerprint, make a get() request to retrieve a
  312. * InstantSnapshot.
  313. *
  314. * @param string $labelFingerprint
  315. */
  316. public function setLabelFingerprint($labelFingerprint)
  317. {
  318. $this->labelFingerprint = $labelFingerprint;
  319. }
  320. /**
  321. * @return string
  322. */
  323. public function getLabelFingerprint()
  324. {
  325. return $this->labelFingerprint;
  326. }
  327. /**
  328. * Labels to apply to this InstantSnapshot. These can be later modified by the
  329. * setLabels method. Label values may be empty.
  330. *
  331. * @param string[] $labels
  332. */
  333. public function setLabels($labels)
  334. {
  335. $this->labels = $labels;
  336. }
  337. /**
  338. * @return string[]
  339. */
  340. public function getLabels()
  341. {
  342. return $this->labels;
  343. }
  344. /**
  345. * Name of the resource; provided by the client when the resource is created.
  346. * The name must be 1-63 characters long, and comply withRFC1035.
  347. * Specifically, the name must be 1-63 characters long and match the regular
  348. * expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character
  349. * must be a lowercase letter, and all following characters must be a dash,
  350. * lowercase letter, or digit, except the last character, which cannot be a
  351. * dash.
  352. *
  353. * @param string $name
  354. */
  355. public function setName($name)
  356. {
  357. $this->name = $name;
  358. }
  359. /**
  360. * @return string
  361. */
  362. public function getName()
  363. {
  364. return $this->name;
  365. }
  366. /**
  367. * Input only. Additional params passed with the request, but not persisted as
  368. * part of resource payload.
  369. *
  370. * @param InstantSnapshotParams $params
  371. */
  372. public function setParams(InstantSnapshotParams $params)
  373. {
  374. $this->params = $params;
  375. }
  376. /**
  377. * @return InstantSnapshotParams
  378. */
  379. public function getParams()
  380. {
  381. return $this->params;
  382. }
  383. /**
  384. * Output only. [Output Only] URL of the region where the instant snapshot
  385. * resides. You must specify this field as part of the HTTP request URL. It is
  386. * not settable as a field in the request body.
  387. *
  388. * @param string $region
  389. */
  390. public function setRegion($region)
  391. {
  392. $this->region = $region;
  393. }
  394. /**
  395. * @return string
  396. */
  397. public function getRegion()
  398. {
  399. return $this->region;
  400. }
  401. /**
  402. * Output only. [Output Only] Status information for the instant snapshot
  403. * resource.
  404. *
  405. * @param InstantSnapshotResourceStatus $resourceStatus
  406. */
  407. public function setResourceStatus(InstantSnapshotResourceStatus $resourceStatus)
  408. {
  409. $this->resourceStatus = $resourceStatus;
  410. }
  411. /**
  412. * @return InstantSnapshotResourceStatus
  413. */
  414. public function getResourceStatus()
  415. {
  416. return $this->resourceStatus;
  417. }
  418. /**
  419. * Output only. Reserved for future use.
  420. *
  421. * @param bool $satisfiesPzi
  422. */
  423. public function setSatisfiesPzi($satisfiesPzi)
  424. {
  425. $this->satisfiesPzi = $satisfiesPzi;
  426. }
  427. /**
  428. * @return bool
  429. */
  430. public function getSatisfiesPzi()
  431. {
  432. return $this->satisfiesPzi;
  433. }
  434. /**
  435. * Output only. [Output Only] Reserved for future use.
  436. *
  437. * @param bool $satisfiesPzs
  438. */
  439. public function setSatisfiesPzs($satisfiesPzs)
  440. {
  441. $this->satisfiesPzs = $satisfiesPzs;
  442. }
  443. /**
  444. * @return bool
  445. */
  446. public function getSatisfiesPzs()
  447. {
  448. return $this->satisfiesPzs;
  449. }
  450. /**
  451. * Output only. [Output Only] Server-defined URL for the resource.
  452. *
  453. * @param string $selfLink
  454. */
  455. public function setSelfLink($selfLink)
  456. {
  457. $this->selfLink = $selfLink;
  458. }
  459. /**
  460. * @return string
  461. */
  462. public function getSelfLink()
  463. {
  464. return $this->selfLink;
  465. }
  466. /**
  467. * Output only. [Output Only] Server-defined URL for this resource's resource
  468. * id.
  469. *
  470. * @param string $selfLinkWithId
  471. */
  472. public function setSelfLinkWithId($selfLinkWithId)
  473. {
  474. $this->selfLinkWithId = $selfLinkWithId;
  475. }
  476. /**
  477. * @return string
  478. */
  479. public function getSelfLinkWithId()
  480. {
  481. return $this->selfLinkWithId;
  482. }
  483. /**
  484. * URL of the source disk used to create this instant snapshot. Note that the
  485. * source disk must be in the same zone/region as the instant snapshot to be
  486. * created. This can be a full or valid partial URL. For example, the
  487. * following are valid values: - https://www.googleapis.c
  488. * om/compute/v1/projects/project/zones/zone/disks/disk - h
  489. * ttps://www.googleapis.com/compute/v1/projects/project/regions/region/disks/
  490. * disk - projects/project/zones/zone/disks/disk
  491. * - projects/project/regions/region/disks/disk -
  492. * zones/zone/disks/disk - regions/region/disks/disk
  493. *
  494. * @param string $sourceDisk
  495. */
  496. public function setSourceDisk($sourceDisk)
  497. {
  498. $this->sourceDisk = $sourceDisk;
  499. }
  500. /**
  501. * @return string
  502. */
  503. public function getSourceDisk()
  504. {
  505. return $this->sourceDisk;
  506. }
  507. /**
  508. * Output only. [Output Only] The ID value of the disk used to create this
  509. * InstantSnapshot. This value may be used to determine whether the
  510. * InstantSnapshot was taken from the current or a previous instance of a
  511. * given disk name.
  512. *
  513. * @param string $sourceDiskId
  514. */
  515. public function setSourceDiskId($sourceDiskId)
  516. {
  517. $this->sourceDiskId = $sourceDiskId;
  518. }
  519. /**
  520. * @return string
  521. */
  522. public function getSourceDiskId()
  523. {
  524. return $this->sourceDiskId;
  525. }
  526. /**
  527. * Output only. [Output Only] The status of the instantSnapshot. This can
  528. * beCREATING, DELETING, FAILED, orREADY.
  529. *
  530. * Accepted values: CREATING, DELETING, FAILED, READY, UNAVAILABLE
  531. *
  532. * @param self::STATUS_* $status
  533. */
  534. public function setStatus($status)
  535. {
  536. $this->status = $status;
  537. }
  538. /**
  539. * @return self::STATUS_*
  540. */
  541. public function getStatus()
  542. {
  543. return $this->status;
  544. }
  545. /**
  546. * Output only. [Output Only] URL of the zone where the instant snapshot
  547. * resides. You must specify this field as part of the HTTP request URL. It is
  548. * not settable as a field in the request body.
  549. *
  550. * @param string $zone
  551. */
  552. public function setZone($zone)
  553. {
  554. $this->zone = $zone;
  555. }
  556. /**
  557. * @return string
  558. */
  559. public function getZone()
  560. {
  561. return $this->zone;
  562. }
  563. }
  564. // Adding a class alias for backwards compatibility with the previous class name.
  565. class_alias(InstantSnapshot::class, 'Google_Service_Compute_InstantSnapshot');