authentik_rust/models/error_detail.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/// ErrorDetail : Serializer for rest_framework's error messages
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ErrorDetail {
16 #[serde(rename = "string")]
17 pub string: String,
18 #[serde(rename = "code")]
19 pub code: String,
20}
21
22impl ErrorDetail {
23 /// Serializer for rest_framework's error messages
24 pub fn new(string: String, code: String) -> ErrorDetail {
25 ErrorDetail {
26 string,
27 code,
28 }
29 }
30}
31