// *** 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
{
    /// <summary>
    /// This resource manages a Docker Container Registry in Octopus Deploy.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Octopusdeploy = PiersKarsenbarg.Octopusdeploy;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new Octopusdeploy.DockerContainerRegistry("example", new()
    ///     {
    ///         FeedUri = "https://index.docker.io",
    ///         Password = "test-password",
    ///         RegistryPath = "testing/test-image",
    ///         Username = "test-username",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import octopusdeploy:index/dockerContainerRegistry:DockerContainerRegistry [options] octopusdeploy_docker_container_registry.&lt;name&gt; &lt;feed-id&gt;
    /// ```
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/dockerContainerRegistry:DockerContainerRegistry")]
    public partial class DockerContainerRegistry : global::Pulumi.CustomResource
    {
        [Output("apiVersion")]
        public Output<string?> ApiVersion { get; private set; } = null!;

        /// <summary>
        /// The URL to a Maven repository. This URL is the same value defined in the `repositories`/`repository`/`url` element of a Maven `settings.xml` file.
        /// </summary>
        [Output("feedUri")]
        public Output<string> FeedUri { get; private set; } = null!;

        /// <summary>
        /// A short, memorable, unique name for this feed. Example: ACME Builds.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("packageAcquisitionLocationOptions")]
        public Output<ImmutableArray<string>> PackageAcquisitionLocationOptions { get; private set; } = null!;

        /// <summary>
        /// The password associated with this resource.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

        [Output("registryPath")]
        public Output<string?> RegistryPath { get; private set; } = null!;

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        /// <summary>
        /// The username associated with this resource.
        /// </summary>
        [Output("username")]
        public Output<string?> Username { get; private set; } = null!;


        /// <summary>
        /// Create a DockerContainerRegistry 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 DockerContainerRegistry(string name, DockerContainerRegistryArgs args, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/dockerContainerRegistry:DockerContainerRegistry", name, args ?? new DockerContainerRegistryArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DockerContainerRegistry(string name, Input<string> id, DockerContainerRegistryState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/dockerContainerRegistry:DockerContainerRegistry", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                AdditionalSecretOutputs =
                {
                    "password",
                    "username",
                },
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing DockerContainerRegistry resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static DockerContainerRegistry Get(string name, Input<string> id, DockerContainerRegistryState? state = null, CustomResourceOptions? options = null)
        {
            return new DockerContainerRegistry(name, id, state, options);
        }
    }

    public sealed class DockerContainerRegistryArgs : global::Pulumi.ResourceArgs
    {
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        /// <summary>
        /// The URL to a Maven repository. This URL is the same value defined in the `repositories`/`repository`/`url` element of a Maven `settings.xml` file.
        /// </summary>
        [Input("feedUri", required: true)]
        public Input<string> FeedUri { get; set; } = null!;

        /// <summary>
        /// A short, memorable, unique name for this feed. Example: ACME Builds.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("packageAcquisitionLocationOptions")]
        private InputList<string>? _packageAcquisitionLocationOptions;
        public InputList<string> PackageAcquisitionLocationOptions
        {
            get => _packageAcquisitionLocationOptions ?? (_packageAcquisitionLocationOptions = new InputList<string>());
            set => _packageAcquisitionLocationOptions = value;
        }

        [Input("password")]
        private Input<string>? _password;

        /// <summary>
        /// The password associated with this resource.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("username")]
        private Input<string>? _username;

        /// <summary>
        /// The username associated with this resource.
        /// </summary>
        public Input<string>? Username
        {
            get => _username;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _username = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

    public sealed class DockerContainerRegistryState : global::Pulumi.ResourceArgs
    {
        [Input("apiVersion")]
        public Input<string>? ApiVersion { get; set; }

        /// <summary>
        /// The URL to a Maven repository. This URL is the same value defined in the `repositories`/`repository`/`url` element of a Maven `settings.xml` file.
        /// </summary>
        [Input("feedUri")]
        public Input<string>? FeedUri { get; set; }

        /// <summary>
        /// A short, memorable, unique name for this feed. Example: ACME Builds.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("packageAcquisitionLocationOptions")]
        private InputList<string>? _packageAcquisitionLocationOptions;
        public InputList<string> PackageAcquisitionLocationOptions
        {
            get => _packageAcquisitionLocationOptions ?? (_packageAcquisitionLocationOptions = new InputList<string>());
            set => _packageAcquisitionLocationOptions = value;
        }

        [Input("password")]
        private Input<string>? _password;

        /// <summary>
        /// The password associated with this resource.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("username")]
        private Input<string>? _username;

        /// <summary>
        /// The username associated with this resource.
        /// </summary>
        public Input<string>? Username
        {
            get => _username;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _username = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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