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
                                      */

/// LocalizedMessage : Provides a localized error message that is safe to return to the user which can be attached to an RPC error.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LocalizedMessage {
    /// The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: \"en-US\", \"fr-CH\", \"es-MX\"
    #[serde(rename = "locale", skip_serializing_if = "Option::is_none")]
    pub locale: Option<String>,
    /// The localized error message in the above locale.
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

impl LocalizedMessage {
    /// Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
    pub fn new() -> LocalizedMessage {
        LocalizedMessage {
            locale: None,
            message: None,
        }
    }
}
