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;

/// UrlMapValidationResult : Message representing the validation result for a UrlMap.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UrlMapValidationResult {
    #[serde(rename = "loadErrors", skip_serializing_if = "Option::is_none")]
    pub load_errors: Option<Vec<String>>,
    /// Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons.
    #[serde(rename = "loadSucceeded", skip_serializing_if = "Option::is_none")]
    pub load_succeeded: Option<bool>,
    #[serde(rename = "testFailures", skip_serializing_if = "Option::is_none")]
    pub test_failures: Option<Vec<models::TestFailure>>,
    /// If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure.
    #[serde(rename = "testPassed", skip_serializing_if = "Option::is_none")]
    pub test_passed: Option<bool>,
}

impl UrlMapValidationResult {
    /// Message representing the validation result for a UrlMap.
    pub fn new() -> UrlMapValidationResult {
        UrlMapValidationResult {
            load_errors: None,
            load_succeeded: None,
            test_failures: None,
            test_passed: None,
        }
    }
}
