<filename>sdk/dotnet/PrivateDns/Record.cs// *** 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.PrivateDns
{
    [TctestResourceType("tctest:PrivateDns/record:Record")]
    public partial class Record : Pulumi.CustomResource
    {
        /// <summary>
        /// MX priority, which is required when the record type is MX. Valid values: 5, 10, 15, 20, 30, 40, 50.
        /// </summary>
        [Output("mx")]
        public Output<int?> Mx { get; private set; } = null!;

        /// <summary>
        /// Record type. Valid values: "A", "AAAA", "CNAME", "MX", "TXT", "PTR".
        /// </summary>
        [Output("recordType")]
        public Output<string> RecordType { get; private set; } = null!;

        /// <summary>
        /// Record value, such as IP: 192.168.10.2, CNAME: cname.qcloud.com, and MX: mail.qcloud.com..
        /// </summary>
        [Output("recordValue")]
        public Output<string> RecordValue { get; private set; } = null!;

        /// <summary>
        /// Subdomain, such as "www", "m", and "@".
        /// </summary>
        [Output("subDomain")]
        public Output<string> SubDomain { get; private set; } = null!;

        /// <summary>
        /// Record cache time. The smaller the value, the faster the record will take effect. Value range: 1~86400s.
        /// </summary>
        [Output("ttl")]
        public Output<int?> Ttl { get; private set; } = null!;

        /// <summary>
        /// Record weight. Value range: 1~100.
        /// </summary>
        [Output("weight")]
        public Output<int?> Weight { get; private set; } = null!;

        /// <summary>
        /// Private domain ID.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a Record 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 Record(string name, RecordArgs args, CustomResourceOptions? options = null)
            : base("tctest:PrivateDns/record:Record", name, args ?? new RecordArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class RecordArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// MX priority, which is required when the record type is MX. Valid values: 5, 10, 15, 20, 30, 40, 50.
        /// </summary>
        [Input("mx")]
        public Input<int>? Mx { get; set; }

        /// <summary>
        /// Record type. Valid values: "A", "AAAA", "CNAME", "MX", "TXT", "PTR".
        /// </summary>
        [Input("recordType", required: true)]
        public Input<string> RecordType { get; set; } = null!;

        /// <summary>
        /// Record value, such as IP: 192.168.10.2, CNAME: cname.qcloud.com, and MX: mail.qcloud.com..
        /// </summary>
        [Input("recordValue", required: true)]
        public Input<string> RecordValue { get; set; } = null!;

        /// <summary>
        /// Subdomain, such as "www", "m", and "@".
        /// </summary>
        [Input("subDomain", required: true)]
        public Input<string> SubDomain { get; set; } = null!;

        /// <summary>
        /// Record cache time. The smaller the value, the faster the record will take effect. Value range: 1~86400s.
        /// </summary>
        [Input("ttl")]
        public Input<int>? Ttl { get; set; }

        /// <summary>
        /// Record weight. Value range: 1~100.
        /// </summary>
        [Input("weight")]
        public Input<int>? Weight { get; set; }

        /// <summary>
        /// Private domain ID.
        /// </summary>
        [Input("zoneId", required: true)]
        public Input<string> ZoneId { get; set; } = null!;

        public RecordArgs()
        {
        }
    }

    public sealed class RecordState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// MX priority, which is required when the record type is MX. Valid values: 5, 10, 15, 20, 30, 40, 50.
        /// </summary>
        [Input("mx")]
        public Input<int>? Mx { get; set; }

        /// <summary>
        /// Record type. Valid values: "A", "AAAA", "CNAME", "MX", "TXT", "PTR".
        /// </summary>
        [Input("recordType")]
        public Input<string>? RecordType { get; set; }

        /// <summary>
        /// Record value, such as IP: 192.168.10.2, CNAME: cname.qcloud.com, and MX: mail.qcloud.com..
        /// </summary>
        [Input("recordValue")]
        public Input<string>? RecordValue { get; set; }

        /// <summary>
        /// Subdomain, such as "www", "m", and "@".
        /// </summary>
        [Input("subDomain")]
        public Input<string>? SubDomain { get; set; }

        /// <summary>
        /// Record cache time. The smaller the value, the faster the record will take effect. Value range: 1~86400s.
        /// </summary>
        [Input("ttl")]
        public Input<int>? Ttl { get; set; }

        /// <summary>
        /// Record weight. Value range: 1~100.
        /// </summary>
        [Input("weight")]
        public Input<int>? Weight { get; set; }

        /// <summary>
        /// Private domain ID.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        public RecordState()
        {
        }
    }
}
