// *** 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 connect_resource
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var connectResource = new Tencentcloud.Ckafka.ConnectResource("connectResource", new Tencentcloud.Ckafka.ConnectResourceArgs
    ///         {
    ///             Description = "for terraform test",
    ///             MysqlConnectParam = new Tencentcloud.Ckafka.Inputs.ConnectResourceMysqlConnectParamArgs
    ///             {
    ///                 Password = "xxxxxxxxx",
    ///                 Port = 3306,
    ///                 Resource = "cdb-fitq5t9h",
    ///                 SelfBuilt = false,
    ///                 ServiceVip = "172.16.80.59",
    ///                 UniqVpcId = "vpc-4owdpnwr",
    ///                 UserName = "root",
    ///             },
    ///             ResourceName = "terraform-test",
    ///             Type = "MYSQL",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// ckafka connect_resource can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Ckafka/connectResource:ConnectResource connect_resource connect_resource_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Ckafka/connectResource:ConnectResource")]
    public partial class ConnectResource : Pulumi.CustomResource
    {
        /// <summary>
        /// ClickHouse configuration, required when Type is CLICKHOUSE.
        /// </summary>
        [Output("clickhouseConnectParam")]
        public Output<Outputs.ConnectResourceClickhouseConnectParam?> ClickhouseConnectParam { get; private set; } = null!;

        /// <summary>
        /// Connection source description.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Doris configuration, required when Type is DORIS.
        /// </summary>
        [Output("dorisConnectParam")]
        public Output<Outputs.ConnectResourceDorisConnectParam?> DorisConnectParam { get; private set; } = null!;

        /// <summary>
        /// Dts configuration, required when Type is DTS.
        /// </summary>
        [Output("dtsConnectParam")]
        public Output<Outputs.ConnectResourceDtsConnectParam?> DtsConnectParam { get; private set; } = null!;

        /// <summary>
        /// Es configuration, required when Type is ES.
        /// </summary>
        [Output("esConnectParam")]
        public Output<Outputs.ConnectResourceEsConnectParam?> EsConnectParam { get; private set; } = null!;

        /// <summary>
        /// Kafka configuration, required when Type is KAFKA.
        /// </summary>
        [Output("kafkaConnectParam")]
        public Output<Outputs.ConnectResourceKafkaConnectParam?> KafkaConnectParam { get; private set; } = null!;

        /// <summary>
        /// Maria DB configuration, required when Type is MARIADB.
        /// </summary>
        [Output("mariadbConnectParam")]
        public Output<Outputs.ConnectResourceMariadbConnectParam?> MariadbConnectParam { get; private set; } = null!;

        /// <summary>
        /// Mongo DB configuration, required when Type is MONGODB.
        /// </summary>
        [Output("mongodbConnectParam")]
        public Output<Outputs.ConnectResourceMongodbConnectParam?> MongodbConnectParam { get; private set; } = null!;

        /// <summary>
        /// MySQL configuration, required when Type is MYSQL or TDSQL C_MYSQL.
        /// </summary>
        [Output("mysqlConnectParam")]
        public Output<Outputs.ConnectResourceMysqlConnectParam?> MysqlConnectParam { get; private set; } = null!;

        /// <summary>
        /// Postgresql configuration, required when Type is POSTGRESQL or TDSQL C POSTGRESQL.
        /// </summary>
        [Output("postgresqlConnectParam")]
        public Output<Outputs.ConnectResourcePostgresqlConnectParam?> PostgresqlConnectParam { get; private set; } = null!;

        /// <summary>
        /// connection source name.
        /// </summary>
        [Output("resourceName")]
        public Output<string> ResourceName { get; private set; } = null!;

        /// <summary>
        /// SQLServer configuration, required when Type is SQLSERVER.
        /// </summary>
        [Output("sqlserverConnectParam")]
        public Output<Outputs.ConnectResourceSqlserverConnectParam?> SqlserverConnectParam { get; private set; } = null!;

        /// <summary>
        /// connection source type.
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;


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

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

    public sealed class ConnectResourceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// ClickHouse configuration, required when Type is CLICKHOUSE.
        /// </summary>
        [Input("clickhouseConnectParam")]
        public Input<Inputs.ConnectResourceClickhouseConnectParamArgs>? ClickhouseConnectParam { get; set; }

        /// <summary>
        /// Connection source description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Doris configuration, required when Type is DORIS.
        /// </summary>
        [Input("dorisConnectParam")]
        public Input<Inputs.ConnectResourceDorisConnectParamArgs>? DorisConnectParam { get; set; }

        /// <summary>
        /// Dts configuration, required when Type is DTS.
        /// </summary>
        [Input("dtsConnectParam")]
        public Input<Inputs.ConnectResourceDtsConnectParamArgs>? DtsConnectParam { get; set; }

        /// <summary>
        /// Es configuration, required when Type is ES.
        /// </summary>
        [Input("esConnectParam")]
        public Input<Inputs.ConnectResourceEsConnectParamArgs>? EsConnectParam { get; set; }

        /// <summary>
        /// Kafka configuration, required when Type is KAFKA.
        /// </summary>
        [Input("kafkaConnectParam")]
        public Input<Inputs.ConnectResourceKafkaConnectParamArgs>? KafkaConnectParam { get; set; }

        /// <summary>
        /// Maria DB configuration, required when Type is MARIADB.
        /// </summary>
        [Input("mariadbConnectParam")]
        public Input<Inputs.ConnectResourceMariadbConnectParamArgs>? MariadbConnectParam { get; set; }

        /// <summary>
        /// Mongo DB configuration, required when Type is MONGODB.
        /// </summary>
        [Input("mongodbConnectParam")]
        public Input<Inputs.ConnectResourceMongodbConnectParamArgs>? MongodbConnectParam { get; set; }

        /// <summary>
        /// MySQL configuration, required when Type is MYSQL or TDSQL C_MYSQL.
        /// </summary>
        [Input("mysqlConnectParam")]
        public Input<Inputs.ConnectResourceMysqlConnectParamArgs>? MysqlConnectParam { get; set; }

        /// <summary>
        /// Postgresql configuration, required when Type is POSTGRESQL or TDSQL C POSTGRESQL.
        /// </summary>
        [Input("postgresqlConnectParam")]
        public Input<Inputs.ConnectResourcePostgresqlConnectParamArgs>? PostgresqlConnectParam { get; set; }

        /// <summary>
        /// connection source name.
        /// </summary>
        [Input("resourceName", required: true)]
        public Input<string> ResourceName { get; set; } = null!;

        /// <summary>
        /// SQLServer configuration, required when Type is SQLSERVER.
        /// </summary>
        [Input("sqlserverConnectParam")]
        public Input<Inputs.ConnectResourceSqlserverConnectParamArgs>? SqlserverConnectParam { get; set; }

        /// <summary>
        /// connection source type.
        /// </summary>
        [Input("type", required: true)]
        public Input<string> Type { get; set; } = null!;

        public ConnectResourceArgs()
        {
        }
    }

    public sealed class ConnectResourceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// ClickHouse configuration, required when Type is CLICKHOUSE.
        /// </summary>
        [Input("clickhouseConnectParam")]
        public Input<Inputs.ConnectResourceClickhouseConnectParamGetArgs>? ClickhouseConnectParam { get; set; }

        /// <summary>
        /// Connection source description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Doris configuration, required when Type is DORIS.
        /// </summary>
        [Input("dorisConnectParam")]
        public Input<Inputs.ConnectResourceDorisConnectParamGetArgs>? DorisConnectParam { get; set; }

        /// <summary>
        /// Dts configuration, required when Type is DTS.
        /// </summary>
        [Input("dtsConnectParam")]
        public Input<Inputs.ConnectResourceDtsConnectParamGetArgs>? DtsConnectParam { get; set; }

        /// <summary>
        /// Es configuration, required when Type is ES.
        /// </summary>
        [Input("esConnectParam")]
        public Input<Inputs.ConnectResourceEsConnectParamGetArgs>? EsConnectParam { get; set; }

        /// <summary>
        /// Kafka configuration, required when Type is KAFKA.
        /// </summary>
        [Input("kafkaConnectParam")]
        public Input<Inputs.ConnectResourceKafkaConnectParamGetArgs>? KafkaConnectParam { get; set; }

        /// <summary>
        /// Maria DB configuration, required when Type is MARIADB.
        /// </summary>
        [Input("mariadbConnectParam")]
        public Input<Inputs.ConnectResourceMariadbConnectParamGetArgs>? MariadbConnectParam { get; set; }

        /// <summary>
        /// Mongo DB configuration, required when Type is MONGODB.
        /// </summary>
        [Input("mongodbConnectParam")]
        public Input<Inputs.ConnectResourceMongodbConnectParamGetArgs>? MongodbConnectParam { get; set; }

        /// <summary>
        /// MySQL configuration, required when Type is MYSQL or TDSQL C_MYSQL.
        /// </summary>
        [Input("mysqlConnectParam")]
        public Input<Inputs.ConnectResourceMysqlConnectParamGetArgs>? MysqlConnectParam { get; set; }

        /// <summary>
        /// Postgresql configuration, required when Type is POSTGRESQL or TDSQL C POSTGRESQL.
        /// </summary>
        [Input("postgresqlConnectParam")]
        public Input<Inputs.ConnectResourcePostgresqlConnectParamGetArgs>? PostgresqlConnectParam { get; set; }

        /// <summary>
        /// connection source name.
        /// </summary>
        [Input("resourceName")]
        public Input<string>? ResourceName { get; set; }

        /// <summary>
        /// SQLServer configuration, required when Type is SQLSERVER.
        /// </summary>
        [Input("sqlserverConnectParam")]
        public Input<Inputs.ConnectResourceSqlserverConnectParamGetArgs>? SqlserverConnectParam { get; set; }

        /// <summary>
        /// connection source type.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

        public ConnectResourceState()
        {
        }
    }
}
