bitwarden_api_api/models/register_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/// RegisterAccessConnectorResponseModel : The response to `POST access-connectors` (spec
16/// `ConnectorRegistration`).
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct RegisterAccessConnectorResponseModel {
19 #[serde(
20 rename = "object",
21 alias = "Object",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub object: Option<String>,
25 /// The access connector's unique identifier.
26 #[serde(rename = "id", alias = "Id", skip_serializing_if = "Option::is_none")]
27 pub id: Option<uuid::Uuid>,
28 /// The organization the access connector was registered in.
29 #[serde(
30 rename = "organizationId",
31 alias = "OrganizationId",
32 skip_serializing_if = "Option::is_none"
33 )]
34 pub organization_id: Option<uuid::Uuid>,
35 /// The access connector's display label, as supplied at registration.
36 #[serde(
37 rename = "name",
38 alias = "Name",
39 skip_serializing_if = "Option::is_none"
40 )]
41 pub name: Option<String>,
42 #[serde(
43 rename = "status",
44 alias = "Status",
45 skip_serializing_if = "Option::is_none"
46 )]
47 pub status: Option<models::PamAccessConnectorStatus>,
48 /// When the access connector was registered (UTC).
49 #[serde(
50 rename = "creationDate",
51 alias = "CreationDate",
52 skip_serializing_if = "Option::is_none"
53 )]
54 pub creation_date: Option<String>,
55 /// The id of the access connector's `dbo.ApiKey` credential. The operator assembles the access
56 /// connector's OAuth client id from it (`daemon.<ApiKeyId>`, resolved server-side by
57 /// `PamAccessConnectorClientProvider` in Identity).
58 #[serde(
59 rename = "apiKeyId",
60 alias = "ApiKeyId",
61 skip_serializing_if = "Option::is_none"
62 )]
63 pub api_key_id: Option<uuid::Uuid>,
64 /// WARNING: shown exactly once. The plaintext client secret for the access connector's
65 /// credential -- store it now; the server hashes it for storage and never persists or returns
66 /// the plaintext again. Pair with the client-wrapped org key you already hold locally to
67 /// assemble the access connector's token
68 /// (`0.daemon.<apiKeyId>.<client_secret>:<encryption_key>`).
69 #[serde(
70 rename = "clientSecret",
71 alias = "ClientSecret",
72 skip_serializing_if = "Option::is_none"
73 )]
74 pub client_secret: Option<String>,
75}
76
77impl RegisterAccessConnectorResponseModel {
78 /// The response to `POST access-connectors` (spec `ConnectorRegistration`).
79 pub fn new() -> RegisterAccessConnectorResponseModel {
80 RegisterAccessConnectorResponseModel {
81 object: None,
82 id: None,
83 organization_id: None,
84 name: None,
85 status: None,
86 creation_date: None,
87 api_key_id: None,
88 client_secret: None,
89 }
90 }
91}