// *** 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
{
    /// <summary>
    /// ## # sentry.SentryPlugin Resource
    /// 
    /// Sentry Plugin resource.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Sentry = Pulumiverse.Sentry;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         // Create a plugin
    ///         var @default = new Sentry.SentryPlugin("default", new Sentry.SentryPluginArgs
    ///         {
    ///             Config = 
    ///             {
    ///                 { "webhook", "slack://webhook" },
    ///             },
    ///             Organization = "my-organization",
    ///             Plugin = "slack",
    ///             Project = "web-app",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [SentryResourceType("sentry:index/sentryPlugin:SentryPlugin")]
    public partial class SentryPlugin : Pulumi.CustomResource
    {
        /// <summary>
        /// Configuration of the plugin.
        /// </summary>
        [Output("config")]
        public Output<ImmutableDictionary<string, object>?> Config { get; private set; } = null!;

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

        /// <summary>
        /// Identifier of the plugin.
        /// </summary>
        [Output("plugin")]
        public Output<string> Plugin { get; private set; } = null!;

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


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

        private SentryPlugin(string name, Input<string> id, SentryPluginState? state = null, CustomResourceOptions? options = null)
            : base("sentry:index/sentryPlugin:SentryPlugin", 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",
            };
            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 SentryPlugin 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 SentryPlugin Get(string name, Input<string> id, SentryPluginState? state = null, CustomResourceOptions? options = null)
        {
            return new SentryPlugin(name, id, state, options);
        }
    }

    public sealed class SentryPluginArgs : Pulumi.ResourceArgs
    {
        [Input("config")]
        private InputMap<object>? _config;

        /// <summary>
        /// Configuration of the plugin.
        /// </summary>
        public InputMap<object> Config
        {
            get => _config ?? (_config = new InputMap<object>());
            set => _config = value;
        }

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

        /// <summary>
        /// Identifier of the plugin.
        /// </summary>
        [Input("plugin", required: true)]
        public Input<string> Plugin { get; set; } = null!;

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

        public SentryPluginArgs()
        {
        }
    }

    public sealed class SentryPluginState : Pulumi.ResourceArgs
    {
        [Input("config")]
        private InputMap<object>? _config;

        /// <summary>
        /// Configuration of the plugin.
        /// </summary>
        public InputMap<object> Config
        {
            get => _config ?? (_config = new InputMap<object>());
            set => _config = value;
        }

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

        /// <summary>
        /// Identifier of the plugin.
        /// </summary>
        [Input("plugin")]
        public Input<string>? Plugin { get; set; }

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

        public SentryPluginState()
        {
        }
    }
}
