bitwarden_api_api/models/
secret_create_request_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SecretCreateRequestModel {
17    #[serde(rename = "key")]
18    pub key: String,
19    #[serde(rename = "value")]
20    pub value: String,
21    #[serde(rename = "note")]
22    pub note: String,
23    #[serde(rename = "projectIds", skip_serializing_if = "Option::is_none")]
24    pub project_ids: Option<Vec<uuid::Uuid>>,
25    #[serde(
26        rename = "accessPoliciesRequests",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub access_policies_requests: Option<Box<models::SecretAccessPoliciesRequestsModel>>,
30}
31
32impl SecretCreateRequestModel {
33    pub fn new(key: String, value: String, note: String) -> SecretCreateRequestModel {
34        SecretCreateRequestModel {
35            key,
36            value,
37            note,
38            project_ids: None,
39            access_policies_requests: None,
40        }
41    }
42}