Skip to main content

bitwarden_api_api/models/
pam_rotation_config_detail_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/// PamRotationConfigDetailResponseModel : A rotation config with its full job and attempt history.
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct PamRotationConfigDetailResponseModel {
18    #[serde(
19        rename = "object",
20        alias = "Object",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub object: Option<String>,
24    #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
25    pub id: Option<uuid::Uuid>,
26    #[serde(
27        rename = "organizationId",
28        alias = "OrganizationId",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub organization_id: Option<uuid::Uuid>,
32    #[serde(
33        rename = "cipherId",
34        alias = "CipherId",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub cipher_id: Option<uuid::Uuid>,
38    #[serde(
39        rename = "targetSystemId",
40        alias = "TargetSystemId",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub target_system_id: Option<uuid::Uuid>,
44    #[serde(
45        rename = "targetSystemName",
46        alias = "TargetSystemName",
47        skip_serializing_if = "Option::is_none"
48    )]
49    pub target_system_name: Option<String>,
50    #[serde(
51        rename = "targetSystemMethod",
52        alias = "TargetSystemMethod",
53        skip_serializing_if = "Option::is_none"
54    )]
55    pub target_system_method: Option<models::PamTargetSystemMethod>,
56    /// The config's sealed blob.
57    #[serde(
58        rename = "sealedData",
59        alias = "SealedData",
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub sealed_data: Option<String>,
63    /// The content key of the sealed blob, wrapped by the organization key.
64    #[serde(
65        rename = "wrappedKey",
66        alias = "WrappedKey",
67        skip_serializing_if = "Option::is_none"
68    )]
69    pub wrapped_key: Option<String>,
70    /// A Quartz 6-field cron expression evaluated in UTC. Null means no scheduled rotation.
71    #[serde(
72        rename = "scheduleCron",
73        alias = "ScheduleCron",
74        skip_serializing_if = "Option::is_none"
75    )]
76    pub schedule_cron: Option<String>,
77    /// When true, the credential rotates whenever a lease on the cipher ends, however it ended.
78    #[serde(
79        rename = "rotateOnAccessEnd",
80        alias = "RotateOnAccessEnd",
81        skip_serializing_if = "Option::is_none"
82    )]
83    pub rotate_on_access_end: Option<bool>,
84    /// When the config is next due: an automatic target then gets a job, a manual one becomes
85    /// Bit.Services.Pam.AccessConnector.Rotation.Api.Models.Response.
86    /// PamRotationConfigResponseModel.AwaitingManualRotation. Null means nothing is due.
87    #[serde(
88        rename = "nextRotationAt",
89        alias = "NextRotationAt",
90        skip_serializing_if = "Option::is_none"
91    )]
92    pub next_rotation_at: Option<String>,
93    /// When false, the config is paused and no rotation is offered for it.
94    #[serde(
95        rename = "enabled",
96        alias = "Enabled",
97        skip_serializing_if = "Option::is_none"
98    )]
99    pub enabled: Option<bool>,
100    /// When the last successful rotation completed. Null until the first success.
101    #[serde(
102        rename = "lastRotationAt",
103        alias = "LastRotationAt",
104        skip_serializing_if = "Option::is_none"
105    )]
106    pub last_rotation_at: Option<String>,
107    /// Whether the config has a pending or claimed job, or a timed-out one the sweep has not yet
108    /// recorded (spec `has_active_job`).
109    #[serde(
110        rename = "hasActiveJob",
111        alias = "HasActiveJob",
112        skip_serializing_if = "Option::is_none"
113    )]
114    pub has_active_job: Option<bool>,
115    /// An enabled manual-target config that has come due (spec `awaiting_manual_rotation`). An
116    /// operator rotates it out of band and records that via `record-manual`.
117    #[serde(
118        rename = "awaitingManualRotation",
119        alias = "AwaitingManualRotation",
120        skip_serializing_if = "Option::is_none"
121    )]
122    pub awaiting_manual_rotation: Option<bool>,
123    #[serde(
124        rename = "creationDate",
125        alias = "CreationDate",
126        skip_serializing_if = "Option::is_none"
127    )]
128    pub creation_date: Option<String>,
129    #[serde(
130        rename = "revisionDate",
131        alias = "RevisionDate",
132        skip_serializing_if = "Option::is_none"
133    )]
134    pub revision_date: Option<String>,
135    /// Every job recorded against the config, newest first, each with its attempts oldest first.
136    #[serde(
137        rename = "jobs",
138        alias = "Jobs",
139        skip_serializing_if = "Option::is_none"
140    )]
141    pub jobs: Option<Vec<models::PamRotationJobResponseModel>>,
142}
143
144impl PamRotationConfigDetailResponseModel {
145    /// A rotation config with its full job and attempt history.
146    pub fn new() -> PamRotationConfigDetailResponseModel {
147        PamRotationConfigDetailResponseModel {
148            object: None,
149            id: None,
150            organization_id: None,
151            cipher_id: None,
152            target_system_id: None,
153            target_system_name: None,
154            target_system_method: None,
155            sealed_data: None,
156            wrapped_key: None,
157            schedule_cron: None,
158            rotate_on_access_end: None,
159            next_rotation_at: None,
160            enabled: None,
161            last_rotation_at: None,
162            has_active_job: None,
163            awaiting_manual_rotation: None,
164            creation_date: None,
165            revision_date: None,
166            jobs: None,
167        }
168    }
169}