// *** 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.Tdmq
{
    [TctestResourceType("tctest:Tdmq/namespace:Namespace")]
    public partial class Namespace : Pulumi.CustomResource
    {
        /// <summary>
        /// The Dedicated Cluster Id.
        /// </summary>
        [Output("clusterId")]
        public Output<string> ClusterId { get; private set; } = null!;

        /// <summary>
        /// The name of namespace to be created.
        /// </summary>
        [Output("environName")]
        public Output<string> EnvironName { get; private set; } = null!;

        /// <summary>
        /// The expiration time of unconsumed message.
        /// </summary>
        [Output("msgTtl")]
        public Output<int> MsgTtl { get; private set; } = null!;

        /// <summary>
        /// Description of the namespace.
        /// </summary>
        [Output("remark")]
        public Output<string?> Remark { get; private set; } = null!;

        /// <summary>
        /// The Policy of message to retain.
        /// </summary>
        [Output("retentionPolicy")]
        public Output<ImmutableDictionary<string, object>?> RetentionPolicy { get; private set; } = null!;


        /// <summary>
        /// Create a Namespace 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 Namespace(string name, NamespaceArgs args, CustomResourceOptions? options = null)
            : base("tctest:Tdmq/namespace:Namespace", name, args ?? new NamespaceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Namespace(string name, Input<string> id, NamespaceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Tdmq/namespace:Namespace", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 Namespace 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 Namespace Get(string name, Input<string> id, NamespaceState? state = null, CustomResourceOptions? options = null)
        {
            return new Namespace(name, id, state, options);
        }
    }

    public sealed class NamespaceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Dedicated Cluster Id.
        /// </summary>
        [Input("clusterId", required: true)]
        public Input<string> ClusterId { get; set; } = null!;

        /// <summary>
        /// The name of namespace to be created.
        /// </summary>
        [Input("environName", required: true)]
        public Input<string> EnvironName { get; set; } = null!;

        /// <summary>
        /// The expiration time of unconsumed message.
        /// </summary>
        [Input("msgTtl", required: true)]
        public Input<int> MsgTtl { get; set; } = null!;

        /// <summary>
        /// Description of the namespace.
        /// </summary>
        [Input("remark")]
        public Input<string>? Remark { get; set; }

        [Input("retentionPolicy")]
        private InputMap<object>? _retentionPolicy;

        /// <summary>
        /// The Policy of message to retain.
        /// </summary>
        public InputMap<object> RetentionPolicy
        {
            get => _retentionPolicy ?? (_retentionPolicy = new InputMap<object>());
            set => _retentionPolicy = value;
        }

        public NamespaceArgs()
        {
        }
    }

    public sealed class NamespaceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Dedicated Cluster Id.
        /// </summary>
        [Input("clusterId")]
        public Input<string>? ClusterId { get; set; }

        /// <summary>
        /// The name of namespace to be created.
        /// </summary>
        [Input("environName")]
        public Input<string>? EnvironName { get; set; }

        /// <summary>
        /// The expiration time of unconsumed message.
        /// </summary>
        [Input("msgTtl")]
        public Input<int>? MsgTtl { get; set; }

        /// <summary>
        /// Description of the namespace.
        /// </summary>
        [Input("remark")]
        public Input<string>? Remark { get; set; }

        [Input("retentionPolicy")]
        private InputMap<object>? _retentionPolicy;

        /// <summary>
        /// The Policy of message to retain.
        /// </summary>
        public InputMap<object> RetentionPolicy
        {
            get => _retentionPolicy ?? (_retentionPolicy = new InputMap<object>());
            set => _retentionPolicy = value;
        }

        public NamespaceState()
        {
        }
    }
}
