bitwarden_api_api/models/access_request_decision_response_model.rs
1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15/// AccessRequestDecisionResponseModel : One decision on an access request: who decided
16/// (Bit.Services.Pam.Api.Models.Response.AccessRequestDecisionResponseModel.DeciderKind), their
17/// identity for a human decision, the verdict, an optional comment, and when. An element of
18/// Bit.Services.Pam.Api.Models.Response.AccessRequestDetailsResponseModel.Decisions — the request's
19/// full decision log, oldest first. For an automatic (access-rule) decision
20/// Bit.Services.Pam.Api.Models.Response.AccessRequestDecisionResponseModel.Id/Bit.Services.Pam.Api.
21/// Models.Response.AccessRequestDecisionResponseModel.Name/Bit.Services.Pam.Api.Models.Response.
22/// AccessRequestDecisionResponseModel.Email are null; for a human decision they carry the approver
23/// (name/email denormalized by the server, null only when the user could not be resolved).
24#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
25pub struct AccessRequestDecisionResponseModel {
26 #[serde(
27 rename = "deciderKind",
28 alias = "DeciderKind",
29 skip_serializing_if = "Option::is_none"
30 )]
31 pub decider_kind: Option<models::DeciderKind>,
32 /// The human approver's user id, or null for an automatic decision.
33 #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
34 pub id: Option<uuid::Uuid>,
35 /// The human approver's display name; null for an automatic decision, or when the user could
36 /// not be resolved.
37 #[serde(
38 rename = "name",
39 alias = "Name",
40 skip_serializing_if = "Option::is_none"
41 )]
42 pub name: Option<String>,
43 /// The human approver's email; null for an automatic decision, or when the user could not be
44 /// resolved.
45 #[serde(
46 rename = "email",
47 alias = "Email",
48 skip_serializing_if = "Option::is_none"
49 )]
50 pub email: Option<String>,
51 /// The optional note the approver left with the decision.
52 #[serde(
53 rename = "comment",
54 alias = "Comment",
55 skip_serializing_if = "Option::is_none"
56 )]
57 pub comment: Option<String>,
58 #[serde(
59 rename = "verdict",
60 alias = "Verdict",
61 skip_serializing_if = "Option::is_none"
62 )]
63 pub verdict: Option<models::AccessDecisionVerdict>,
64 /// When the decision was recorded (UTC).
65 #[serde(
66 rename = "decidedAt",
67 alias = "DecidedAt",
68 skip_serializing_if = "Option::is_none"
69 )]
70 pub decided_at: Option<String>,
71}
72
73impl AccessRequestDecisionResponseModel {
74 /// One decision on an access request: who decided
75 /// (Bit.Services.Pam.Api.Models.Response.AccessRequestDecisionResponseModel.DeciderKind), their
76 /// identity for a human decision, the verdict, an optional comment, and when. An element of
77 /// Bit.Services.Pam.Api.Models.Response.AccessRequestDetailsResponseModel.Decisions — the
78 /// request's full decision log, oldest first. For an automatic (access-rule)
79 /// decision Bit.Services.Pam.Api.Models.Response.AccessRequestDecisionResponseModel.Id/Bit.
80 /// Services.Pam.Api.Models.Response.AccessRequestDecisionResponseModel.Name/Bit.Services.Pam.
81 /// Api.Models.Response.AccessRequestDecisionResponseModel.Email are null; for a human decision
82 /// they carry the approver (name/email denormalized by the server, null only when the user
83 /// could not be resolved).
84 pub fn new() -> AccessRequestDecisionResponseModel {
85 AccessRequestDecisionResponseModel {
86 decider_kind: None,
87 id: None,
88 name: None,
89 email: None,
90 comment: None,
91 verdict: None,
92 decided_at: None,
93 }
94 }
95}