#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Error {
#[serde(rename = "type")]
pub _type: Type,
#[serde(rename = "max")]
pub max: i32,
#[serde(rename = "permission")]
pub permission: crate::models::UserPermission,
#[serde(rename = "operation")]
pub operation: String,
#[serde(rename = "with")]
pub with: String,
}
impl Error {
pub fn new(_type: Type, max: i32, permission: crate::models::UserPermission, operation: String, with: String) -> Error {
Error {
_type,
max,
permission,
operation,
with,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "FailedValidation")]
FailedValidation,
}
impl Default for Type {
fn default() -> Type {
Self::FailedValidation
}
}