qm_keycloak/validation/
model.rs1use async_graphql::{InputObject, SimpleObject};
2use serde::{Deserialize, Serialize};
3
4#[derive(Default, Debug, Serialize, Deserialize, SimpleObject, InputObject, Clone)]
6pub struct RealmConfigErrorInput {
7 pub id: String,
9}
10
11impl From<RealmConfigError> for RealmConfigErrorInput {
12 fn from(value: RealmConfigError) -> Self {
13 Self { id: value.id }
14 }
15}
16
17#[derive(Default, Debug, Serialize, Deserialize, SimpleObject)]
19pub struct RealmConfigError {
20 pub id: String,
22 pub key: String,
24}
25
26impl RealmConfigError {
27 pub fn new(id: String, key: String) -> Self {
29 Self { id, key }
30 }
31}