// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.compute.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.compute.outputs.GetRegionInstanceTemplateDiskDiskEncryptionKey;
import com.pulumi.gcp.compute.outputs.GetRegionInstanceTemplateDiskSourceImageEncryptionKey;
import com.pulumi.gcp.compute.outputs.GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;

@CustomType
public final class GetRegionInstanceTemplateDisk {
    /**
     * @return Whether or not the disk should be auto-deleted.
     * This defaults to true.
     * 
     */
    private Boolean autoDelete;
    /**
     * @return Indicates that this is a boot disk.
     * 
     */
    private Boolean boot;
    /**
     * @return A unique device name that is reflected into the
     * /dev/  tree of a Linux operating system running within the instance. If not
     * specified, the server chooses a default device name to apply to this disk.
     * 
     */
    private String deviceName;
    /**
     * @return Encrypts or decrypts a disk using a customer-supplied encryption key.
     * 
     */
    private List<GetRegionInstanceTemplateDiskDiskEncryptionKey> diskEncryptionKeys;
    /**
     * @return Name of the disk. When not provided, this defaults
     * to the name of the instance.
     * 
     */
    private String diskName;
    /**
     * @return The size of the image in gigabytes. If not
     * specified, it will inherit the size of its base image. For SCRATCH disks,
     * the size must be exactly 375GB.
     * 
     */
    private Integer diskSizeGb;
    /**
     * @return The GCE disk type. Such as `&#34;pd-ssd&#34;`, `&#34;local-ssd&#34;`,
     * `&#34;pd-balanced&#34;` or `&#34;pd-standard&#34;`.
     * 
     */
    private String diskType;
    /**
     * @return Specifies the disk interface to use for attaching this disk,
     * which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI
     * and the request will fail if you attempt to attach a persistent disk in any other format
     * than SCSI. Local SSDs can use either NVME or SCSI.
     * 
     */
    private String interface_;
    /**
     * @return (Optional) A set of ket/value label pairs to assign to disk created from
     * this template
     * 
     */
    private Map<String,String> labels;
    /**
     * @return The mode in which to attach this disk, either READ_WRITE
     * or READ_ONLY. If you are attaching or creating a boot disk, this must
     * read-write mode.
     * 
     */
    private String mode;
    private Integer provisionedIops;
    /**
     * @return (Optional) -- A list of short names of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
     * 
     */
    private List<String> resourcePolicies;
    /**
     * @return The name (**not self_link**)
     * of the disk (such as those managed by `gcp.compute.Disk`) to attach.
     * &gt; **Note:** Either `source` or `source_image` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     * 
     */
    private String source;
    /**
     * @return The image from which to
     * initialize this disk. This can be one of: the image&#39;s `self_link`,
     * `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`.
     * &gt; **Note:** Either `source` or `source_image` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     * 
     */
    private String sourceImage;
    private List<GetRegionInstanceTemplateDiskSourceImageEncryptionKey> sourceImageEncryptionKeys;
    private String sourceSnapshot;
    private List<GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey> sourceSnapshotEncryptionKeys;
    /**
     * @return The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
     * 
     */
    private String type;

    private GetRegionInstanceTemplateDisk() {}
    /**
     * @return Whether or not the disk should be auto-deleted.
     * This defaults to true.
     * 
     */
    public Boolean autoDelete() {
        return this.autoDelete;
    }
    /**
     * @return Indicates that this is a boot disk.
     * 
     */
    public Boolean boot() {
        return this.boot;
    }
    /**
     * @return A unique device name that is reflected into the
     * /dev/  tree of a Linux operating system running within the instance. If not
     * specified, the server chooses a default device name to apply to this disk.
     * 
     */
    public String deviceName() {
        return this.deviceName;
    }
    /**
     * @return Encrypts or decrypts a disk using a customer-supplied encryption key.
     * 
     */
    public List<GetRegionInstanceTemplateDiskDiskEncryptionKey> diskEncryptionKeys() {
        return this.diskEncryptionKeys;
    }
    /**
     * @return Name of the disk. When not provided, this defaults
     * to the name of the instance.
     * 
     */
    public String diskName() {
        return this.diskName;
    }
    /**
     * @return The size of the image in gigabytes. If not
     * specified, it will inherit the size of its base image. For SCRATCH disks,
     * the size must be exactly 375GB.
     * 
     */
    public Integer diskSizeGb() {
        return this.diskSizeGb;
    }
    /**
     * @return The GCE disk type. Such as `&#34;pd-ssd&#34;`, `&#34;local-ssd&#34;`,
     * `&#34;pd-balanced&#34;` or `&#34;pd-standard&#34;`.
     * 
     */
    public String diskType() {
        return this.diskType;
    }
    /**
     * @return Specifies the disk interface to use for attaching this disk,
     * which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI
     * and the request will fail if you attempt to attach a persistent disk in any other format
     * than SCSI. Local SSDs can use either NVME or SCSI.
     * 
     */
    public String interface_() {
        return this.interface_;
    }
    /**
     * @return (Optional) A set of ket/value label pairs to assign to disk created from
     * this template
     * 
     */
    public Map<String,String> labels() {
        return this.labels;
    }
    /**
     * @return The mode in which to attach this disk, either READ_WRITE
     * or READ_ONLY. If you are attaching or creating a boot disk, this must
     * read-write mode.
     * 
     */
    public String mode() {
        return this.mode;
    }
    public Integer provisionedIops() {
        return this.provisionedIops;
    }
    /**
     * @return (Optional) -- A list of short names of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
     * 
     */
    public List<String> resourcePolicies() {
        return this.resourcePolicies;
    }
    /**
     * @return The name (**not self_link**)
     * of the disk (such as those managed by `gcp.compute.Disk`) to attach.
     * &gt; **Note:** Either `source` or `source_image` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     * 
     */
    public String source() {
        return this.source;
    }
    /**
     * @return The image from which to
     * initialize this disk. This can be one of: the image&#39;s `self_link`,
     * `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`.
     * &gt; **Note:** Either `source` or `source_image` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     * 
     */
    public String sourceImage() {
        return this.sourceImage;
    }
    public List<GetRegionInstanceTemplateDiskSourceImageEncryptionKey> sourceImageEncryptionKeys() {
        return this.sourceImageEncryptionKeys;
    }
    public String sourceSnapshot() {
        return this.sourceSnapshot;
    }
    public List<GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey> sourceSnapshotEncryptionKeys() {
        return this.sourceSnapshotEncryptionKeys;
    }
    /**
     * @return The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
     * 
     */
    public String type() {
        return this.type;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(GetRegionInstanceTemplateDisk defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Boolean autoDelete;
        private Boolean boot;
        private String deviceName;
        private List<GetRegionInstanceTemplateDiskDiskEncryptionKey> diskEncryptionKeys;
        private String diskName;
        private Integer diskSizeGb;
        private String diskType;
        private String interface_;
        private Map<String,String> labels;
        private String mode;
        private Integer provisionedIops;
        private List<String> resourcePolicies;
        private String source;
        private String sourceImage;
        private List<GetRegionInstanceTemplateDiskSourceImageEncryptionKey> sourceImageEncryptionKeys;
        private String sourceSnapshot;
        private List<GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey> sourceSnapshotEncryptionKeys;
        private String type;
        public Builder() {}
        public Builder(GetRegionInstanceTemplateDisk defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.autoDelete = defaults.autoDelete;
    	      this.boot = defaults.boot;
    	      this.deviceName = defaults.deviceName;
    	      this.diskEncryptionKeys = defaults.diskEncryptionKeys;
    	      this.diskName = defaults.diskName;
    	      this.diskSizeGb = defaults.diskSizeGb;
    	      this.diskType = defaults.diskType;
    	      this.interface_ = defaults.interface_;
    	      this.labels = defaults.labels;
    	      this.mode = defaults.mode;
    	      this.provisionedIops = defaults.provisionedIops;
    	      this.resourcePolicies = defaults.resourcePolicies;
    	      this.source = defaults.source;
    	      this.sourceImage = defaults.sourceImage;
    	      this.sourceImageEncryptionKeys = defaults.sourceImageEncryptionKeys;
    	      this.sourceSnapshot = defaults.sourceSnapshot;
    	      this.sourceSnapshotEncryptionKeys = defaults.sourceSnapshotEncryptionKeys;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder autoDelete(Boolean autoDelete) {
            this.autoDelete = Objects.requireNonNull(autoDelete);
            return this;
        }
        @CustomType.Setter
        public Builder boot(Boolean boot) {
            this.boot = Objects.requireNonNull(boot);
            return this;
        }
        @CustomType.Setter
        public Builder deviceName(String deviceName) {
            this.deviceName = Objects.requireNonNull(deviceName);
            return this;
        }
        @CustomType.Setter
        public Builder diskEncryptionKeys(List<GetRegionInstanceTemplateDiskDiskEncryptionKey> diskEncryptionKeys) {
            this.diskEncryptionKeys = Objects.requireNonNull(diskEncryptionKeys);
            return this;
        }
        public Builder diskEncryptionKeys(GetRegionInstanceTemplateDiskDiskEncryptionKey... diskEncryptionKeys) {
            return diskEncryptionKeys(List.of(diskEncryptionKeys));
        }
        @CustomType.Setter
        public Builder diskName(String diskName) {
            this.diskName = Objects.requireNonNull(diskName);
            return this;
        }
        @CustomType.Setter
        public Builder diskSizeGb(Integer diskSizeGb) {
            this.diskSizeGb = Objects.requireNonNull(diskSizeGb);
            return this;
        }
        @CustomType.Setter
        public Builder diskType(String diskType) {
            this.diskType = Objects.requireNonNull(diskType);
            return this;
        }
        @CustomType.Setter("interface")
        public Builder interface_(String interface_) {
            this.interface_ = Objects.requireNonNull(interface_);
            return this;
        }
        @CustomType.Setter
        public Builder labels(Map<String,String> labels) {
            this.labels = Objects.requireNonNull(labels);
            return this;
        }
        @CustomType.Setter
        public Builder mode(String mode) {
            this.mode = Objects.requireNonNull(mode);
            return this;
        }
        @CustomType.Setter
        public Builder provisionedIops(Integer provisionedIops) {
            this.provisionedIops = Objects.requireNonNull(provisionedIops);
            return this;
        }
        @CustomType.Setter
        public Builder resourcePolicies(List<String> resourcePolicies) {
            this.resourcePolicies = Objects.requireNonNull(resourcePolicies);
            return this;
        }
        public Builder resourcePolicies(String... resourcePolicies) {
            return resourcePolicies(List.of(resourcePolicies));
        }
        @CustomType.Setter
        public Builder source(String source) {
            this.source = Objects.requireNonNull(source);
            return this;
        }
        @CustomType.Setter
        public Builder sourceImage(String sourceImage) {
            this.sourceImage = Objects.requireNonNull(sourceImage);
            return this;
        }
        @CustomType.Setter
        public Builder sourceImageEncryptionKeys(List<GetRegionInstanceTemplateDiskSourceImageEncryptionKey> sourceImageEncryptionKeys) {
            this.sourceImageEncryptionKeys = Objects.requireNonNull(sourceImageEncryptionKeys);
            return this;
        }
        public Builder sourceImageEncryptionKeys(GetRegionInstanceTemplateDiskSourceImageEncryptionKey... sourceImageEncryptionKeys) {
            return sourceImageEncryptionKeys(List.of(sourceImageEncryptionKeys));
        }
        @CustomType.Setter
        public Builder sourceSnapshot(String sourceSnapshot) {
            this.sourceSnapshot = Objects.requireNonNull(sourceSnapshot);
            return this;
        }
        @CustomType.Setter
        public Builder sourceSnapshotEncryptionKeys(List<GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey> sourceSnapshotEncryptionKeys) {
            this.sourceSnapshotEncryptionKeys = Objects.requireNonNull(sourceSnapshotEncryptionKeys);
            return this;
        }
        public Builder sourceSnapshotEncryptionKeys(GetRegionInstanceTemplateDiskSourceSnapshotEncryptionKey... sourceSnapshotEncryptionKeys) {
            return sourceSnapshotEncryptionKeys(List.of(sourceSnapshotEncryptionKeys));
        }
        @CustomType.Setter
        public Builder type(String type) {
            this.type = Objects.requireNonNull(type);
            return this;
        }
        public GetRegionInstanceTemplateDisk build() {
            final var o = new GetRegionInstanceTemplateDisk();
            o.autoDelete = autoDelete;
            o.boot = boot;
            o.deviceName = deviceName;
            o.diskEncryptionKeys = diskEncryptionKeys;
            o.diskName = diskName;
            o.diskSizeGb = diskSizeGb;
            o.diskType = diskType;
            o.interface_ = interface_;
            o.labels = labels;
            o.mode = mode;
            o.provisionedIops = provisionedIops;
            o.resourcePolicies = resourcePolicies;
            o.source = source;
            o.sourceImage = sourceImage;
            o.sourceImageEncryptionKeys = sourceImageEncryptionKeys;
            o.sourceSnapshot = sourceSnapshot;
            o.sourceSnapshotEncryptionKeys = sourceSnapshotEncryptionKeys;
            o.type = type;
            return o;
        }
    }
}
