// *** 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 Pulumiverse.Sentry
{
    [SentryResourceType("sentry:index/sentryDefaultKey:SentryDefaultKey")]
    public partial class SentryDefaultKey : Pulumi.CustomResource
    {
        [Output("dsnCsp")]
        public Output<string> DsnCsp { get; private set; } = null!;

        [Output("dsnPublic")]
        public Output<string> DsnPublic { get; private set; } = null!;

        [Output("dsnSecret")]
        public Output<string> DsnSecret { get; private set; } = null!;

        [Output("isActive")]
        public Output<bool> IsActive { get; private set; } = null!;

        /// <summary>
        /// The name of the key
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The slug of the organization the key should be created for
        /// </summary>
        [Output("organization")]
        public Output<string> Organization { get; private set; } = null!;

        /// <summary>
        /// The slug of the project the key should be created for
        /// </summary>
        [Output("project")]
        public Output<string> Project { get; private set; } = null!;

        [Output("projectId")]
        public Output<int> ProjectId { get; private set; } = null!;

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

        [Output("rateLimitCount")]
        public Output<int> RateLimitCount { get; private set; } = null!;

        [Output("rateLimitWindow")]
        public Output<int> RateLimitWindow { get; private set; } = null!;

        [Output("secret")]
        public Output<string> Secret { get; private set; } = null!;


        /// <summary>
        /// Create a SentryDefaultKey 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 SentryDefaultKey(string name, SentryDefaultKeyArgs args, CustomResourceOptions? options = null)
            : base("sentry:index/sentryDefaultKey:SentryDefaultKey", name, args ?? new SentryDefaultKeyArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SentryDefaultKey(string name, Input<string> id, SentryDefaultKeyState? state = null, CustomResourceOptions? options = null)
            : base("sentry:index/sentryDefaultKey:SentryDefaultKey", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse",
                AdditionalSecretOutputs =
                {
                    "dsnSecret",
                    "secret",
                },
            };
            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 SentryDefaultKey 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 SentryDefaultKey Get(string name, Input<string> id, SentryDefaultKeyState? state = null, CustomResourceOptions? options = null)
        {
            return new SentryDefaultKey(name, id, state, options);
        }
    }

    public sealed class SentryDefaultKeyArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the key
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The slug of the organization the key should be created for
        /// </summary>
        [Input("organization", required: true)]
        public Input<string> Organization { get; set; } = null!;

        /// <summary>
        /// The slug of the project the key should be created for
        /// </summary>
        [Input("project", required: true)]
        public Input<string> Project { get; set; } = null!;

        [Input("rateLimitCount")]
        public Input<int>? RateLimitCount { get; set; }

        [Input("rateLimitWindow")]
        public Input<int>? RateLimitWindow { get; set; }

        public SentryDefaultKeyArgs()
        {
        }
    }

    public sealed class SentryDefaultKeyState : Pulumi.ResourceArgs
    {
        [Input("dsnCsp")]
        public Input<string>? DsnCsp { get; set; }

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

        [Input("dsnSecret")]
        private Input<string>? _dsnSecret;
        public Input<string>? DsnSecret
        {
            get => _dsnSecret;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _dsnSecret = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

        /// <summary>
        /// The name of the key
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The slug of the organization the key should be created for
        /// </summary>
        [Input("organization")]
        public Input<string>? Organization { get; set; }

        /// <summary>
        /// The slug of the project the key should be created for
        /// </summary>
        [Input("project")]
        public Input<string>? Project { get; set; }

        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

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

        [Input("rateLimitCount")]
        public Input<int>? RateLimitCount { get; set; }

        [Input("rateLimitWindow")]
        public Input<int>? RateLimitWindow { get; set; }

        [Input("secret")]
        private Input<string>? _secret;
        public Input<string>? Secret
        {
            get => _secret;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _secret = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        public SentryDefaultKeyState()
        {
        }
    }
}
