// *** 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 Cuemby.Equinix
{
    public static class GetMetalFacility
    {
        /// <summary>
        /// Provides an Equinix Metal facility datasource.
        /// </summary>
        public static Task<GetMetalFacilityResult> InvokeAsync(GetMetalFacilityArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalFacilityResult>("equinix:index/getMetalFacility:GetMetalFacility", args ?? new GetMetalFacilityArgs(), options.WithDefaults());

        /// <summary>
        /// Provides an Equinix Metal facility datasource.
        /// </summary>
        public static Output<GetMetalFacilityResult> Invoke(GetMetalFacilityInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalFacilityResult>("equinix:index/getMetalFacility:GetMetalFacility", args ?? new GetMetalFacilityInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalFacilityArgs : Pulumi.InvokeArgs
    {
        [Input("capacities")]
        private List<Inputs.GetMetalFacilityCapacityArgs>? _capacities;

        /// <summary>
        /// One or more device plans for which the facility must have capacity.
        /// </summary>
        public List<Inputs.GetMetalFacilityCapacityArgs> Capacities
        {
            get => _capacities ?? (_capacities = new List<Inputs.GetMetalFacilityCapacityArgs>());
            set => _capacities = value;
        }

        /// <summary>
        /// The facility code to search for facilities.
        /// </summary>
        [Input("code", required: true)]
        public string Code { get; set; } = null!;

        [Input("featuresRequireds")]
        private List<string>? _featuresRequireds;

        /// <summary>
        /// Set of feature strings that the facility must have. Some
        /// possible values are `baremetal`, `ibx`, `storage`, `global_ipv4`, `backend_transfer`, `layer_2`.
        /// </summary>
        public List<string> FeaturesRequireds
        {
            get => _featuresRequireds ?? (_featuresRequireds = new List<string>());
            set => _featuresRequireds = value;
        }

        public GetMetalFacilityArgs()
        {
        }
    }

    public sealed class GetMetalFacilityInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("capacities")]
        private InputList<Inputs.GetMetalFacilityCapacityInputArgs>? _capacities;

        /// <summary>
        /// One or more device plans for which the facility must have capacity.
        /// </summary>
        public InputList<Inputs.GetMetalFacilityCapacityInputArgs> Capacities
        {
            get => _capacities ?? (_capacities = new InputList<Inputs.GetMetalFacilityCapacityInputArgs>());
            set => _capacities = value;
        }

        /// <summary>
        /// The facility code to search for facilities.
        /// </summary>
        [Input("code", required: true)]
        public Input<string> Code { get; set; } = null!;

        [Input("featuresRequireds")]
        private InputList<string>? _featuresRequireds;

        /// <summary>
        /// Set of feature strings that the facility must have. Some
        /// possible values are `baremetal`, `ibx`, `storage`, `global_ipv4`, `backend_transfer`, `layer_2`.
        /// </summary>
        public InputList<string> FeaturesRequireds
        {
            get => _featuresRequireds ?? (_featuresRequireds = new InputList<string>());
            set => _featuresRequireds = value;
        }

        public GetMetalFacilityInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalFacilityResult
    {
        public readonly ImmutableArray<Outputs.GetMetalFacilityCapacityResult> Capacities;
        public readonly string Code;
        /// <summary>
        /// The features of the facility.
        /// </summary>
        public readonly ImmutableArray<string> Features;
        public readonly ImmutableArray<string> FeaturesRequireds;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// The metro code the facility is part of.
        /// </summary>
        public readonly string Metro;
        /// <summary>
        /// The name of the facility.
        /// </summary>
        public readonly string Name;

        [OutputConstructor]
        private GetMetalFacilityResult(
            ImmutableArray<Outputs.GetMetalFacilityCapacityResult> capacities,

            string code,

            ImmutableArray<string> features,

            ImmutableArray<string> featuresRequireds,

            string id,

            string metro,

            string name)
        {
            Capacities = capacities;
            Code = code;
            Features = features;
            FeaturesRequireds = featuresRequireds;
            Id = id;
            Metro = metro;
            Name = name;
        }
    }
}
