// *** 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.Octopusdeploy
{
    public static class GetTenants
    {
        /// <summary>
        /// Provides information about existing tenants.
        /// </summary>
        public static Task<GetTenantsResult> InvokeAsync(GetTenantsArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetTenantsResult>("octopusdeploy:index/getTenants:getTenants", args ?? new GetTenantsArgs(), options.WithDefaults());

        /// <summary>
        /// Provides information about existing tenants.
        /// </summary>
        public static Output<GetTenantsResult> Invoke(GetTenantsInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetTenantsResult>("octopusdeploy:index/getTenants:getTenants", args ?? new GetTenantsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetTenantsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// A filter to search for a cloned tenant by its ID.
        /// </summary>
        [Input("clonedFromTenantId")]
        public string? ClonedFromTenantId { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A filter to search by a list of IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A filter to search for cloned resources.
        /// </summary>
        [Input("isClone")]
        public bool? IsClone { get; set; }

        /// <summary>
        /// A filter to search by name.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// A filter to search by the partial match of a name.
        /// </summary>
        [Input("partialName")]
        public string? PartialName { get; set; }

        /// <summary>
        /// A filter to search by a project ID.
        /// </summary>
        [Input("projectId")]
        public string? ProjectId { get; set; }

        /// <summary>
        /// A filter to specify the number of items to skip in the response.
        /// </summary>
        [Input("skip")]
        public int? Skip { get; set; }

        [Input("tags")]
        private List<string>? _tags;

        /// <summary>
        /// A filter to search by a list of tags.
        /// </summary>
        public List<string> Tags
        {
            get => _tags ?? (_tags = new List<string>());
            set => _tags = value;
        }

        /// <summary>
        /// A filter to specify the number of items to take (or return) in the response.
        /// </summary>
        [Input("take")]
        public int? Take { get; set; }

        [Input("tenants")]
        private List<Inputs.GetTenantsTenantArgs>? _tenants;

        /// <summary>
        /// A list of tenants that match the filter(s).
        /// </summary>
        public List<Inputs.GetTenantsTenantArgs> Tenants
        {
            get => _tenants ?? (_tenants = new List<Inputs.GetTenantsTenantArgs>());
            set => _tenants = value;
        }

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

    public sealed class GetTenantsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// A filter to search for a cloned tenant by its ID.
        /// </summary>
        [Input("clonedFromTenantId")]
        public Input<string>? ClonedFromTenantId { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A filter to search by a list of IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// A filter to search for cloned resources.
        /// </summary>
        [Input("isClone")]
        public Input<bool>? IsClone { get; set; }

        /// <summary>
        /// A filter to search by name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// A filter to search by the partial match of a name.
        /// </summary>
        [Input("partialName")]
        public Input<string>? PartialName { get; set; }

        /// <summary>
        /// A filter to search by a project ID.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// A filter to specify the number of items to skip in the response.
        /// </summary>
        [Input("skip")]
        public Input<int>? Skip { get; set; }

        [Input("tags")]
        private InputList<string>? _tags;

        /// <summary>
        /// A filter to search by a list of tags.
        /// </summary>
        public InputList<string> Tags
        {
            get => _tags ?? (_tags = new InputList<string>());
            set => _tags = value;
        }

        /// <summary>
        /// A filter to specify the number of items to take (or return) in the response.
        /// </summary>
        [Input("take")]
        public Input<int>? Take { get; set; }

        [Input("tenants")]
        private InputList<Inputs.GetTenantsTenantInputArgs>? _tenants;

        /// <summary>
        /// A list of tenants that match the filter(s).
        /// </summary>
        public InputList<Inputs.GetTenantsTenantInputArgs> Tenants
        {
            get => _tenants ?? (_tenants = new InputList<Inputs.GetTenantsTenantInputArgs>());
            set => _tenants = value;
        }

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


    [OutputType]
    public sealed class GetTenantsResult
    {
        /// <summary>
        /// A filter to search for a cloned tenant by its ID.
        /// </summary>
        public readonly string? ClonedFromTenantId;
        /// <summary>
        /// An auto-generated identifier that includes the timestamp when this data source was last modified.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A filter to search by a list of IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// A filter to search for cloned resources.
        /// </summary>
        public readonly bool? IsClone;
        /// <summary>
        /// A filter to search by name.
        /// </summary>
        public readonly string? Name;
        /// <summary>
        /// A filter to search by the partial match of a name.
        /// </summary>
        public readonly string? PartialName;
        /// <summary>
        /// A filter to search by a project ID.
        /// </summary>
        public readonly string? ProjectId;
        /// <summary>
        /// A filter to specify the number of items to skip in the response.
        /// </summary>
        public readonly int? Skip;
        /// <summary>
        /// A filter to search by a list of tags.
        /// </summary>
        public readonly ImmutableArray<string> Tags;
        /// <summary>
        /// A filter to specify the number of items to take (or return) in the response.
        /// </summary>
        public readonly int? Take;
        /// <summary>
        /// A list of tenants that match the filter(s).
        /// </summary>
        public readonly ImmutableArray<Outputs.GetTenantsTenantResult> Tenants;

        [OutputConstructor]
        private GetTenantsResult(
            string? clonedFromTenantId,

            string id,

            ImmutableArray<string> ids,

            bool? isClone,

            string? name,

            string? partialName,

            string? projectId,

            int? skip,

            ImmutableArray<string> tags,

            int? take,

            ImmutableArray<Outputs.GetTenantsTenantResult> tenants)
        {
            ClonedFromTenantId = clonedFromTenantId;
            Id = id;
            Ids = ids;
            IsClone = isClone;
            Name = name;
            PartialName = partialName;
            ProjectId = projectId;
            Skip = skip;
            Tags = tags;
            Take = take;
            Tenants = tenants;
        }
    }
}
