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