// *** 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.Clb
{
    [TctestResourceType("tctest:Clb/listener:Listener")]
    public partial class Listener : Pulumi.CustomResource
    {
        /// <summary>
        /// ID of the client certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when the
        /// ssl mode is `MUTUAL`.
        /// </summary>
        [Output("certificateCaId")]
        public Output<string?> CertificateCaId { get; private set; } = null!;

        /// <summary>
        /// ID of the server certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when it
        /// is available.
        /// </summary>
        [Output("certificateId")]
        public Output<string?> CertificateId { get; private set; } = null!;

        /// <summary>
        /// Type of certificate. Valid values: `UNIDIRECTIONAL`, `MUTUAL`. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL`
        /// protocol and must be set when it is available.
        /// </summary>
        [Output("certificateSslMode")]
        public Output<string?> CertificateSslMode { get; private set; } = null!;

        /// <summary>
        /// ID of the CLB.
        /// </summary>
        [Output("clbId")]
        public Output<string> ClbId { get; private set; } = null!;

        /// <summary>
        /// Health check protocol. When the value of `health_check_type` of the health check protocol is `CUSTOM`, this field is
        /// required, which represents the input format of the health check. Valid values: `HEX`, `TEXT`.
        /// </summary>
        [Output("healthCheckContextType")]
        public Output<string?> HealthCheckContextType { get; private set; } = null!;

        /// <summary>
        /// Health threshold of health check, and the default is `3`. If a success result is returned for the health check for 3
        /// consecutive times, the backend CVM is identified as healthy. The value range is 2-10. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in tencentcloud_clb_listener_rule.
        /// </summary>
        [Output("healthCheckHealthNum")]
        public Output<int> HealthCheckHealthNum { get; private set; } = null!;

        /// <summary>
        /// HTTP health check code of TCP listener. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. `1` means http_1xx, `2` means http_2xx, `4` means
        /// http_3xx, `8` means http_4xx, `16` means http_5xx.
        /// </summary>
        [Output("healthCheckHttpCode")]
        public Output<int?> HealthCheckHttpCode { get; private set; } = null!;

        /// <summary>
        /// HTTP health check domain of TCP listener.
        /// </summary>
        [Output("healthCheckHttpDomain")]
        public Output<string?> HealthCheckHttpDomain { get; private set; } = null!;

        /// <summary>
        /// HTTP health check method of TCP listener. Valid values: `HEAD`, `GET`.
        /// </summary>
        [Output("healthCheckHttpMethod")]
        public Output<string> HealthCheckHttpMethod { get; private set; } = null!;

        /// <summary>
        /// HTTP health check path of TCP listener.
        /// </summary>
        [Output("healthCheckHttpPath")]
        public Output<string?> HealthCheckHttpPath { get; private set; } = null!;

        /// <summary>
        /// The HTTP version of the backend service. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `HTTP/1.0`, `HTTP/1.1`.
        /// </summary>
        [Output("healthCheckHttpVersion")]
        public Output<string?> HealthCheckHttpVersion { get; private set; } = null!;

        /// <summary>
        /// Interval time of health check. Valid value ranges: [5~300] sec. and the default is 5 sec. NOTES: TCP/UDP/TCP_SSL
        /// listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Output("healthCheckIntervalTime")]
        public Output<int> HealthCheckIntervalTime { get; private set; } = null!;

        /// <summary>
        /// The health check port is the port of the backend service by default. Unless you want to specify a specific port, it is
        /// recommended to leave it blank. Only applicable to TCP/UDP listener.
        /// </summary>
        [Output("healthCheckPort")]
        public Output<int?> HealthCheckPort { get; private set; } = null!;

        /// <summary>
        /// It represents the result returned by the health check. When the value of `health_check_type` of the health check
        /// protocol is `CUSTOM`, this field is required. Only ASCII visible characters are allowed and the maximum length is 500.
        /// When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected in
        /// `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Output("healthCheckRecvContext")]
        public Output<string?> HealthCheckRecvContext { get; private set; } = null!;

        /// <summary>
        /// It represents the content of the request sent by the health check. When the value of `health_check_type` of the health
        /// check protocol is `CUSTOM`, this field is required. Only visible ASCII characters are allowed and the maximum length is
        /// 500. When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected
        /// in `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Output("healthCheckSendContext")]
        public Output<string?> HealthCheckSendContext { get; private set; } = null!;

        /// <summary>
        /// Indicates whether health check is enabled.
        /// </summary>
        [Output("healthCheckSwitch")]
        public Output<bool> HealthCheckSwitch { get; private set; } = null!;

        /// <summary>
        /// Response timeout of health check. Valid value ranges: [2~60] sec. Default is 2 sec. Response timeout needs to be less
        /// than check interval. NOTES: Only supports listeners of `TCP`,`UDP`,`TCP_SSL` protocol.
        /// </summary>
        [Output("healthCheckTimeOut")]
        public Output<int> HealthCheckTimeOut { get; private set; } = null!;

        /// <summary>
        /// Protocol used for health check. Valid values: `CUSTOM`, `TCP`, `HTTP`.
        /// </summary>
        [Output("healthCheckType")]
        public Output<string> HealthCheckType { get; private set; } = null!;

        /// <summary>
        /// Unhealthy threshold of health check, and the default is `3`. If a success result is returned for the health check 3
        /// consecutive times, the CVM is identified as unhealthy. The value range is [2-10]. NOTES: TCP/UDP/TCP_SSL listener allows
        /// direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Output("healthCheckUnhealthNum")]
        public Output<int> HealthCheckUnhealthNum { get; private set; } = null!;

        /// <summary>
        /// ID of this CLB listener.
        /// </summary>
        [Output("listenerId")]
        public Output<string> ListenerId { get; private set; } = null!;

        /// <summary>
        /// Name of the CLB listener, and available values can only be Chinese characters, English letters, numbers, underscore and
        /// hyphen '-'.
        /// </summary>
        [Output("listenerName")]
        public Output<string> ListenerName { get; private set; } = null!;

        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        [Output("port")]
        public Output<int?> Port { get; private set; } = null!;

        /// <summary>
        /// Type of protocol within the listener. Valid values: `TCP`, `UDP`, `HTTP`, `HTTPS` and `TCP_SSL`.
        /// </summary>
        [Output("protocol")]
        public Output<string> Protocol { get; private set; } = null!;

        /// <summary>
        /// Scheduling method of the CLB listener, and available values are 'WRR' and 'LEAST_CONN'. The default is 'WRR'. NOTES: The
        /// listener of `HTTP` and `HTTPS` protocol additionally supports the `IP Hash` method. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Output("scheduler")]
        public Output<string?> Scheduler { get; private set; } = null!;

        /// <summary>
        /// Time of session persistence within the CLB listener. NOTES: Available when scheduler is specified as `WRR`, and not
        /// available when listener protocol is `TCP_SSL`. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS
        /// listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Output("sessionExpireTime")]
        public Output<int?> SessionExpireTime { get; private set; } = null!;

        /// <summary>
        /// Indicates whether SNI is enabled, and only supported with protocol `HTTPS`. If enabled, you can set a certificate for
        /// each rule in `tencentcloud_clb_listener_rule`, otherwise all rules have a certificate.
        /// </summary>
        [Output("sniSwitch")]
        public Output<bool?> SniSwitch { get; private set; } = null!;

        /// <summary>
        /// Backend target type. Valid values: `NODE`, `TARGETGROUP`. `NODE` means to bind ordinary nodes, `TARGETGROUP` means to
        /// bind target group. NOTES: TCP/UDP/TCP_SSL listener must configuration, HTTP/HTTPS listener needs to be configured in
        /// tencentcloud_clb_listener_rule.
        /// </summary>
        [Output("targetType")]
        public Output<string> TargetType { get; private set; } = null!;


        /// <summary>
        /// Create a Listener 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 Listener(string name, ListenerArgs args, CustomResourceOptions? options = null)
            : base("tctest:Clb/listener:Listener", name, args ?? new ListenerArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class ListenerArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// ID of the client certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when the
        /// ssl mode is `MUTUAL`.
        /// </summary>
        [Input("certificateCaId")]
        public Input<string>? CertificateCaId { get; set; }

        /// <summary>
        /// ID of the server certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when it
        /// is available.
        /// </summary>
        [Input("certificateId")]
        public Input<string>? CertificateId { get; set; }

        /// <summary>
        /// Type of certificate. Valid values: `UNIDIRECTIONAL`, `MUTUAL`. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL`
        /// protocol and must be set when it is available.
        /// </summary>
        [Input("certificateSslMode")]
        public Input<string>? CertificateSslMode { get; set; }

        /// <summary>
        /// ID of the CLB.
        /// </summary>
        [Input("clbId", required: true)]
        public Input<string> ClbId { get; set; } = null!;

        /// <summary>
        /// Health check protocol. When the value of `health_check_type` of the health check protocol is `CUSTOM`, this field is
        /// required, which represents the input format of the health check. Valid values: `HEX`, `TEXT`.
        /// </summary>
        [Input("healthCheckContextType")]
        public Input<string>? HealthCheckContextType { get; set; }

        /// <summary>
        /// Health threshold of health check, and the default is `3`. If a success result is returned for the health check for 3
        /// consecutive times, the backend CVM is identified as healthy. The value range is 2-10. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in tencentcloud_clb_listener_rule.
        /// </summary>
        [Input("healthCheckHealthNum")]
        public Input<int>? HealthCheckHealthNum { get; set; }

        /// <summary>
        /// HTTP health check code of TCP listener. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. `1` means http_1xx, `2` means http_2xx, `4` means
        /// http_3xx, `8` means http_4xx, `16` means http_5xx.
        /// </summary>
        [Input("healthCheckHttpCode")]
        public Input<int>? HealthCheckHttpCode { get; set; }

        /// <summary>
        /// HTTP health check domain of TCP listener.
        /// </summary>
        [Input("healthCheckHttpDomain")]
        public Input<string>? HealthCheckHttpDomain { get; set; }

        /// <summary>
        /// HTTP health check method of TCP listener. Valid values: `HEAD`, `GET`.
        /// </summary>
        [Input("healthCheckHttpMethod")]
        public Input<string>? HealthCheckHttpMethod { get; set; }

        /// <summary>
        /// HTTP health check path of TCP listener.
        /// </summary>
        [Input("healthCheckHttpPath")]
        public Input<string>? HealthCheckHttpPath { get; set; }

        /// <summary>
        /// The HTTP version of the backend service. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `HTTP/1.0`, `HTTP/1.1`.
        /// </summary>
        [Input("healthCheckHttpVersion")]
        public Input<string>? HealthCheckHttpVersion { get; set; }

        /// <summary>
        /// Interval time of health check. Valid value ranges: [5~300] sec. and the default is 5 sec. NOTES: TCP/UDP/TCP_SSL
        /// listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("healthCheckIntervalTime")]
        public Input<int>? HealthCheckIntervalTime { get; set; }

        /// <summary>
        /// The health check port is the port of the backend service by default. Unless you want to specify a specific port, it is
        /// recommended to leave it blank. Only applicable to TCP/UDP listener.
        /// </summary>
        [Input("healthCheckPort")]
        public Input<int>? HealthCheckPort { get; set; }

        /// <summary>
        /// It represents the result returned by the health check. When the value of `health_check_type` of the health check
        /// protocol is `CUSTOM`, this field is required. Only ASCII visible characters are allowed and the maximum length is 500.
        /// When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected in
        /// `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Input("healthCheckRecvContext")]
        public Input<string>? HealthCheckRecvContext { get; set; }

        /// <summary>
        /// It represents the content of the request sent by the health check. When the value of `health_check_type` of the health
        /// check protocol is `CUSTOM`, this field is required. Only visible ASCII characters are allowed and the maximum length is
        /// 500. When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected
        /// in `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Input("healthCheckSendContext")]
        public Input<string>? HealthCheckSendContext { get; set; }

        /// <summary>
        /// Indicates whether health check is enabled.
        /// </summary>
        [Input("healthCheckSwitch")]
        public Input<bool>? HealthCheckSwitch { get; set; }

        /// <summary>
        /// Response timeout of health check. Valid value ranges: [2~60] sec. Default is 2 sec. Response timeout needs to be less
        /// than check interval. NOTES: Only supports listeners of `TCP`,`UDP`,`TCP_SSL` protocol.
        /// </summary>
        [Input("healthCheckTimeOut")]
        public Input<int>? HealthCheckTimeOut { get; set; }

        /// <summary>
        /// Protocol used for health check. Valid values: `CUSTOM`, `TCP`, `HTTP`.
        /// </summary>
        [Input("healthCheckType")]
        public Input<string>? HealthCheckType { get; set; }

        /// <summary>
        /// Unhealthy threshold of health check, and the default is `3`. If a success result is returned for the health check 3
        /// consecutive times, the CVM is identified as unhealthy. The value range is [2-10]. NOTES: TCP/UDP/TCP_SSL listener allows
        /// direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("healthCheckUnhealthNum")]
        public Input<int>? HealthCheckUnhealthNum { get; set; }

        /// <summary>
        /// Name of the CLB listener, and available values can only be Chinese characters, English letters, numbers, underscore and
        /// hyphen '-'.
        /// </summary>
        [Input("listenerName", required: true)]
        public Input<string> ListenerName { get; set; } = null!;

        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Type of protocol within the listener. Valid values: `TCP`, `UDP`, `HTTP`, `HTTPS` and `TCP_SSL`.
        /// </summary>
        [Input("protocol", required: true)]
        public Input<string> Protocol { get; set; } = null!;

        /// <summary>
        /// Scheduling method of the CLB listener, and available values are 'WRR' and 'LEAST_CONN'. The default is 'WRR'. NOTES: The
        /// listener of `HTTP` and `HTTPS` protocol additionally supports the `IP Hash` method. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("scheduler")]
        public Input<string>? Scheduler { get; set; }

        /// <summary>
        /// Time of session persistence within the CLB listener. NOTES: Available when scheduler is specified as `WRR`, and not
        /// available when listener protocol is `TCP_SSL`. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS
        /// listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("sessionExpireTime")]
        public Input<int>? SessionExpireTime { get; set; }

        /// <summary>
        /// Indicates whether SNI is enabled, and only supported with protocol `HTTPS`. If enabled, you can set a certificate for
        /// each rule in `tencentcloud_clb_listener_rule`, otherwise all rules have a certificate.
        /// </summary>
        [Input("sniSwitch")]
        public Input<bool>? SniSwitch { get; set; }

        /// <summary>
        /// Backend target type. Valid values: `NODE`, `TARGETGROUP`. `NODE` means to bind ordinary nodes, `TARGETGROUP` means to
        /// bind target group. NOTES: TCP/UDP/TCP_SSL listener must configuration, HTTP/HTTPS listener needs to be configured in
        /// tencentcloud_clb_listener_rule.
        /// </summary>
        [Input("targetType")]
        public Input<string>? TargetType { get; set; }

        public ListenerArgs()
        {
        }
    }

    public sealed class ListenerState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// ID of the client certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when the
        /// ssl mode is `MUTUAL`.
        /// </summary>
        [Input("certificateCaId")]
        public Input<string>? CertificateCaId { get; set; }

        /// <summary>
        /// ID of the server certificate. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when it
        /// is available.
        /// </summary>
        [Input("certificateId")]
        public Input<string>? CertificateId { get; set; }

        /// <summary>
        /// Type of certificate. Valid values: `UNIDIRECTIONAL`, `MUTUAL`. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL`
        /// protocol and must be set when it is available.
        /// </summary>
        [Input("certificateSslMode")]
        public Input<string>? CertificateSslMode { get; set; }

        /// <summary>
        /// ID of the CLB.
        /// </summary>
        [Input("clbId")]
        public Input<string>? ClbId { get; set; }

        /// <summary>
        /// Health check protocol. When the value of `health_check_type` of the health check protocol is `CUSTOM`, this field is
        /// required, which represents the input format of the health check. Valid values: `HEX`, `TEXT`.
        /// </summary>
        [Input("healthCheckContextType")]
        public Input<string>? HealthCheckContextType { get; set; }

        /// <summary>
        /// Health threshold of health check, and the default is `3`. If a success result is returned for the health check for 3
        /// consecutive times, the backend CVM is identified as healthy. The value range is 2-10. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in tencentcloud_clb_listener_rule.
        /// </summary>
        [Input("healthCheckHealthNum")]
        public Input<int>? HealthCheckHealthNum { get; set; }

        /// <summary>
        /// HTTP health check code of TCP listener. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. `1` means http_1xx, `2` means http_2xx, `4` means
        /// http_3xx, `8` means http_4xx, `16` means http_5xx.
        /// </summary>
        [Input("healthCheckHttpCode")]
        public Input<int>? HealthCheckHttpCode { get; set; }

        /// <summary>
        /// HTTP health check domain of TCP listener.
        /// </summary>
        [Input("healthCheckHttpDomain")]
        public Input<string>? HealthCheckHttpDomain { get; set; }

        /// <summary>
        /// HTTP health check method of TCP listener. Valid values: `HEAD`, `GET`.
        /// </summary>
        [Input("healthCheckHttpMethod")]
        public Input<string>? HealthCheckHttpMethod { get; set; }

        /// <summary>
        /// HTTP health check path of TCP listener.
        /// </summary>
        [Input("healthCheckHttpPath")]
        public Input<string>? HealthCheckHttpPath { get; set; }

        /// <summary>
        /// The HTTP version of the backend service. When the value of `health_check_type` of the health check protocol is `HTTP`,
        /// this field is required. Valid values: `HTTP/1.0`, `HTTP/1.1`.
        /// </summary>
        [Input("healthCheckHttpVersion")]
        public Input<string>? HealthCheckHttpVersion { get; set; }

        /// <summary>
        /// Interval time of health check. Valid value ranges: [5~300] sec. and the default is 5 sec. NOTES: TCP/UDP/TCP_SSL
        /// listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("healthCheckIntervalTime")]
        public Input<int>? HealthCheckIntervalTime { get; set; }

        /// <summary>
        /// The health check port is the port of the backend service by default. Unless you want to specify a specific port, it is
        /// recommended to leave it blank. Only applicable to TCP/UDP listener.
        /// </summary>
        [Input("healthCheckPort")]
        public Input<int>? HealthCheckPort { get; set; }

        /// <summary>
        /// It represents the result returned by the health check. When the value of `health_check_type` of the health check
        /// protocol is `CUSTOM`, this field is required. Only ASCII visible characters are allowed and the maximum length is 500.
        /// When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected in
        /// `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Input("healthCheckRecvContext")]
        public Input<string>? HealthCheckRecvContext { get; set; }

        /// <summary>
        /// It represents the content of the request sent by the health check. When the value of `health_check_type` of the health
        /// check protocol is `CUSTOM`, this field is required. Only visible ASCII characters are allowed and the maximum length is
        /// 500. When `health_check_context_type` value is `HEX`, the characters of SendContext and RecvContext can only be selected
        /// in `0123456789ABCDEF` and the length must be even digits.
        /// </summary>
        [Input("healthCheckSendContext")]
        public Input<string>? HealthCheckSendContext { get; set; }

        /// <summary>
        /// Indicates whether health check is enabled.
        /// </summary>
        [Input("healthCheckSwitch")]
        public Input<bool>? HealthCheckSwitch { get; set; }

        /// <summary>
        /// Response timeout of health check. Valid value ranges: [2~60] sec. Default is 2 sec. Response timeout needs to be less
        /// than check interval. NOTES: Only supports listeners of `TCP`,`UDP`,`TCP_SSL` protocol.
        /// </summary>
        [Input("healthCheckTimeOut")]
        public Input<int>? HealthCheckTimeOut { get; set; }

        /// <summary>
        /// Protocol used for health check. Valid values: `CUSTOM`, `TCP`, `HTTP`.
        /// </summary>
        [Input("healthCheckType")]
        public Input<string>? HealthCheckType { get; set; }

        /// <summary>
        /// Unhealthy threshold of health check, and the default is `3`. If a success result is returned for the health check 3
        /// consecutive times, the CVM is identified as unhealthy. The value range is [2-10]. NOTES: TCP/UDP/TCP_SSL listener allows
        /// direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("healthCheckUnhealthNum")]
        public Input<int>? HealthCheckUnhealthNum { get; set; }

        /// <summary>
        /// ID of this CLB listener.
        /// </summary>
        [Input("listenerId")]
        public Input<string>? ListenerId { get; set; }

        /// <summary>
        /// Name of the CLB listener, and available values can only be Chinese characters, English letters, numbers, underscore and
        /// hyphen '-'.
        /// </summary>
        [Input("listenerName")]
        public Input<string>? ListenerName { get; set; }

        /// <summary>
        /// Port of the CLB listener.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Type of protocol within the listener. Valid values: `TCP`, `UDP`, `HTTP`, `HTTPS` and `TCP_SSL`.
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// Scheduling method of the CLB listener, and available values are 'WRR' and 'LEAST_CONN'. The default is 'WRR'. NOTES: The
        /// listener of `HTTP` and `HTTPS` protocol additionally supports the `IP Hash` method. NOTES: TCP/UDP/TCP_SSL listener
        /// allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("scheduler")]
        public Input<string>? Scheduler { get; set; }

        /// <summary>
        /// Time of session persistence within the CLB listener. NOTES: Available when scheduler is specified as `WRR`, and not
        /// available when listener protocol is `TCP_SSL`. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS
        /// listener needs to be configured in `tencentcloud_clb_listener_rule`.
        /// </summary>
        [Input("sessionExpireTime")]
        public Input<int>? SessionExpireTime { get; set; }

        /// <summary>
        /// Indicates whether SNI is enabled, and only supported with protocol `HTTPS`. If enabled, you can set a certificate for
        /// each rule in `tencentcloud_clb_listener_rule`, otherwise all rules have a certificate.
        /// </summary>
        [Input("sniSwitch")]
        public Input<bool>? SniSwitch { get; set; }

        /// <summary>
        /// Backend target type. Valid values: `NODE`, `TARGETGROUP`. `NODE` means to bind ordinary nodes, `TARGETGROUP` means to
        /// bind target group. NOTES: TCP/UDP/TCP_SSL listener must configuration, HTTP/HTTPS listener needs to be configured in
        /// tencentcloud_clb_listener_rule.
        /// </summary>
        [Input("targetType")]
        public Input<string>? TargetType { get; set; }

        public ListenerState()
        {
        }
    }
}
