// *** 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 GetWorkerPools
    {
        /// <summary>
        /// Provides information about existing worker pools.
        /// </summary>
        public static Task<GetWorkerPoolsResult> InvokeAsync(GetWorkerPoolsArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetWorkerPoolsResult>("octopusdeploy:index/getWorkerPools:getWorkerPools", args ?? new GetWorkerPoolsArgs(), options.WithDefaults());

        /// <summary>
        /// Provides information about existing worker pools.
        /// </summary>
        public static Output<GetWorkerPoolsResult> Invoke(GetWorkerPoolsInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetWorkerPoolsResult>("octopusdeploy:index/getWorkerPools:getWorkerPools", args ?? new GetWorkerPoolsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetWorkerPoolsArgs : global::Pulumi.InvokeArgs
    {
        [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 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 specify the number of items to skip in the response.
        /// </summary>
        [Input("skip")]
        public int? Skip { get; set; }

        /// <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("workerPools")]
        private List<Inputs.GetWorkerPoolsWorkerPoolArgs>? _workerPools;

        /// <summary>
        /// A list of worker pools that match the filter(s).
        /// </summary>
        public List<Inputs.GetWorkerPoolsWorkerPoolArgs> WorkerPools
        {
            get => _workerPools ?? (_workerPools = new List<Inputs.GetWorkerPoolsWorkerPoolArgs>());
            set => _workerPools = value;
        }

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

    public sealed class GetWorkerPoolsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [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 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 specify the number of items to skip in the response.
        /// </summary>
        [Input("skip")]
        public Input<int>? Skip { get; set; }

        /// <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("workerPools")]
        private InputList<Inputs.GetWorkerPoolsWorkerPoolInputArgs>? _workerPools;

        /// <summary>
        /// A list of worker pools that match the filter(s).
        /// </summary>
        public InputList<Inputs.GetWorkerPoolsWorkerPoolInputArgs> WorkerPools
        {
            get => _workerPools ?? (_workerPools = new InputList<Inputs.GetWorkerPoolsWorkerPoolInputArgs>());
            set => _workerPools = value;
        }

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


    [OutputType]
    public sealed class GetWorkerPoolsResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </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 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 specify the number of items to skip in the response.
        /// </summary>
        public readonly int? Skip;
        /// <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 worker pools that match the filter(s).
        /// </summary>
        public readonly ImmutableArray<Outputs.GetWorkerPoolsWorkerPoolResult> WorkerPools;

        [OutputConstructor]
        private GetWorkerPoolsResult(
            string id,

            ImmutableArray<string> ids,

            string? name,

            string? partialName,

            int? skip,

            int? take,

            ImmutableArray<Outputs.GetWorkerPoolsWorkerPoolResult> workerPools)
        {
            Id = id;
            Ids = ids;
            Name = name;
            PartialName = partialName;
            Skip = skip;
            Take = take;
            WorkerPools = workerPools;
        }
    }
}
