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;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TestFailure {
    /// The actual output URL evaluated by a load balancer containing the scheme, host, path and query parameters.
    #[serde(rename = "actualOutputUrl", skip_serializing_if = "Option::is_none")]
    pub actual_output_url: Option<String>,
    /// Actual HTTP status code for rule with `urlRedirect` calculated by load balancer
    #[serde(
        rename = "actualRedirectResponseCode",
        skip_serializing_if = "Option::is_none"
    )]
    pub actual_redirect_response_code: Option<i32>,
    /// BackendService or BackendBucket returned by load balancer.
    #[serde(rename = "actualService", skip_serializing_if = "Option::is_none")]
    pub actual_service: Option<String>,
    /// The expected output URL evaluated by a load balancer containing the scheme, host, path and query parameters.
    #[serde(rename = "expectedOutputUrl", skip_serializing_if = "Option::is_none")]
    pub expected_output_url: Option<String>,
    /// Expected HTTP status code for rule with `urlRedirect` calculated by load balancer
    #[serde(
        rename = "expectedRedirectResponseCode",
        skip_serializing_if = "Option::is_none"
    )]
    pub expected_redirect_response_code: Option<i32>,
    /// Expected BackendService or BackendBucket resource the given URL should be mapped to.
    #[serde(rename = "expectedService", skip_serializing_if = "Option::is_none")]
    pub expected_service: Option<String>,
    /// HTTP headers of the request.
    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
    pub headers: Option<Vec<models::UrlMapTestHeader>>,
    /// Host portion of the URL.
    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// Path portion including query parameters in the URL.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
}

impl TestFailure {
    pub fn new() -> TestFailure {
        TestFailure {
            actual_output_url: None,
            actual_redirect_response_code: None,
            actual_service: None,
            expected_output_url: None,
            expected_redirect_response_code: None,
            expected_service: None,
            headers: None,
            host: None,
            path: None,
        }
    }
}
