bitwarden_api_api/models/pam_access_connector_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/// PamAccessConnectorDetailResponseModel : An access connector's detail view for `GET
16/// access-connectors/{id}`: the list shape flattened onto the same object, plus the access
17/// connector's recent rotation activity. The fleet surface renders the header from the access
18/// connector fields and the activity section from
19/// Bit.Services.Pam.AccessConnector.Api.Models.Response.PamAccessConnectorDetailResponseModel.Jobs,
20/// so both arrive in one response.
21#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
22pub struct PamAccessConnectorDetailResponseModel {
23 #[serde(
24 rename = "object",
25 alias = "Object",
26 skip_serializing_if = "Option::is_none"
27 )]
28 pub object: Option<String>,
29 /// The access connector's unique identifier.
30 #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
31 pub id: Option<uuid::Uuid>,
32 /// The organization this access connector belongs to.
33 #[serde(
34 rename = "organizationId",
35 alias = "OrganizationId",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub organization_id: Option<uuid::Uuid>,
39 /// The access connector's display label, shown wherever access connectors are listed and
40 /// managed.
41 #[serde(
42 rename = "name",
43 alias = "Name",
44 skip_serializing_if = "Option::is_none"
45 )]
46 pub name: Option<String>,
47 #[serde(
48 rename = "status",
49 alias = "Status",
50 skip_serializing_if = "Option::is_none"
51 )]
52 pub status: Option<models::PamAccessConnectorStatus>,
53 /// Derived from
54 /// Bit.Services.Pam.AccessConnector.Api.Models.Response.PamAccessConnectorResponseModel.
55 /// LastHeartbeatAt against `PamRotationOptions.ConnectorOfflineAfter` -- spec
56 /// `ConnectorConnection`.
57 #[serde(
58 rename = "isConnected",
59 alias = "IsConnected",
60 skip_serializing_if = "Option::is_none"
61 )]
62 pub is_connected: Option<bool>,
63 /// The last time the access connector polled or reported (UTC). Null until its first request;
64 /// bumped only by the access connector's own requests, never by a sweep.
65 #[serde(
66 rename = "lastHeartbeatAt",
67 alias = "LastHeartbeatAt",
68 skip_serializing_if = "Option::is_none"
69 )]
70 pub last_heartbeat_at: Option<String>,
71 /// The target systems this access connector is assigned to work. An access connector is
72 /// offered rotation jobs only for the targets it is assigned.
73 #[serde(
74 rename = "assignedTargetSystemIds",
75 alias = "AssignedTargetSystemIds",
76 skip_serializing_if = "Option::is_none"
77 )]
78 pub assigned_target_system_ids: Option<Vec<uuid::Uuid>>,
79 /// When the access connector was registered (UTC).
80 #[serde(
81 rename = "creationDate",
82 alias = "CreationDate",
83 skip_serializing_if = "Option::is_none"
84 )]
85 pub creation_date: Option<String>,
86 /// When the access connector was last modified (UTC).
87 #[serde(
88 rename = "revisionDate",
89 alias = "RevisionDate",
90 skip_serializing_if = "Option::is_none"
91 )]
92 pub revision_date: Option<String>,
93 /// The access connector's recent jobs, newest first, each carrying only the attempts this
94 /// access connector recorded -- capped by `GetAccessConnectorDetailsQuery` rather than being
95 /// the access connector's whole history.
96 #[serde(
97 rename = "jobs",
98 alias = "Jobs",
99 skip_serializing_if = "Option::is_none"
100 )]
101 pub jobs: Option<Vec<models::PamRotationJobResponseModel>>,
102}
103
104impl PamAccessConnectorDetailResponseModel {
105 /// An access connector's detail view for `GET access-connectors/{id}`: the list shape flattened
106 /// onto the same object, plus the access connector's recent rotation activity. The fleet
107 /// surface renders the header from the access connector fields and the activity section from
108 /// Bit.Services.Pam.AccessConnector.Api.Models.Response.PamAccessConnectorDetailResponseModel.
109 /// Jobs, so both arrive in one response.
110 pub fn new() -> PamAccessConnectorDetailResponseModel {
111 PamAccessConnectorDetailResponseModel {
112 object: None,
113 id: None,
114 organization_id: None,
115 name: None,
116 status: None,
117 is_connected: None,
118 last_heartbeat_at: None,
119 assigned_target_system_ids: None,
120 creation_date: None,
121 revision_date: None,
122 jobs: None,
123 }
124 }
125}