<reponame>pierskarsenbarg/pulumi-nutanix<filename>sdk/dotnet/FoundationImage.cs// *** 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 PiersKarsenbarg.Nutanix
{
    /// <summary>
    /// Uploads hypervisor or AOS image to foundation.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Nutanix = PiersKarsenbarg.Nutanix;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var nos_image = new Nutanix.FoundationImage("nos-image", new Nutanix.FoundationImageArgs
    ///         {
    ///             Filename = "nos_image.tar",
    ///             InstallerType = "nos",
    ///             Source = "../../../files/nutanix_installer_x86_64.tar",
    ///         });
    ///         var hypervisor_image = new Nutanix.FoundationImage("hypervisor-image", new Nutanix.FoundationImageArgs
    ///         {
    ///             Filename = "esx_image.iso",
    ///             InstallerType = "esx",
    ///             Source = "../../../files/VMware-Installer.x86_64.iso",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// ## lifecycle
    /// 
    /// * `Update` : - Resource will trigger new resource create call for any kind of update in resource config and delete existing image from foundation vm.
    /// 
    /// See detailed information in [Nutanix Foundation Image](https://www.nutanix.dev/api_references/foundation/#/b3A6MjIyMjM0MDQ-upload-hypervisor-or-aos-image-to-foundation).
    /// </summary>
    [NutanixResourceType("nutanix:index/foundationImage:FoundationImage")]
    public partial class FoundationImage : Pulumi.CustomResource
    {
        [Output("filename")]
        public Output<string> Filename { get; private set; } = null!;

        [Output("inWhitelist")]
        public Output<bool> InWhitelist { get; private set; } = null!;

        [Output("installerType")]
        public Output<string> InstallerType { get; private set; } = null!;

        [Output("md5sum")]
        public Output<string> Md5sum { get; private set; } = null!;

        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("source")]
        public Output<string> Source { get; private set; } = null!;


        /// <summary>
        /// Create a FoundationImage 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 FoundationImage(string name, FoundationImageArgs args, CustomResourceOptions? options = null)
            : base("nutanix:index/foundationImage:FoundationImage", name, args ?? new FoundationImageArgs(), MakeResourceOptions(options, ""))
        {
        }

        private FoundationImage(string name, Input<string> id, FoundationImageState? state = null, CustomResourceOptions? options = null)
            : base("nutanix:index/foundationImage:FoundationImage", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/pierskarsenbarg/pulumi-nutanix/releases/download/${VERSION}",
            };
            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 FoundationImage 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 FoundationImage Get(string name, Input<string> id, FoundationImageState? state = null, CustomResourceOptions? options = null)
        {
            return new FoundationImage(name, id, state, options);
        }
    }

    public sealed class FoundationImageArgs : Pulumi.ResourceArgs
    {
        [Input("filename", required: true)]
        public Input<string> Filename { get; set; } = null!;

        [Input("installerType", required: true)]
        public Input<string> InstallerType { get; set; } = null!;

        [Input("source", required: true)]
        public Input<string> Source { get; set; } = null!;

        public FoundationImageArgs()
        {
        }
    }

    public sealed class FoundationImageState : Pulumi.ResourceArgs
    {
        [Input("filename")]
        public Input<string>? Filename { get; set; }

        [Input("inWhitelist")]
        public Input<bool>? InWhitelist { get; set; }

        [Input("installerType")]
        public Input<string>? InstallerType { get; set; }

        [Input("md5sum")]
        public Input<string>? Md5sum { get; set; }

        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("source")]
        public Input<string>? Source { get; set; }

        public FoundationImageState()
        {
        }
    }
}
