autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2023-08-01
 * Contact: core@stedi.com
 * Generated by: https://openapi-generator.tech
 */

use crate::core::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TranslationError {
    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
    pub context: Option<Box<models::TranslationErrorContext>>,
    #[serde(rename = "mark", skip_serializing_if = "Option::is_none")]
    pub mark: Option<Box<models::Mark>>,
    /// A message describing the error that occurred during translation.
    #[serde(rename = "message")]
    pub message: String,
}

impl TranslationError {
    pub fn new(message: String) -> TranslationError {
        TranslationError {
            context: None,
            mark: None,
            message,
        }
    }
}