All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.compute.model.Disk Maven / Gradle / Ivy

There is a newer version: v1-rev20240903-2.0.0
Show newest version
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.compute.model;

/**
 * Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: *
 * [Zonal](/compute/docs/reference/rest/v1/disks) *
 * [Regional](/compute/docs/reference/rest/v1/regionDisks) Persistent disks are required for running
 * your VM instances. Create both boot and non-boot (data) persistent disks. For more information,
 * read Persistent Disks. For more storage options, read Storage options. The disks resource
 * represents a zonal persistent disk. For more information, read Zonal persistent disks. The
 * regionDisks resource represents a regional persistent disk. For more information, read Regional
 * resources.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class Disk extends com.google.api.client.json.GenericJson { /** * The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be * attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be * attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can * be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk * types. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String accessMode; /** * The architecture of the disk. Valid values are ARM64 or X86_64. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String architecture; /** * Disk asynchronously replicated into this disk. * The value may be {@code null}. */ @com.google.api.client.util.Key private DiskAsyncReplication asyncPrimaryDisk; /** * [Output Only] A list of disks this disk is asynchronously replicated to. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map asyncSecondaryDisks; /** * [Output Only] Creation timestamp in RFC3339 text format. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String creationTimestamp; /** * An optional description of this resource. Provide this property when you create the resource. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String description; /** * Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption * key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk * with a customer-supplied key, you must provide the same key if you use the disk later. For * example, to create a disk snapshot, to create a disk image, to create a machine image, or to * attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the * diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk * is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName * appears in the following format: "diskEncryptionKey.kmsKeyName": * "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key * /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, * then the disk is encrypted using an automatically generated key and you don't need to provide a * key to use the disk later. * The value may be {@code null}. */ @com.google.api.client.util.Key private CustomerEncryptionKey diskEncryptionKey; /** * Whether this disk is using confidential compute mode. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean enableConfidentialCompute; /** * A list of features to enable on the guest operating system. Applicable only for bootable * images. Read Enabling guest operating system features to see a list of available options. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List guestOsFeatures; /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.math.BigInteger id; /** * [Output Only] Type of the resource. Always compute#disk for disks. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String kind; /** * A fingerprint for the labels being applied to this disk, 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, otherwise the request will * fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to * retrieve a disk. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String labelFingerprint; /** * Labels to apply to this disk. These can be later modified by the setLabels method. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map labels; /** * [Output Only] Last attach timestamp in RFC3339 text format. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String lastAttachTimestamp; /** * [Output Only] Last detach timestamp in RFC3339 text format. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String lastDetachTimestamp; /** * Integer license codes indicating which licenses are attached to this disk. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.util.List licenseCodes; /** * A list of publicly visible licenses. Reserved for Google's use. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List licenses; /** * An opaque location hint used to place the disk close to other resources. This field is for use * by internal tools that use the public API. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String locationHint; /** * Name of the resource. Provided by the client when the resource is created. The name must be * 1-63 characters long, and comply with RFC1035. 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. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String name; /** * Internal use only. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String options; /** * Input only. [Input Only] Additional params passed with the request, but not persisted as part * of resource payload. * The value may be {@code null}. */ @com.google.api.client.util.Key private DiskParams params; /** * Physical block size of the persistent disk, in bytes. If not present in a request, a default * value is used. The currently supported size is 4096, other sizes may be added in the future. If * an unsupported value is requested, the error message will list the supported values for the * caller's project. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long physicalBlockSizeBytes; /** * Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per * second that the disk can handle. Values must be between 10,000 and 120,000. For more details, * see the Extreme persistent disk documentation. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long provisionedIops; /** * Indicates how much throughput to provision for the disk. This sets the number of throughput mb * per second that the disk can handle. Values must be greater than or equal to 1. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long provisionedThroughput; /** * [Output Only] URL of the region where the disk resides. Only applicable for regional resources. * You must specify this field as part of the HTTP request URL. It is not settable as a field in * the request body. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String region; /** * URLs of the zones where the disk should be replicated to. Only applicable for regional * resources. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List replicaZones; /** * Resource policies applied to this disk for automatic snapshot creations. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List resourcePolicies; /** * [Output Only] Status information for the disk resource. * The value may be {@code null}. */ @com.google.api.client.util.Key private DiskResourceStatus resourceStatus; /** * Output only. Reserved for future use. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean satisfiesPzi; /** * [Output Only] Reserved for future use. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.Boolean satisfiesPzs; /** * [Output Only] Server-defined fully-qualified URL for this resource. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String selfLink; /** * Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk * using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create * an empty persistent disk. If you specify this field along with a source, the value of sizeGb * must not be less than the size of the source. Acceptable values are greater than 0. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long sizeGb; /** * [Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceConsistencyGroupPolicy; /** * [Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceConsistencyGroupPolicyId; /** * The source disk used to create this disk. 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/projects/project/zones/zone /disks/disk - * https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - * projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - * zones/zone/disks/disk - regions/region/disks/disk * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceDisk; /** * [Output Only] The unique ID of the disk used to create this disk. This value identifies the * exact disk that was used to create this persistent disk. For example, if you created the * persistent disk from a disk that was later deleted and recreated under the same name, the * source disk ID would identify the exact version of the disk that was used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceDiskId; /** * The source image used to create this disk. If the source image is deleted, this field will not * be set. To create a disk with one of the public operating system images, specify the image by * its family name. For example, specify family/debian-9 to use the latest Debian 9 image: * projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a * public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD * To create a disk with a custom image that you created, specify the image name in the following * format: global/images/my-custom-image You can also specify a custom image by its image family, * which returns the latest version of the image in that family. Replace the image name with * family/family-name: global/images/family/my-image-family * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceImage; /** * The customer-supplied encryption key of the source image. Required if the source image is * protected by a customer-supplied encryption key. * The value may be {@code null}. */ @com.google.api.client.util.Key private CustomerEncryptionKey sourceImageEncryptionKey; /** * [Output Only] The ID value of the image used to create this disk. This value identifies the * exact image that was used to create this persistent disk. For example, if you created the * persistent disk from an image that was later deleted and recreated under the same name, the * source image ID would identify the exact version of the image that was used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceImageId; /** * The source instant snapshot used to create this disk. 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/projects/project/zones/zone * /instantSnapshots/instantSnapshot - * projects/project/zones/zone/instantSnapshots/instantSnapshot - * zones/zone/instantSnapshots/instantSnapshot * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceInstantSnapshot; /** * [Output Only] The unique ID of the instant snapshot used to create this disk. This value * identifies the exact instant snapshot that was used to create this persistent disk. For * example, if you created the persistent disk from an instant snapshot that was later deleted and * recreated under the same name, the source instant snapshot ID would identify the exact version * of the instant snapshot that was used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceInstantSnapshotId; /** * The source snapshot used to create this disk. 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/projects/project /global/snapshots/snapshot - * projects/project/global/snapshots/snapshot - global/snapshots/snapshot * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceSnapshot; /** * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is * protected by a customer-supplied encryption key. * The value may be {@code null}. */ @com.google.api.client.util.Key private CustomerEncryptionKey sourceSnapshotEncryptionKey; /** * [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the * exact snapshot that was used to create this persistent disk. For example, if you created the * persistent disk from a snapshot that was later deleted and recreated under the same name, the * source snapshot ID would identify the exact version of the snapshot that was used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceSnapshotId; /** * The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip- * compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. * Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized * for creating multiple disks from a source storage object. To create many disks from a source * storage object, use gcloud compute images import instead. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sourceStorageObject; /** * [Output Only] The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: * Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is * ready for use. - DELETING: Disk is deleting. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String status; /** * The storage pool in which the new disk is created. 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/projects/project/zones/zone /storagePools/storagePool - * projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String storagePool; /** * URL of the disk type resource describing which disk type to use to create the disk. Provide * this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See * Persistent disk types. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * [Output Only] Links to the users of the disk (attached instances) in form: * projects/project/zones/zone/instances/instance * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List users; /** * [Output Only] URL of the zone where the disk resides. You must specify this field as part of * the HTTP request URL. It is not settable as a field in the request body. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String zone; /** * The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be * attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be * attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can * be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk * types. * @return value or {@code null} for none */ public java.lang.String getAccessMode() { return accessMode; } /** * The access mode of the disk. - READ_WRITE_SINGLE: The default AccessMode, means the disk can be * attached to single instance in RW mode. - READ_WRITE_MANY: The AccessMode means the disk can be * attached to multiple instances in RW mode. - READ_ONLY_MANY: The AccessMode means the disk can * be attached to multiple instances in RO mode. The AccessMode is only valid for Hyperdisk disk * types. * @param accessMode accessMode or {@code null} for none */ public Disk setAccessMode(java.lang.String accessMode) { this.accessMode = accessMode; return this; } /** * The architecture of the disk. Valid values are ARM64 or X86_64. * @return value or {@code null} for none */ public java.lang.String getArchitecture() { return architecture; } /** * The architecture of the disk. Valid values are ARM64 or X86_64. * @param architecture architecture or {@code null} for none */ public Disk setArchitecture(java.lang.String architecture) { this.architecture = architecture; return this; } /** * Disk asynchronously replicated into this disk. * @return value or {@code null} for none */ public DiskAsyncReplication getAsyncPrimaryDisk() { return asyncPrimaryDisk; } /** * Disk asynchronously replicated into this disk. * @param asyncPrimaryDisk asyncPrimaryDisk or {@code null} for none */ public Disk setAsyncPrimaryDisk(DiskAsyncReplication asyncPrimaryDisk) { this.asyncPrimaryDisk = asyncPrimaryDisk; return this; } /** * [Output Only] A list of disks this disk is asynchronously replicated to. * @return value or {@code null} for none */ public java.util.Map getAsyncSecondaryDisks() { return asyncSecondaryDisks; } /** * [Output Only] A list of disks this disk is asynchronously replicated to. * @param asyncSecondaryDisks asyncSecondaryDisks or {@code null} for none */ public Disk setAsyncSecondaryDisks(java.util.Map asyncSecondaryDisks) { this.asyncSecondaryDisks = asyncSecondaryDisks; return this; } /** * [Output Only] Creation timestamp in RFC3339 text format. * @return value or {@code null} for none */ public java.lang.String getCreationTimestamp() { return creationTimestamp; } /** * [Output Only] Creation timestamp in RFC3339 text format. * @param creationTimestamp creationTimestamp or {@code null} for none */ public Disk setCreationTimestamp(java.lang.String creationTimestamp) { this.creationTimestamp = creationTimestamp; return this; } /** * An optional description of this resource. Provide this property when you create the resource. * @return value or {@code null} for none */ public java.lang.String getDescription() { return description; } /** * An optional description of this resource. Provide this property when you create the resource. * @param description description or {@code null} for none */ public Disk setDescription(java.lang.String description) { this.description = description; return this; } /** * Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption * key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk * with a customer-supplied key, you must provide the same key if you use the disk later. For * example, to create a disk snapshot, to create a disk image, to create a machine image, or to * attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the * diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk * is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName * appears in the following format: "diskEncryptionKey.kmsKeyName": * "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key * /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, * then the disk is encrypted using an automatically generated key and you don't need to provide a * key to use the disk later. * @return value or {@code null} for none */ public CustomerEncryptionKey getDiskEncryptionKey() { return diskEncryptionKey; } /** * Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption * key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk * with a customer-supplied key, you must provide the same key if you use the disk later. For * example, to create a disk snapshot, to create a disk image, to create a machine image, or to * attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the * diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk * is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName * appears in the following format: "diskEncryptionKey.kmsKeyName": * "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key * /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, * then the disk is encrypted using an automatically generated key and you don't need to provide a * key to use the disk later. * @param diskEncryptionKey diskEncryptionKey or {@code null} for none */ public Disk setDiskEncryptionKey(CustomerEncryptionKey diskEncryptionKey) { this.diskEncryptionKey = diskEncryptionKey; return this; } /** * Whether this disk is using confidential compute mode. * @return value or {@code null} for none */ public java.lang.Boolean getEnableConfidentialCompute() { return enableConfidentialCompute; } /** * Whether this disk is using confidential compute mode. * @param enableConfidentialCompute enableConfidentialCompute or {@code null} for none */ public Disk setEnableConfidentialCompute(java.lang.Boolean enableConfidentialCompute) { this.enableConfidentialCompute = enableConfidentialCompute; return this; } /** * A list of features to enable on the guest operating system. Applicable only for bootable * images. Read Enabling guest operating system features to see a list of available options. * @return value or {@code null} for none */ public java.util.List getGuestOsFeatures() { return guestOsFeatures; } /** * A list of features to enable on the guest operating system. Applicable only for bootable * images. Read Enabling guest operating system features to see a list of available options. * @param guestOsFeatures guestOsFeatures or {@code null} for none */ public Disk setGuestOsFeatures(java.util.List guestOsFeatures) { this.guestOsFeatures = guestOsFeatures; return this; } /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @return value or {@code null} for none */ public java.math.BigInteger getId() { return id; } /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @param id id or {@code null} for none */ public Disk setId(java.math.BigInteger id) { this.id = id; return this; } /** * [Output Only] Type of the resource. Always compute#disk for disks. * @return value or {@code null} for none */ public java.lang.String getKind() { return kind; } /** * [Output Only] Type of the resource. Always compute#disk for disks. * @param kind kind or {@code null} for none */ public Disk setKind(java.lang.String kind) { this.kind = kind; return this; } /** * A fingerprint for the labels being applied to this disk, 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, otherwise the request will * fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to * retrieve a disk. * @see #decodeLabelFingerprint() * @return value or {@code null} for none */ public java.lang.String getLabelFingerprint() { return labelFingerprint; } /** * A fingerprint for the labels being applied to this disk, 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, otherwise the request will * fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to * retrieve a disk. * @see #getLabelFingerprint() * @return Base64 decoded value or {@code null} for none * * @since 1.14 */ public byte[] decodeLabelFingerprint() { return com.google.api.client.util.Base64.decodeBase64(labelFingerprint); } /** * A fingerprint for the labels being applied to this disk, 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, otherwise the request will * fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to * retrieve a disk. * @see #encodeLabelFingerprint() * @param labelFingerprint labelFingerprint or {@code null} for none */ public Disk setLabelFingerprint(java.lang.String labelFingerprint) { this.labelFingerprint = labelFingerprint; return this; } /** * A fingerprint for the labels being applied to this disk, 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, otherwise the request will * fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to * retrieve a disk. * @see #setLabelFingerprint() * *

* The value is encoded Base64 or {@code null} for none. *

* * @since 1.14 */ public Disk encodeLabelFingerprint(byte[] labelFingerprint) { this.labelFingerprint = com.google.api.client.util.Base64.encodeBase64URLSafeString(labelFingerprint); return this; } /** * Labels to apply to this disk. These can be later modified by the setLabels method. * @return value or {@code null} for none */ public java.util.Map getLabels() { return labels; } /** * Labels to apply to this disk. These can be later modified by the setLabels method. * @param labels labels or {@code null} for none */ public Disk setLabels(java.util.Map labels) { this.labels = labels; return this; } /** * [Output Only] Last attach timestamp in RFC3339 text format. * @return value or {@code null} for none */ public java.lang.String getLastAttachTimestamp() { return lastAttachTimestamp; } /** * [Output Only] Last attach timestamp in RFC3339 text format. * @param lastAttachTimestamp lastAttachTimestamp or {@code null} for none */ public Disk setLastAttachTimestamp(java.lang.String lastAttachTimestamp) { this.lastAttachTimestamp = lastAttachTimestamp; return this; } /** * [Output Only] Last detach timestamp in RFC3339 text format. * @return value or {@code null} for none */ public java.lang.String getLastDetachTimestamp() { return lastDetachTimestamp; } /** * [Output Only] Last detach timestamp in RFC3339 text format. * @param lastDetachTimestamp lastDetachTimestamp or {@code null} for none */ public Disk setLastDetachTimestamp(java.lang.String lastDetachTimestamp) { this.lastDetachTimestamp = lastDetachTimestamp; return this; } /** * Integer license codes indicating which licenses are attached to this disk. * @return value or {@code null} for none */ public java.util.List getLicenseCodes() { return licenseCodes; } /** * Integer license codes indicating which licenses are attached to this disk. * @param licenseCodes licenseCodes or {@code null} for none */ public Disk setLicenseCodes(java.util.List licenseCodes) { this.licenseCodes = licenseCodes; return this; } /** * A list of publicly visible licenses. Reserved for Google's use. * @return value or {@code null} for none */ public java.util.List getLicenses() { return licenses; } /** * A list of publicly visible licenses. Reserved for Google's use. * @param licenses licenses or {@code null} for none */ public Disk setLicenses(java.util.List licenses) { this.licenses = licenses; return this; } /** * An opaque location hint used to place the disk close to other resources. This field is for use * by internal tools that use the public API. * @return value or {@code null} for none */ public java.lang.String getLocationHint() { return locationHint; } /** * An opaque location hint used to place the disk close to other resources. This field is for use * by internal tools that use the public API. * @param locationHint locationHint or {@code null} for none */ public Disk setLocationHint(java.lang.String locationHint) { this.locationHint = locationHint; return this; } /** * Name of the resource. Provided by the client when the resource is created. The name must be * 1-63 characters long, and comply with RFC1035. 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. * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * Name of the resource. Provided by the client when the resource is created. The name must be * 1-63 characters long, and comply with RFC1035. 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 name name or {@code null} for none */ public Disk setName(java.lang.String name) { this.name = name; return this; } /** * Internal use only. * @return value or {@code null} for none */ public java.lang.String getOptions() { return options; } /** * Internal use only. * @param options options or {@code null} for none */ public Disk setOptions(java.lang.String options) { this.options = options; return this; } /** * Input only. [Input Only] Additional params passed with the request, but not persisted as part * of resource payload. * @return value or {@code null} for none */ public DiskParams getParams() { return params; } /** * Input only. [Input Only] Additional params passed with the request, but not persisted as part * of resource payload. * @param params params or {@code null} for none */ public Disk setParams(DiskParams params) { this.params = params; return this; } /** * Physical block size of the persistent disk, in bytes. If not present in a request, a default * value is used. The currently supported size is 4096, other sizes may be added in the future. If * an unsupported value is requested, the error message will list the supported values for the * caller's project. * @return value or {@code null} for none */ public java.lang.Long getPhysicalBlockSizeBytes() { return physicalBlockSizeBytes; } /** * Physical block size of the persistent disk, in bytes. If not present in a request, a default * value is used. The currently supported size is 4096, other sizes may be added in the future. If * an unsupported value is requested, the error message will list the supported values for the * caller's project. * @param physicalBlockSizeBytes physicalBlockSizeBytes or {@code null} for none */ public Disk setPhysicalBlockSizeBytes(java.lang.Long physicalBlockSizeBytes) { this.physicalBlockSizeBytes = physicalBlockSizeBytes; return this; } /** * Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per * second that the disk can handle. Values must be between 10,000 and 120,000. For more details, * see the Extreme persistent disk documentation. * @return value or {@code null} for none */ public java.lang.Long getProvisionedIops() { return provisionedIops; } /** * Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per * second that the disk can handle. Values must be between 10,000 and 120,000. For more details, * see the Extreme persistent disk documentation. * @param provisionedIops provisionedIops or {@code null} for none */ public Disk setProvisionedIops(java.lang.Long provisionedIops) { this.provisionedIops = provisionedIops; return this; } /** * Indicates how much throughput to provision for the disk. This sets the number of throughput mb * per second that the disk can handle. Values must be greater than or equal to 1. * @return value or {@code null} for none */ public java.lang.Long getProvisionedThroughput() { return provisionedThroughput; } /** * Indicates how much throughput to provision for the disk. This sets the number of throughput mb * per second that the disk can handle. Values must be greater than or equal to 1. * @param provisionedThroughput provisionedThroughput or {@code null} for none */ public Disk setProvisionedThroughput(java.lang.Long provisionedThroughput) { this.provisionedThroughput = provisionedThroughput; return this; } /** * [Output Only] URL of the region where the disk resides. Only applicable for regional resources. * You must specify this field as part of the HTTP request URL. It is not settable as a field in * the request body. * @return value or {@code null} for none */ public java.lang.String getRegion() { return region; } /** * [Output Only] URL of the region where the disk resides. Only applicable for regional resources. * You must specify this field as part of the HTTP request URL. It is not settable as a field in * the request body. * @param region region or {@code null} for none */ public Disk setRegion(java.lang.String region) { this.region = region; return this; } /** * URLs of the zones where the disk should be replicated to. Only applicable for regional * resources. * @return value or {@code null} for none */ public java.util.List getReplicaZones() { return replicaZones; } /** * URLs of the zones where the disk should be replicated to. Only applicable for regional * resources. * @param replicaZones replicaZones or {@code null} for none */ public Disk setReplicaZones(java.util.List replicaZones) { this.replicaZones = replicaZones; return this; } /** * Resource policies applied to this disk for automatic snapshot creations. * @return value or {@code null} for none */ public java.util.List getResourcePolicies() { return resourcePolicies; } /** * Resource policies applied to this disk for automatic snapshot creations. * @param resourcePolicies resourcePolicies or {@code null} for none */ public Disk setResourcePolicies(java.util.List resourcePolicies) { this.resourcePolicies = resourcePolicies; return this; } /** * [Output Only] Status information for the disk resource. * @return value or {@code null} for none */ public DiskResourceStatus getResourceStatus() { return resourceStatus; } /** * [Output Only] Status information for the disk resource. * @param resourceStatus resourceStatus or {@code null} for none */ public Disk setResourceStatus(DiskResourceStatus resourceStatus) { this.resourceStatus = resourceStatus; return this; } /** * Output only. Reserved for future use. * @return value or {@code null} for none */ public java.lang.Boolean getSatisfiesPzi() { return satisfiesPzi; } /** * Output only. Reserved for future use. * @param satisfiesPzi satisfiesPzi or {@code null} for none */ public Disk setSatisfiesPzi(java.lang.Boolean satisfiesPzi) { this.satisfiesPzi = satisfiesPzi; return this; } /** * [Output Only] Reserved for future use. * @return value or {@code null} for none */ public java.lang.Boolean getSatisfiesPzs() { return satisfiesPzs; } /** * [Output Only] Reserved for future use. * @param satisfiesPzs satisfiesPzs or {@code null} for none */ public Disk setSatisfiesPzs(java.lang.Boolean satisfiesPzs) { this.satisfiesPzs = satisfiesPzs; return this; } /** * [Output Only] Server-defined fully-qualified URL for this resource. * @return value or {@code null} for none */ public java.lang.String getSelfLink() { return selfLink; } /** * [Output Only] Server-defined fully-qualified URL for this resource. * @param selfLink selfLink or {@code null} for none */ public Disk setSelfLink(java.lang.String selfLink) { this.selfLink = selfLink; return this; } /** * Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk * using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create * an empty persistent disk. If you specify this field along with a source, the value of sizeGb * must not be less than the size of the source. Acceptable values are greater than 0. * @return value or {@code null} for none */ public java.lang.Long getSizeGb() { return sizeGb; } /** * Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk * using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create * an empty persistent disk. If you specify this field along with a source, the value of sizeGb * must not be less than the size of the source. Acceptable values are greater than 0. * @param sizeGb sizeGb or {@code null} for none */ public Disk setSizeGb(java.lang.Long sizeGb) { this.sizeGb = sizeGb; return this; } /** * [Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * @return value or {@code null} for none */ public java.lang.String getSourceConsistencyGroupPolicy() { return sourceConsistencyGroupPolicy; } /** * [Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * @param sourceConsistencyGroupPolicy sourceConsistencyGroupPolicy or {@code null} for none */ public Disk setSourceConsistencyGroupPolicy(java.lang.String sourceConsistencyGroupPolicy) { this.sourceConsistencyGroupPolicy = sourceConsistencyGroupPolicy; return this; } /** * [Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * @return value or {@code null} for none */ public java.lang.String getSourceConsistencyGroupPolicyId() { return sourceConsistencyGroupPolicyId; } /** * [Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk that was created using * a consistency group. * @param sourceConsistencyGroupPolicyId sourceConsistencyGroupPolicyId or {@code null} for none */ public Disk setSourceConsistencyGroupPolicyId(java.lang.String sourceConsistencyGroupPolicyId) { this.sourceConsistencyGroupPolicyId = sourceConsistencyGroupPolicyId; return this; } /** * The source disk used to create this disk. 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/projects/project/zones/zone /disks/disk - * https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - * projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - * zones/zone/disks/disk - regions/region/disks/disk * @return value or {@code null} for none */ public java.lang.String getSourceDisk() { return sourceDisk; } /** * The source disk used to create this disk. 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/projects/project/zones/zone /disks/disk - * https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - * projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - * zones/zone/disks/disk - regions/region/disks/disk * @param sourceDisk sourceDisk or {@code null} for none */ public Disk setSourceDisk(java.lang.String sourceDisk) { this.sourceDisk = sourceDisk; return this; } /** * [Output Only] The unique ID of the disk used to create this disk. This value identifies the * exact disk that was used to create this persistent disk. For example, if you created the * persistent disk from a disk that was later deleted and recreated under the same name, the * source disk ID would identify the exact version of the disk that was used. * @return value or {@code null} for none */ public java.lang.String getSourceDiskId() { return sourceDiskId; } /** * [Output Only] The unique ID of the disk used to create this disk. This value identifies the * exact disk that was used to create this persistent disk. For example, if you created the * persistent disk from a disk that was later deleted and recreated under the same name, the * source disk ID would identify the exact version of the disk that was used. * @param sourceDiskId sourceDiskId or {@code null} for none */ public Disk setSourceDiskId(java.lang.String sourceDiskId) { this.sourceDiskId = sourceDiskId; return this; } /** * The source image used to create this disk. If the source image is deleted, this field will not * be set. To create a disk with one of the public operating system images, specify the image by * its family name. For example, specify family/debian-9 to use the latest Debian 9 image: * projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a * public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD * To create a disk with a custom image that you created, specify the image name in the following * format: global/images/my-custom-image You can also specify a custom image by its image family, * which returns the latest version of the image in that family. Replace the image name with * family/family-name: global/images/family/my-image-family * @return value or {@code null} for none */ public java.lang.String getSourceImage() { return sourceImage; } /** * The source image used to create this disk. If the source image is deleted, this field will not * be set. To create a disk with one of the public operating system images, specify the image by * its family name. For example, specify family/debian-9 to use the latest Debian 9 image: * projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a * public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD * To create a disk with a custom image that you created, specify the image name in the following * format: global/images/my-custom-image You can also specify a custom image by its image family, * which returns the latest version of the image in that family. Replace the image name with * family/family-name: global/images/family/my-image-family * @param sourceImage sourceImage or {@code null} for none */ public Disk setSourceImage(java.lang.String sourceImage) { this.sourceImage = sourceImage; return this; } /** * The customer-supplied encryption key of the source image. Required if the source image is * protected by a customer-supplied encryption key. * @return value or {@code null} for none */ public CustomerEncryptionKey getSourceImageEncryptionKey() { return sourceImageEncryptionKey; } /** * The customer-supplied encryption key of the source image. Required if the source image is * protected by a customer-supplied encryption key. * @param sourceImageEncryptionKey sourceImageEncryptionKey or {@code null} for none */ public Disk setSourceImageEncryptionKey(CustomerEncryptionKey sourceImageEncryptionKey) { this.sourceImageEncryptionKey = sourceImageEncryptionKey; return this; } /** * [Output Only] The ID value of the image used to create this disk. This value identifies the * exact image that was used to create this persistent disk. For example, if you created the * persistent disk from an image that was later deleted and recreated under the same name, the * source image ID would identify the exact version of the image that was used. * @return value or {@code null} for none */ public java.lang.String getSourceImageId() { return sourceImageId; } /** * [Output Only] The ID value of the image used to create this disk. This value identifies the * exact image that was used to create this persistent disk. For example, if you created the * persistent disk from an image that was later deleted and recreated under the same name, the * source image ID would identify the exact version of the image that was used. * @param sourceImageId sourceImageId or {@code null} for none */ public Disk setSourceImageId(java.lang.String sourceImageId) { this.sourceImageId = sourceImageId; return this; } /** * The source instant snapshot used to create this disk. 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/projects/project/zones/zone * /instantSnapshots/instantSnapshot - * projects/project/zones/zone/instantSnapshots/instantSnapshot - * zones/zone/instantSnapshots/instantSnapshot * @return value or {@code null} for none */ public java.lang.String getSourceInstantSnapshot() { return sourceInstantSnapshot; } /** * The source instant snapshot used to create this disk. 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/projects/project/zones/zone * /instantSnapshots/instantSnapshot - * projects/project/zones/zone/instantSnapshots/instantSnapshot - * zones/zone/instantSnapshots/instantSnapshot * @param sourceInstantSnapshot sourceInstantSnapshot or {@code null} for none */ public Disk setSourceInstantSnapshot(java.lang.String sourceInstantSnapshot) { this.sourceInstantSnapshot = sourceInstantSnapshot; return this; } /** * [Output Only] The unique ID of the instant snapshot used to create this disk. This value * identifies the exact instant snapshot that was used to create this persistent disk. For * example, if you created the persistent disk from an instant snapshot that was later deleted and * recreated under the same name, the source instant snapshot ID would identify the exact version * of the instant snapshot that was used. * @return value or {@code null} for none */ public java.lang.String getSourceInstantSnapshotId() { return sourceInstantSnapshotId; } /** * [Output Only] The unique ID of the instant snapshot used to create this disk. This value * identifies the exact instant snapshot that was used to create this persistent disk. For * example, if you created the persistent disk from an instant snapshot that was later deleted and * recreated under the same name, the source instant snapshot ID would identify the exact version * of the instant snapshot that was used. * @param sourceInstantSnapshotId sourceInstantSnapshotId or {@code null} for none */ public Disk setSourceInstantSnapshotId(java.lang.String sourceInstantSnapshotId) { this.sourceInstantSnapshotId = sourceInstantSnapshotId; return this; } /** * The source snapshot used to create this disk. 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/projects/project /global/snapshots/snapshot - * projects/project/global/snapshots/snapshot - global/snapshots/snapshot * @return value or {@code null} for none */ public java.lang.String getSourceSnapshot() { return sourceSnapshot; } /** * The source snapshot used to create this disk. 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/projects/project /global/snapshots/snapshot - * projects/project/global/snapshots/snapshot - global/snapshots/snapshot * @param sourceSnapshot sourceSnapshot or {@code null} for none */ public Disk setSourceSnapshot(java.lang.String sourceSnapshot) { this.sourceSnapshot = sourceSnapshot; return this; } /** * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is * protected by a customer-supplied encryption key. * @return value or {@code null} for none */ public CustomerEncryptionKey getSourceSnapshotEncryptionKey() { return sourceSnapshotEncryptionKey; } /** * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is * protected by a customer-supplied encryption key. * @param sourceSnapshotEncryptionKey sourceSnapshotEncryptionKey or {@code null} for none */ public Disk setSourceSnapshotEncryptionKey(CustomerEncryptionKey sourceSnapshotEncryptionKey) { this.sourceSnapshotEncryptionKey = sourceSnapshotEncryptionKey; return this; } /** * [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the * exact snapshot that was used to create this persistent disk. For example, if you created the * persistent disk from a snapshot that was later deleted and recreated under the same name, the * source snapshot ID would identify the exact version of the snapshot that was used. * @return value or {@code null} for none */ public java.lang.String getSourceSnapshotId() { return sourceSnapshotId; } /** * [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the * exact snapshot that was used to create this persistent disk. For example, if you created the * persistent disk from a snapshot that was later deleted and recreated under the same name, the * source snapshot ID would identify the exact version of the snapshot that was used. * @param sourceSnapshotId sourceSnapshotId or {@code null} for none */ public Disk setSourceSnapshotId(java.lang.String sourceSnapshotId) { this.sourceSnapshotId = sourceSnapshotId; return this; } /** * The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip- * compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. * Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized * for creating multiple disks from a source storage object. To create many disks from a source * storage object, use gcloud compute images import instead. * @return value or {@code null} for none */ public java.lang.String getSourceStorageObject() { return sourceStorageObject; } /** * The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip- * compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. * Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized * for creating multiple disks from a source storage object. To create many disks from a source * storage object, use gcloud compute images import instead. * @param sourceStorageObject sourceStorageObject or {@code null} for none */ public Disk setSourceStorageObject(java.lang.String sourceStorageObject) { this.sourceStorageObject = sourceStorageObject; return this; } /** * [Output Only] The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: * Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is * ready for use. - DELETING: Disk is deleting. * @return value or {@code null} for none */ public java.lang.String getStatus() { return status; } /** * [Output Only] The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: * Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is * ready for use. - DELETING: Disk is deleting. * @param status status or {@code null} for none */ public Disk setStatus(java.lang.String status) { this.status = status; return this; } /** * The storage pool in which the new disk is created. 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/projects/project/zones/zone /storagePools/storagePool - * projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool * @return value or {@code null} for none */ public java.lang.String getStoragePool() { return storagePool; } /** * The storage pool in which the new disk is created. 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/projects/project/zones/zone /storagePools/storagePool - * projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool * @param storagePool storagePool or {@code null} for none */ public Disk setStoragePool(java.lang.String storagePool) { this.storagePool = storagePool; return this; } /** * URL of the disk type resource describing which disk type to use to create the disk. Provide * this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See * Persistent disk types. * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * URL of the disk type resource describing which disk type to use to create the disk. Provide * this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See * Persistent disk types. * @param type type or {@code null} for none */ public Disk setType(java.lang.String type) { this.type = type; return this; } /** * [Output Only] Links to the users of the disk (attached instances) in form: * projects/project/zones/zone/instances/instance * @return value or {@code null} for none */ public java.util.List getUsers() { return users; } /** * [Output Only] Links to the users of the disk (attached instances) in form: * projects/project/zones/zone/instances/instance * @param users users or {@code null} for none */ public Disk setUsers(java.util.List users) { this.users = users; return this; } /** * [Output Only] URL of the zone where the disk resides. You must specify this field as part of * the HTTP request URL. It is not settable as a field in the request body. * @return value or {@code null} for none */ public java.lang.String getZone() { return zone; } /** * [Output Only] URL of the zone where the disk resides. You must specify this field as part of * the HTTP request URL. It is not settable as a field in the request body. * @param zone zone or {@code null} for none */ public Disk setZone(java.lang.String zone) { this.zone = zone; return this; } @Override public Disk set(String fieldName, Object value) { return (Disk) super.set(fieldName, value); } @Override public Disk clone() { return (Disk) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy