// *** 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 TencentCloudIAC.PulumiPackage.Tencentcloud.Ckafka
{
    /// <summary>
    /// Provides a resource to create a ckafka datahub_topic
    /// 
    /// ## Import
    /// 
    /// ckafka datahub_topic can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Ckafka/datahubTopic:DatahubTopic datahub_topic datahub_topic_name
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Ckafka/datahubTopic:DatahubTopic")]
    public partial class DatahubTopic : Pulumi.CustomResource
    {
        /// <summary>
        /// Name, start with appid, which is a string of no more than 128 characters, must start with a letter, and the rest can contain letters, numbers, and dashes (-).
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Subject note, which is a string of no more than 64 characters, must start with a letter, and the rest can contain letters, numbers and dashes (-).
        /// </summary>
        [Output("note")]
        public Output<string?> Note { get; private set; } = null!;

        /// <summary>
        /// Number of Partitions, greater than 0.
        /// </summary>
        [Output("partitionNum")]
        public Output<int> PartitionNum { get; private set; } = null!;

        /// <summary>
        /// Message retention time, in ms, the current minimum value is 60000 ms.
        /// </summary>
        [Output("retentionMs")]
        public Output<int> RetentionMs { get; private set; } = null!;

        /// <summary>
        /// Tags of dataHub topic.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;


        /// <summary>
        /// Create a DatahubTopic 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 DatahubTopic(string name, DatahubTopicArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Ckafka/datahubTopic:DatahubTopic", name, args ?? new DatahubTopicArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DatahubTopic(string name, Input<string> id, DatahubTopicState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Ckafka/datahubTopic:DatahubTopic", 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/tencentcloudstack",
            };
            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 DatahubTopic 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 DatahubTopic Get(string name, Input<string> id, DatahubTopicState? state = null, CustomResourceOptions? options = null)
        {
            return new DatahubTopic(name, id, state, options);
        }
    }

    public sealed class DatahubTopicArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Name, start with appid, which is a string of no more than 128 characters, must start with a letter, and the rest can contain letters, numbers, and dashes (-).
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Subject note, which is a string of no more than 64 characters, must start with a letter, and the rest can contain letters, numbers and dashes (-).
        /// </summary>
        [Input("note")]
        public Input<string>? Note { get; set; }

        /// <summary>
        /// Number of Partitions, greater than 0.
        /// </summary>
        [Input("partitionNum", required: true)]
        public Input<int> PartitionNum { get; set; } = null!;

        /// <summary>
        /// Message retention time, in ms, the current minimum value is 60000 ms.
        /// </summary>
        [Input("retentionMs", required: true)]
        public Input<int> RetentionMs { get; set; } = null!;

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tags of dataHub topic.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        public DatahubTopicArgs()
        {
        }
    }

    public sealed class DatahubTopicState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Name, start with appid, which is a string of no more than 128 characters, must start with a letter, and the rest can contain letters, numbers, and dashes (-).
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Subject note, which is a string of no more than 64 characters, must start with a letter, and the rest can contain letters, numbers and dashes (-).
        /// </summary>
        [Input("note")]
        public Input<string>? Note { get; set; }

        /// <summary>
        /// Number of Partitions, greater than 0.
        /// </summary>
        [Input("partitionNum")]
        public Input<int>? PartitionNum { get; set; }

        /// <summary>
        /// Message retention time, in ms, the current minimum value is 60000 ms.
        /// </summary>
        [Input("retentionMs")]
        public Input<int>? RetentionMs { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// Tags of dataHub topic.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        public DatahubTopicState()
        {
        }
    }
}
