Skip to main content

bitwarden_api_api/models/
claimable_rotation_job_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/// ClaimableRotationJobResponseModel : A claimable rotation job, as the access connector's poll
16/// returns it (the candidate set spec `ClaimRotation` claims from).
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct ClaimableRotationJobResponseModel {
19    #[serde(
20        rename = "object",
21        alias = "Object",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub object: Option<String>,
25    #[serde(
26        rename = "jobId",
27        alias = "JobId",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub job_id: Option<uuid::Uuid>,
31    #[serde(
32        rename = "source",
33        alias = "Source",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub source: Option<models::PamRotationSource>,
37    /// The earliest time the job can be claimed; pushed out by retry backoff or a release.
38    #[serde(
39        rename = "nextClaimableAt",
40        alias = "NextClaimableAt",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub next_claimable_at: Option<String>,
44    /// When the job times out unless an attempt has succeeded.
45    #[serde(
46        rename = "expiresAt",
47        alias = "ExpiresAt",
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub expires_at: Option<String>,
51    #[serde(
52        rename = "targetSystemId",
53        alias = "TargetSystemId",
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub target_system_id: Option<uuid::Uuid>,
57}
58
59impl ClaimableRotationJobResponseModel {
60    /// A claimable rotation job, as the access connector's poll returns it (the candidate set spec
61    /// `ClaimRotation` claims from).
62    pub fn new() -> ClaimableRotationJobResponseModel {
63        ClaimableRotationJobResponseModel {
64            object: None,
65            job_id: None,
66            source: None,
67            next_claimable_at: None,
68            expires_at: None,
69            target_system_id: None,
70        }
71    }
72}