// *** WARNING: this file was generated by test. ***
// *** 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.Example
{
    [ExampleResourceType("example::Foo")]
    public partial class Foo : Pulumi.ComponentResource
    {
        /// <summary>
        /// Create a Foo resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Foo(string name, FooArgs? args = null, ComponentResourceOptions? options = null)
            : base("example::Foo", name, args ?? new FooArgs(), MakeResourceOptions(options, ""), remote: true)
        {
        }

        private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new ComponentResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = ComponentResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }

        /// <summary>
        /// A description of bar.
        /// </summary>
        public Pulumi.Output<FooBarResult> Bar(FooBarArgs args)
            => Pulumi.Deployment.Instance.Call<FooBarResult>("example::Foo/bar", args ?? new FooBarArgs(), this);

        public void Baz()
            => Pulumi.Deployment.Instance.Call("example::Foo/baz", CallArgs.Empty, this);

        /// <summary>
        /// Do something with something else
        /// </summary>
        public Pulumi.Output<FooGenerateKubeconfigResult> GenerateKubeconfig(FooGenerateKubeconfigArgs args)
            => Pulumi.Deployment.Instance.Call<FooGenerateKubeconfigResult>("example::Foo/generateKubeconfig", args ?? new FooGenerateKubeconfigArgs(), this);
    }

    public sealed class FooArgs : Pulumi.ResourceArgs
    {
        public FooArgs()
        {
        }
    }

    /// <summary>
    /// The set of arguments for the <see cref="Foo.Bar"/> method.
    /// </summary>
    public sealed class FooBarArgs : Pulumi.CallArgs
    {
        [Input("baz")]
        public Input<Pulumi.Example.Nested.Inputs.BazArgs>? Baz { get; set; }

        [Input("bazPlain")]
        public Pulumi.Example.Nested.Inputs.BazArgs? BazPlain { get; set; }

        [Input("bazRequired", required: true)]
        public Input<Pulumi.Example.Nested.Inputs.BazArgs> BazRequired { get; set; } = null!;

        [Input("boolValue")]
        public Input<bool>? BoolValue { get; set; }

        [Input("boolValuePlain")]
        public bool? BoolValuePlain { get; set; }

        [Input("boolValueRequired", required: true)]
        public Input<bool> BoolValueRequired { get; set; } = null!;

        [Input("name")]
        public Input<Pulumi.Random.RandomPet>? Name { get; set; }

        [Input("namePlain")]
        public Pulumi.Random.RandomPet? NamePlain { get; set; }

        [Input("nameRequired", required: true)]
        public Input<Pulumi.Random.RandomPet> NameRequired { get; set; } = null!;

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

        [Input("stringValuePlain")]
        public string? StringValuePlain { get; set; }

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

        public FooBarArgs()
        {
        }
    }

    /// <summary>
    /// The results of the <see cref="Foo.Bar"/> method.
    /// </summary>
    [OutputType]
    public sealed class FooBarResult
    {
        public readonly string SomeValue;

        [OutputConstructor]
        private FooBarResult(string someValue)
        {
            SomeValue = someValue;
        }
    }

    /// <summary>
    /// The set of arguments for the <see cref="Foo.GenerateKubeconfig"/> method.
    /// </summary>
    public sealed class FooGenerateKubeconfigArgs : Pulumi.CallArgs
    {
        [Input("boolValue", required: true)]
        public bool BoolValue { get; set; }

        public FooGenerateKubeconfigArgs()
        {
        }
    }

    /// <summary>
    /// The results of the <see cref="Foo.GenerateKubeconfig"/> method.
    /// </summary>
    [OutputType]
    public sealed class FooGenerateKubeconfigResult
    {
        public readonly string Kubeconfig;

        [OutputConstructor]
        private FooGenerateKubeconfigResult(string kubeconfig)
        {
            Kubeconfig = kubeconfig;
        }
    }
}
