autogen-stedi 0.3.2

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

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

/// ValidationException : A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ValidationException {
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
    #[serde(rename = "fieldList", skip_serializing_if = "Option::is_none")]
    pub field_list: Option<Vec<models::ValidationExceptionField>>,
    /// A summary of the validation failure.
    #[serde(rename = "message")]
    pub message: String,
}

impl ValidationException {
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
    pub fn new(message: String) -> ValidationException {
        ValidationException {
            field_list: None,
            message,
        }
    }
}