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