CustomerEncryptionKeyProtectedDisk.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 CustomerEncryptionKeyProtectedDisk extends \Google\Model
  19. {
  20. protected $diskEncryptionKeyType = CustomerEncryptionKey::class;
  21. protected $diskEncryptionKeyDataType = '';
  22. /**
  23. * Specifies a valid partial or full URL to an existing Persistent Disk
  24. * resource. This field is only applicable for persistent disks. For example:
  25. *
  26. * "source": "/compute/v1/projects/project_id/zones/zone/disks/ disk_name
  27. *
  28. * @var string
  29. */
  30. public $source;
  31. /**
  32. * Decrypts data associated with the disk with acustomer-supplied encryption
  33. * key.
  34. *
  35. * @param CustomerEncryptionKey $diskEncryptionKey
  36. */
  37. public function setDiskEncryptionKey(CustomerEncryptionKey $diskEncryptionKey)
  38. {
  39. $this->diskEncryptionKey = $diskEncryptionKey;
  40. }
  41. /**
  42. * @return CustomerEncryptionKey
  43. */
  44. public function getDiskEncryptionKey()
  45. {
  46. return $this->diskEncryptionKey;
  47. }
  48. /**
  49. * Specifies a valid partial or full URL to an existing Persistent Disk
  50. * resource. This field is only applicable for persistent disks. For example:
  51. *
  52. * "source": "/compute/v1/projects/project_id/zones/zone/disks/ disk_name
  53. *
  54. * @param string $source
  55. */
  56. public function setSource($source)
  57. {
  58. $this->source = $source;
  59. }
  60. /**
  61. * @return string
  62. */
  63. public function getSource()
  64. {
  65. return $this->source;
  66. }
  67. }
  68. // Adding a class alias for backwards compatibility with the previous class name.
  69. class_alias(CustomerEncryptionKeyProtectedDisk::class, 'Google_Service_Compute_CustomerEncryptionKeyProtectedDisk');