use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::compute_v1::models;

/// HttpsHealthCheck : Represents a legacy HTTPS Health Check resource. Legacy HTTPS health checks have been deprecated. If you are using a target pool-based network load balancer, you must use a legacy HTTP (not HTTPS) health check. For all other load balancers, including backend service-based network load balancers, and for managed instance group auto-healing, you must use modern (non-legacy) health checks. For more information, see Health checks overview .
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HttpsHealthCheck {
    /// How often (in seconds) to send a health check. The default value is 5 seconds.
    #[serde(rename = "checkIntervalSec", skip_serializing_if = "Option::is_none")]
    pub check_interval_sec: Option<i32>,
    /// [Output Only] Creation timestamp in RFC3339 text format.
    #[serde(rename = "creationTimestamp", skip_serializing_if = "Option::is_none")]
    pub creation_timestamp: Option<String>,
    /// An optional description of this resource. Provide this property when you create the resource.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
    #[serde(rename = "healthyThreshold", skip_serializing_if = "Option::is_none")]
    pub healthy_threshold: Option<i32>,
    /// The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// [Output Only] The unique identifier for the resource. This identifier is defined by the server.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Type of the resource.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The TCP port number for the HTTPS health check request. The default value is 443.
    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
    pub port: Option<i32>,
    /// The request path of the HTTPS health check request. The default value is \"/\". Must comply with RFC3986.
    #[serde(rename = "requestPath", skip_serializing_if = "Option::is_none")]
    pub request_path: Option<String>,
    /// [Output Only] Server-defined URL for the resource.
    #[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
    pub self_link: Option<String>,
    /// How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have a greater value than checkIntervalSec.
    #[serde(rename = "timeoutSec", skip_serializing_if = "Option::is_none")]
    pub timeout_sec: Option<i32>,
    /// A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
    #[serde(rename = "unhealthyThreshold", skip_serializing_if = "Option::is_none")]
    pub unhealthy_threshold: Option<i32>,
}

impl HttpsHealthCheck {
    /// Represents a legacy HTTPS Health Check resource. Legacy HTTPS health checks have been deprecated. If you are using a target pool-based network load balancer, you must use a legacy HTTP (not HTTPS) health check. For all other load balancers, including backend service-based network load balancers, and for managed instance group auto-healing, you must use modern (non-legacy) health checks. For more information, see Health checks overview .
    pub fn new() -> HttpsHealthCheck {
        HttpsHealthCheck {
            check_interval_sec: None,
            creation_timestamp: None,
            description: None,
            healthy_threshold: None,
            host: None,
            id: None,
            kind: None,
            name: None,
            port: None,
            request_path: None,
            self_link: None,
            timeout_sec: None,
            unhealthy_threshold: None,
        }
    }
}
