// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Vra.Blockdevice
{
    /// <summary>
    /// Creates a VMware vRealize Automation block device resource.
    /// 
    /// ## Example Usage
    /// ### S
    /// 
    /// The following example shows how to create a block device resource.
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Vra = Pulumiverse.Vra;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var disk1 = new Vra.Blockdevice.BlockDevice("disk1", new()
    ///     {
    ///         CapacityInGb = 10,
    ///         ProjectId = @var.Project_id,
    ///         Persistent = true,
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [VraResourceType("vra:blockdevice/blockDevice:BlockDevice")]
    public partial class BlockDevice : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Capacity of block device in GB.
        /// </summary>
        [Output("capacityInGb")]
        public Output<int> CapacityInGb { get; private set; } = null!;

        /// <summary>
        /// Storage, network, and extensibility constraints to be applied when provisioning through the project.
        /// </summary>
        [Output("constraints")]
        public Output<ImmutableArray<Outputs.BlockDeviceConstraint>> Constraints { get; private set; } = null!;

        /// <summary>
        /// Date when entity was created. Date and time format is ISO 8601 and UTC.
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        [Output("customProperties")]
        public Output<ImmutableDictionary<string, object>> CustomProperties { get; private set; } = null!;

        /// <summary>
        /// ID of deployment associated with resource.
        /// </summary>
        [Output("deploymentId")]
        public Output<string> DeploymentId { get; private set; } = null!;

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Content of a disk, base64 encoded.
        /// </summary>
        [Output("diskContentBase64")]
        public Output<string?> DiskContentBase64 { get; private set; } = null!;

        /// <summary>
        /// Indicates whether block device should be encrypted or not.
        /// </summary>
        [Output("encrypted")]
        public Output<bool?> Encrypted { get; private set; } = null!;

        /// <summary>
        /// Indicates whether snapshots of block devices should be included in the state. Applies only to first class block devices.
        /// </summary>
        [Output("expandSnapshots")]
        public Output<bool?> ExpandSnapshots { get; private set; } = null!;

        /// <summary>
        /// External entity ID on provider side.
        /// </summary>
        [Output("externalId")]
        public Output<string> ExternalId { get; private set; } = null!;

        /// <summary>
        /// External regionId of resource.
        /// </summary>
        [Output("externalRegionId")]
        public Output<string> ExternalRegionId { get; private set; } = null!;

        /// <summary>
        /// External zoneId of resource.
        /// </summary>
        [Output("externalZoneId")]
        public Output<string> ExternalZoneId { get; private set; } = null!;

        /// <summary>
        /// HATEOAS of the entity
        /// </summary>
        [Output("links")]
        public Output<ImmutableArray<Outputs.BlockDeviceLink>> Links { get; private set; } = null!;

        /// <summary>
        /// Human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// ID of organization that block device snapshot belongs to.
        /// </summary>
        [Output("orgId")]
        public Output<string> OrgId { get; private set; } = null!;

        /// <summary>
        /// Email of block device snapshot owner.
        /// </summary>
        [Output("owner")]
        public Output<string> Owner { get; private set; } = null!;

        /// <summary>
        /// Indicates whether block device survives a delete action.
        /// </summary>
        [Output("persistent")]
        public Output<bool?> Persistent { get; private set; } = null!;

        /// <summary>
        /// ID of project that current user belongs to.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// Indicates if the disk must be completely destroyed or should be kept in the system. Valid only for block devices with ‘persistent’ set to true. Used to destroy the resource.
        /// </summary>
        [Output("purge")]
        public Output<bool?> Purge { get; private set; } = null!;

        /// <summary>
        /// Represents a machine snapshot.
        /// </summary>
        [Output("snapshots")]
        public Output<ImmutableArray<Outputs.BlockDeviceSnapshot>> Snapshots { get; private set; } = null!;

        /// <summary>
        /// URI to use for block device. Example: ami-0d4cfd66
        /// </summary>
        [Output("sourceReference")]
        public Output<string?> SourceReference { get; private set; } = null!;

        /// <summary>
        /// Status of block device.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Set of tag keys and values to apply to the resource instance.  
        /// Example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        [Output("tags")]
        public Output<ImmutableArray<Outputs.BlockDeviceTag>> Tags { get; private set; } = null!;

        /// <summary>
        /// Date when entity was last updated. Date and time format is ISO 8601 and UTC.
        /// </summary>
        [Output("updatedAt")]
        public Output<string> UpdatedAt { get; private set; } = null!;


        /// <summary>
        /// Create a BlockDevice resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public BlockDevice(string name, BlockDeviceArgs args, CustomResourceOptions? options = null)
            : base("vra:blockdevice/blockDevice:BlockDevice", name, args ?? new BlockDeviceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private BlockDevice(string name, Input<string> id, BlockDeviceState? state = null, CustomResourceOptions? options = null)
            : base("vra:blockdevice/blockDevice:BlockDevice", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing BlockDevice resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static BlockDevice Get(string name, Input<string> id, BlockDeviceState? state = null, CustomResourceOptions? options = null)
        {
            return new BlockDevice(name, id, state, options);
        }
    }

    public sealed class BlockDeviceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Capacity of block device in GB.
        /// </summary>
        [Input("capacityInGb", required: true)]
        public Input<int> CapacityInGb { get; set; } = null!;

        [Input("constraints")]
        private InputList<Inputs.BlockDeviceConstraintArgs>? _constraints;

        /// <summary>
        /// Storage, network, and extensibility constraints to be applied when provisioning through the project.
        /// </summary>
        public InputList<Inputs.BlockDeviceConstraintArgs> Constraints
        {
            get => _constraints ?? (_constraints = new InputList<Inputs.BlockDeviceConstraintArgs>());
            set => _constraints = value;
        }

        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// ID of deployment associated with resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Content of a disk, base64 encoded.
        /// </summary>
        [Input("diskContentBase64")]
        public Input<string>? DiskContentBase64 { get; set; }

        /// <summary>
        /// Indicates whether block device should be encrypted or not.
        /// </summary>
        [Input("encrypted")]
        public Input<bool>? Encrypted { get; set; }

        /// <summary>
        /// Indicates whether snapshots of block devices should be included in the state. Applies only to first class block devices.
        /// </summary>
        [Input("expandSnapshots")]
        public Input<bool>? ExpandSnapshots { get; set; }

        /// <summary>
        /// Human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Indicates whether block device survives a delete action.
        /// </summary>
        [Input("persistent")]
        public Input<bool>? Persistent { get; set; }

        /// <summary>
        /// ID of project that current user belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        /// <summary>
        /// Indicates if the disk must be completely destroyed or should be kept in the system. Valid only for block devices with ‘persistent’ set to true. Used to destroy the resource.
        /// </summary>
        [Input("purge")]
        public Input<bool>? Purge { get; set; }

        /// <summary>
        /// URI to use for block device. Example: ami-0d4cfd66
        /// </summary>
        [Input("sourceReference")]
        public Input<string>? SourceReference { get; set; }

        [Input("tags")]
        private InputList<Inputs.BlockDeviceTagArgs>? _tags;

        /// <summary>
        /// Set of tag keys and values to apply to the resource instance.  
        /// Example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public InputList<Inputs.BlockDeviceTagArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.BlockDeviceTagArgs>());
            set => _tags = value;
        }

        public BlockDeviceArgs()
        {
        }
        public static new BlockDeviceArgs Empty => new BlockDeviceArgs();
    }

    public sealed class BlockDeviceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Capacity of block device in GB.
        /// </summary>
        [Input("capacityInGb")]
        public Input<int>? CapacityInGb { get; set; }

        [Input("constraints")]
        private InputList<Inputs.BlockDeviceConstraintGetArgs>? _constraints;

        /// <summary>
        /// Storage, network, and extensibility constraints to be applied when provisioning through the project.
        /// </summary>
        public InputList<Inputs.BlockDeviceConstraintGetArgs> Constraints
        {
            get => _constraints ?? (_constraints = new InputList<Inputs.BlockDeviceConstraintGetArgs>());
            set => _constraints = value;
        }

        /// <summary>
        /// Date when entity was created. Date and time format is ISO 8601 and UTC.
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        [Input("customProperties")]
        private InputMap<object>? _customProperties;

        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        public InputMap<object> CustomProperties
        {
            get => _customProperties ?? (_customProperties = new InputMap<object>());
            set => _customProperties = value;
        }

        /// <summary>
        /// ID of deployment associated with resource.
        /// </summary>
        [Input("deploymentId")]
        public Input<string>? DeploymentId { get; set; }

        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Content of a disk, base64 encoded.
        /// </summary>
        [Input("diskContentBase64")]
        public Input<string>? DiskContentBase64 { get; set; }

        /// <summary>
        /// Indicates whether block device should be encrypted or not.
        /// </summary>
        [Input("encrypted")]
        public Input<bool>? Encrypted { get; set; }

        /// <summary>
        /// Indicates whether snapshots of block devices should be included in the state. Applies only to first class block devices.
        /// </summary>
        [Input("expandSnapshots")]
        public Input<bool>? ExpandSnapshots { get; set; }

        /// <summary>
        /// External entity ID on provider side.
        /// </summary>
        [Input("externalId")]
        public Input<string>? ExternalId { get; set; }

        /// <summary>
        /// External regionId of resource.
        /// </summary>
        [Input("externalRegionId")]
        public Input<string>? ExternalRegionId { get; set; }

        /// <summary>
        /// External zoneId of resource.
        /// </summary>
        [Input("externalZoneId")]
        public Input<string>? ExternalZoneId { get; set; }

        [Input("links")]
        private InputList<Inputs.BlockDeviceLinkGetArgs>? _links;

        /// <summary>
        /// HATEOAS of the entity
        /// </summary>
        public InputList<Inputs.BlockDeviceLinkGetArgs> Links
        {
            get => _links ?? (_links = new InputList<Inputs.BlockDeviceLinkGetArgs>());
            set => _links = value;
        }

        /// <summary>
        /// Human-friendly name used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// ID of organization that block device snapshot belongs to.
        /// </summary>
        [Input("orgId")]
        public Input<string>? OrgId { get; set; }

        /// <summary>
        /// Email of block device snapshot owner.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

        /// <summary>
        /// Indicates whether block device survives a delete action.
        /// </summary>
        [Input("persistent")]
        public Input<bool>? Persistent { get; set; }

        /// <summary>
        /// ID of project that current user belongs to.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// Indicates if the disk must be completely destroyed or should be kept in the system. Valid only for block devices with ‘persistent’ set to true. Used to destroy the resource.
        /// </summary>
        [Input("purge")]
        public Input<bool>? Purge { get; set; }

        [Input("snapshots")]
        private InputList<Inputs.BlockDeviceSnapshotGetArgs>? _snapshots;

        /// <summary>
        /// Represents a machine snapshot.
        /// </summary>
        public InputList<Inputs.BlockDeviceSnapshotGetArgs> Snapshots
        {
            get => _snapshots ?? (_snapshots = new InputList<Inputs.BlockDeviceSnapshotGetArgs>());
            set => _snapshots = value;
        }

        /// <summary>
        /// URI to use for block device. Example: ami-0d4cfd66
        /// </summary>
        [Input("sourceReference")]
        public Input<string>? SourceReference { get; set; }

        /// <summary>
        /// Status of block device.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("tags")]
        private InputList<Inputs.BlockDeviceTagGetArgs>? _tags;

        /// <summary>
        /// Set of tag keys and values to apply to the resource instance.  
        /// Example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public InputList<Inputs.BlockDeviceTagGetArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.BlockDeviceTagGetArgs>());
            set => _tags = value;
        }

        /// <summary>
        /// Date when entity was last updated. Date and time format is ISO 8601 and UTC.
        /// </summary>
        [Input("updatedAt")]
        public Input<string>? UpdatedAt { get; set; }

        public BlockDeviceState()
        {
        }
        public static new BlockDeviceState Empty => new BlockDeviceState();
    }
}
