// *** 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.Tctest.Clb
{
    public static class Redirections
    {
        public static Task<RedirectionsResult> InvokeAsync(RedirectionsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<RedirectionsResult>("tctest:Clb/redirections:Redirections", args ?? new RedirectionsArgs(), options.WithDefaults());

        public static Output<RedirectionsResult> Invoke(RedirectionsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<RedirectionsResult>("tctest:Clb/redirections:Redirections", args ?? new RedirectionsInvokeArgs(), options.WithDefaults());
    }


    public sealed class RedirectionsArgs : Pulumi.InvokeArgs
    {
        [Input("clbId", required: true)]
        public string ClbId { get; set; } = null!;

        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        [Input("sourceListenerId", required: true)]
        public string SourceListenerId { get; set; } = null!;

        [Input("sourceRuleId", required: true)]
        public string SourceRuleId { get; set; } = null!;

        [Input("targetListenerId")]
        public string? TargetListenerId { get; set; }

        [Input("targetRuleId")]
        public string? TargetRuleId { get; set; }

        public RedirectionsArgs()
        {
        }
    }

    public sealed class RedirectionsInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("clbId", required: true)]
        public Input<string> ClbId { get; set; } = null!;

        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        [Input("sourceListenerId", required: true)]
        public Input<string> SourceListenerId { get; set; } = null!;

        [Input("sourceRuleId", required: true)]
        public Input<string> SourceRuleId { get; set; } = null!;

        [Input("targetListenerId")]
        public Input<string>? TargetListenerId { get; set; }

        [Input("targetRuleId")]
        public Input<string>? TargetRuleId { get; set; }

        public RedirectionsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class RedirectionsResult
    {
        public readonly string ClbId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<Outputs.RedirectionsRedirectionListResult> RedirectionLists;
        public readonly string? ResultOutputFile;
        public readonly string SourceListenerId;
        public readonly string SourceRuleId;
        public readonly string? TargetListenerId;
        public readonly string? TargetRuleId;

        [OutputConstructor]
        private RedirectionsResult(
            string clbId,

            string id,

            ImmutableArray<Outputs.RedirectionsRedirectionListResult> redirectionLists,

            string? resultOutputFile,

            string sourceListenerId,

            string sourceRuleId,

            string? targetListenerId,

            string? targetRuleId)
        {
            ClbId = clbId;
            Id = id;
            RedirectionLists = redirectionLists;
            ResultOutputFile = resultOutputFile;
            SourceListenerId = sourceListenerId;
            SourceRuleId = sourceRuleId;
            TargetListenerId = targetListenerId;
            TargetRuleId = targetRuleId;
        }
    }
}
