authentik_client/models/generic_error.rs
1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GenericError : Generic API Error
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GenericError {
17 #[serde(rename = "detail")]
18 pub detail: String,
19 #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
20 pub code: Option<String>,
21}
22
23impl GenericError {
24 /// Generic API Error
25 pub fn new(detail: String) -> GenericError {
26 GenericError { detail, code: None }
27 }
28}