Skip to main content

bitwarden_api_api/models/
pam_rotation_attempt_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/// PamRotationAttemptResponseModel : One access connector's try at executing a rotation job. An
16/// element of
17/// Bit.Services.Pam.AccessConnector.Rotation.Api.Models.Response.PamRotationJobResponseModel.
18/// Attempts.
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct PamRotationAttemptResponseModel {
21    /// The attempt's unique identifier.
22    #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
23    pub id: Option<uuid::Uuid>,
24    /// The rotation job this attempt was made against.
25    #[serde(
26        rename = "jobId",
27        alias = "JobId",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub job_id: Option<uuid::Uuid>,
31    /// The access connector that executed this attempt, fixed for the attempt's lifetime.
32    #[serde(
33        rename = "claimedByAccessConnectorId",
34        alias = "ClaimedByAccessConnectorId",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub claimed_by_access_connector_id: Option<uuid::Uuid>,
38    /// Whether the access connector wrote the rotated secret back to the cipher.
39    #[serde(
40        rename = "cipherUpdated",
41        alias = "CipherUpdated",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub cipher_updated: Option<bool>,
45    #[serde(
46        rename = "status",
47        alias = "Status",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub status: Option<models::PamRotationAttemptStatus>,
51    /// Why the attempt failed -- the access connector's error code and its optional detail,
52    /// combined. Null unless
53    /// Bit.Services.Pam.AccessConnector.Rotation.Api.Models.Response.
54    /// PamRotationAttemptResponseModel.Status is Bit.Pam.Enums.PamRotationAttemptStatus.Errored.
55    #[serde(
56        rename = "failureReason",
57        alias = "FailureReason",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub failure_reason: Option<String>,
61    #[serde(
62        rename = "syncState",
63        alias = "SyncState",
64        skip_serializing_if = "Option::is_none"
65    )]
66    pub sync_state: Option<models::PamRotationSyncState>,
67    #[serde(
68        rename = "sessionTermination",
69        alias = "SessionTermination",
70        skip_serializing_if = "Option::is_none"
71    )]
72    pub session_termination: Option<models::PamSessionTerminationOutcome>,
73    /// When the attempt was created, at claim time (UTC).
74    #[serde(
75        rename = "creationDate",
76        alias = "CreationDate",
77        skip_serializing_if = "Option::is_none"
78    )]
79    pub creation_date: Option<String>,
80    /// When the attempt reached a terminal status (UTC). Null while it is still executing.
81    #[serde(
82        rename = "resolvedDate",
83        alias = "ResolvedDate",
84        skip_serializing_if = "Option::is_none"
85    )]
86    pub resolved_date: Option<String>,
87}
88
89impl PamRotationAttemptResponseModel {
90    /// One access connector's try at executing a rotation job. An element of
91    /// Bit.Services.Pam.AccessConnector.Rotation.Api.Models.Response.PamRotationJobResponseModel.
92    /// Attempts.
93    pub fn new() -> PamRotationAttemptResponseModel {
94        PamRotationAttemptResponseModel {
95            id: None,
96            job_id: None,
97            claimed_by_access_connector_id: None,
98            cipher_updated: None,
99            status: None,
100            failure_reason: None,
101            sync_state: None,
102            session_termination: None,
103            creation_date: None,
104            resolved_date: None,
105        }
106    }
107}