<filename>sdk/dotnet/GetGitCredentials.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.Octopusdeploy
{
    public static class GetGitCredentials
    {
        /// <summary>
        /// Provides information about existing GitCredentials.
        /// </summary>
        public static Task<GetGitCredentialsResult> InvokeAsync(GetGitCredentialsArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetGitCredentialsResult>("octopusdeploy:index/getGitCredentials:getGitCredentials", args ?? new GetGitCredentialsArgs(), options.WithDefaults());

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


    public sealed class GetGitCredentialsArgs : global::Pulumi.InvokeArgs
    {
        [Input("gitCredentials")]
        private List<Inputs.GetGitCredentialsGitCredentialArgs>? _gitCredentials;

        /// <summary>
        /// A list of Git Credentials that match the filter(s).
        /// </summary>
        public List<Inputs.GetGitCredentialsGitCredentialArgs> GitCredentials
        {
            get => _gitCredentials ?? (_gitCredentials = new List<Inputs.GetGitCredentialsGitCredentialArgs>());
            set => _gitCredentials = value;
        }

        /// <summary>
        /// A filter to search by name.
        /// </summary>
        [Input("name")]
        public string? Name { 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; }

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

    public sealed class GetGitCredentialsInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("gitCredentials")]
        private InputList<Inputs.GetGitCredentialsGitCredentialInputArgs>? _gitCredentials;

        /// <summary>
        /// A list of Git Credentials that match the filter(s).
        /// </summary>
        public InputList<Inputs.GetGitCredentialsGitCredentialInputArgs> GitCredentials
        {
            get => _gitCredentials ?? (_gitCredentials = new InputList<Inputs.GetGitCredentialsGitCredentialInputArgs>());
            set => _gitCredentials = value;
        }

        /// <summary>
        /// A filter to search by name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { 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; }

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


    [OutputType]
    public sealed class GetGitCredentialsResult
    {
        /// <summary>
        /// A list of Git Credentials that match the filter(s).
        /// </summary>
        public readonly ImmutableArray<Outputs.GetGitCredentialsGitCredentialResult> GitCredentials;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A filter to search by name.
        /// </summary>
        public readonly string? Name;
        /// <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;

        [OutputConstructor]
        private GetGitCredentialsResult(
            ImmutableArray<Outputs.GetGitCredentialsGitCredentialResult> gitCredentials,

            string id,

            string? name,

            int? skip,

            int? take)
        {
            GitCredentials = gitCredentials;
            Id = id;
            Name = name;
            Skip = skip;
            Take = take;
        }
    }
}
