authentik_rust/models/
used_by.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/// UsedBy : A list of all objects referencing the queried object
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UsedBy {
16    #[serde(rename = "app")]
17    pub app: String,
18    #[serde(rename = "model_name")]
19    pub model_name: String,
20    #[serde(rename = "pk")]
21    pub pk: String,
22    #[serde(rename = "name")]
23    pub name: String,
24    #[serde(rename = "action")]
25    pub action: models::UsedByActionEnum,
26}
27
28impl UsedBy {
29    /// A list of all objects referencing the queried object
30    pub fn new(app: String, model_name: String, pk: String, name: String, action: models::UsedByActionEnum) -> UsedBy {
31        UsedBy {
32            app,
33            model_name,
34            pk,
35            name,
36            action,
37        }
38    }
39}
40