// *** 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.Cls
{
    [TctestResourceType("tctest:Cls/topic:Topic")]
    public partial class Topic : Pulumi.CustomResource
    {
        /// <summary>
        /// Whether to enable automatic split. Default value: true.
        /// </summary>
        [Output("autoSplit")]
        public Output<bool?> AutoSplit { get; private set; } = null!;

        /// <summary>
        /// Logset ID.
        /// </summary>
        [Output("logsetId")]
        public Output<string> LogsetId { get; private set; } = null!;

        /// <summary>
        /// Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
        /// </summary>
        [Output("maxSplitPartitions")]
        public Output<int?> MaxSplitPartitions { get; private set; } = null!;

        /// <summary>
        /// Number of log topic partitions. Default value: 1. Maximum value: 10.
        /// </summary>
        [Output("partitionCount")]
        public Output<int?> PartitionCount { get; private set; } = null!;

        /// <summary>
        /// Lifecycle in days. Value range: 1~366. Default value: 30.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is
        /// passed in, please contact the customer service to add the log topic to the allowlist first..
        /// </summary>
        [Output("storageType")]
        public Output<string?> StorageType { get; private set; } = null!;

        /// <summary>
        /// Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// Log topic name.
        /// </summary>
        [Output("topicName")]
        public Output<string> TopicName { get; private set; } = null!;


        /// <summary>
        /// Create a Topic 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 Topic(string name, TopicArgs args, CustomResourceOptions? options = null)
            : base("tctest:Cls/topic:Topic", name, args ?? new TopicArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Topic(string name, Input<string> id, TopicState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Cls/topic:Topic", 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 Topic 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 Topic Get(string name, Input<string> id, TopicState? state = null, CustomResourceOptions? options = null)
        {
            return new Topic(name, id, state, options);
        }
    }

    public sealed class TopicArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to enable automatic split. Default value: true.
        /// </summary>
        [Input("autoSplit")]
        public Input<bool>? AutoSplit { get; set; }

        /// <summary>
        /// Logset ID.
        /// </summary>
        [Input("logsetId", required: true)]
        public Input<string> LogsetId { get; set; } = null!;

        /// <summary>
        /// Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
        /// </summary>
        [Input("maxSplitPartitions")]
        public Input<int>? MaxSplitPartitions { get; set; }

        /// <summary>
        /// Number of log topic partitions. Default value: 1. Maximum value: 10.
        /// </summary>
        [Input("partitionCount")]
        public Input<int>? PartitionCount { get; set; }

        /// <summary>
        /// Lifecycle in days. Value range: 1~366. Default value: 30.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is
        /// passed in, please contact the customer service to add the log topic to the allowlist first..
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

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

        /// <summary>
        /// Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Log topic name.
        /// </summary>
        [Input("topicName", required: true)]
        public Input<string> TopicName { get; set; } = null!;

        public TopicArgs()
        {
        }
    }

    public sealed class TopicState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to enable automatic split. Default value: true.
        /// </summary>
        [Input("autoSplit")]
        public Input<bool>? AutoSplit { get; set; }

        /// <summary>
        /// Logset ID.
        /// </summary>
        [Input("logsetId")]
        public Input<string>? LogsetId { get; set; }

        /// <summary>
        /// Maximum number of partitions to split into for this topic if automatic split is enabled. Default value: 50.
        /// </summary>
        [Input("maxSplitPartitions")]
        public Input<int>? MaxSplitPartitions { get; set; }

        /// <summary>
        /// Number of log topic partitions. Default value: 1. Maximum value: 10.
        /// </summary>
        [Input("partitionCount")]
        public Input<int>? PartitionCount { get; set; }

        /// <summary>
        /// Lifecycle in days. Value range: 1~366. Default value: 30.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Log topic storage class. Valid values: hot: real-time storage; cold: offline storage. Default value: hot. If cold is
        /// passed in, please contact the customer service to add the log topic to the allowlist first..
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

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

        /// <summary>
        /// Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Log topic name.
        /// </summary>
        [Input("topicName")]
        public Input<string>? TopicName { get; set; }

        public TopicState()
        {
        }
    }
}
