// *** 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;

namespace Pulumi.Airflow
{
    /// <summary>
    /// Provides an Airflow pool.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Airflow = Pulumi.Airflow;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new Airflow.Pool("example", new()
    ///     {
    ///         Slots = 2,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Pools can be imported using the pool name. terraform
    /// 
    /// ```sh
    ///  $ pulumi import airflow:index/pool:Pool default example
    /// ```
    /// </summary>
    [AirflowResourceType("airflow:index/pool:Pool")]
    public partial class Pool : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of pool.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The number of slots used by running/queued tasks at the moment.
        /// </summary>
        [Output("occupiedSlots")]
        public Output<int> OccupiedSlots { get; private set; } = null!;

        /// <summary>
        /// The number of free slots at the moment.
        /// </summary>
        [Output("openSlots")]
        public Output<int> OpenSlots { get; private set; } = null!;

        /// <summary>
        /// The number of slots used by queued tasks at the moment.
        /// </summary>
        [Output("queuedSlots")]
        public Output<int> QueuedSlots { get; private set; } = null!;

        /// <summary>
        /// The maximum number of slots that can be assigned to tasks. One job may occupy one or more slots.
        /// </summary>
        [Output("slots")]
        public Output<int> Slots { get; private set; } = null!;

        /// <summary>
        /// The number of slots used by running tasks at the moment.
        /// </summary>
        [Output("usedSlots")]
        public Output<int> UsedSlots { get; private set; } = null!;


        /// <summary>
        /// Create a Pool 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 Pool(string name, PoolArgs args, CustomResourceOptions? options = null)
            : base("airflow:index/pool:Pool", name, args ?? new PoolArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Pool(string name, Input<string> id, PoolState? state = null, CustomResourceOptions? options = null)
            : base("airflow:index/pool:Pool", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.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 Pool 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 Pool Get(string name, Input<string> id, PoolState? state = null, CustomResourceOptions? options = null)
        {
            return new Pool(name, id, state, options);
        }
    }

    public sealed class PoolArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of pool.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The maximum number of slots that can be assigned to tasks. One job may occupy one or more slots.
        /// </summary>
        [Input("slots", required: true)]
        public Input<int> Slots { get; set; } = null!;

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

    public sealed class PoolState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of pool.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The number of slots used by running/queued tasks at the moment.
        /// </summary>
        [Input("occupiedSlots")]
        public Input<int>? OccupiedSlots { get; set; }

        /// <summary>
        /// The number of free slots at the moment.
        /// </summary>
        [Input("openSlots")]
        public Input<int>? OpenSlots { get; set; }

        /// <summary>
        /// The number of slots used by queued tasks at the moment.
        /// </summary>
        [Input("queuedSlots")]
        public Input<int>? QueuedSlots { get; set; }

        /// <summary>
        /// The maximum number of slots that can be assigned to tasks. One job may occupy one or more slots.
        /// </summary>
        [Input("slots")]
        public Input<int>? Slots { get; set; }

        /// <summary>
        /// The number of slots used by running tasks at the moment.
        /// </summary>
        [Input("usedSlots")]
        public Input<int>? UsedSlots { get; set; }

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