// *** 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.Sqlserver
{
    [TctestResourceType("tctest:Sqlserver/dB:DB")]
    public partial class DB : Pulumi.CustomResource
    {
        /// <summary>
        /// Character set DB uses. Valid values: `Chinese_PRC_CI_AS`, `Chinese_PRC_CS_AS`, `Chinese_PRC_BIN`,
        /// `Chinese_Taiwan_Stroke_CI_AS`, `SQL_Latin1_General_CP1_CI_AS`, and `SQL_Latin1_General_CP1_CS_AS`. Default value is
        /// `Chinese_PRC_CI_AS`.
        /// </summary>
        [Output("charset")]
        public Output<string?> Charset { get; private set; } = null!;

        /// <summary>
        /// Database creation time.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Name of SQL Server DB. The database name must be unique and must be composed of numbers, letters and underlines, and the
        /// first one can not be underline.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

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

        /// <summary>
        /// Database status, could be `creating`, `running`, `modifying` which means changing the remark, and `deleting`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


        /// <summary>
        /// Create a DB 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 DB(string name, DBArgs args, CustomResourceOptions? options = null)
            : base("tctest:Sqlserver/dB:DB", name, args ?? new DBArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class DBArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Character set DB uses. Valid values: `Chinese_PRC_CI_AS`, `Chinese_PRC_CS_AS`, `Chinese_PRC_BIN`,
        /// `Chinese_Taiwan_Stroke_CI_AS`, `SQL_Latin1_General_CP1_CI_AS`, and `SQL_Latin1_General_CP1_CS_AS`. Default value is
        /// `Chinese_PRC_CI_AS`.
        /// </summary>
        [Input("charset")]
        public Input<string>? Charset { get; set; }

        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// Name of SQL Server DB. The database name must be unique and must be composed of numbers, letters and underlines, and the
        /// first one can not be underline.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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

        public DBArgs()
        {
        }
    }

    public sealed class DBState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Character set DB uses. Valid values: `Chinese_PRC_CI_AS`, `Chinese_PRC_CS_AS`, `Chinese_PRC_BIN`,
        /// `Chinese_Taiwan_Stroke_CI_AS`, `SQL_Latin1_General_CP1_CI_AS`, and `SQL_Latin1_General_CP1_CS_AS`. Default value is
        /// `Chinese_PRC_CI_AS`.
        /// </summary>
        [Input("charset")]
        public Input<string>? Charset { get; set; }

        /// <summary>
        /// Database creation time.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// Name of SQL Server DB. The database name must be unique and must be composed of numbers, letters and underlines, and the
        /// first one can not be underline.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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

        /// <summary>
        /// Database status, could be `creating`, `running`, `modifying` which means changing the remark, and `deleting`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        public DBState()
        {
        }
    }
}
