Skip to main content

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