bitwarden-api-api 1.0.0

Api bindings for the Bitwarden API.
Documentation
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SecretCreateRequestModel {
    #[serde(rename = "key")]
    pub key: String,
    #[serde(rename = "value")]
    pub value: String,
    #[serde(rename = "note")]
    pub note: String,
    #[serde(rename = "projectIds", skip_serializing_if = "Option::is_none")]
    pub project_ids: Option<Vec<uuid::Uuid>>,
    #[serde(
        rename = "accessPoliciesRequests",
        skip_serializing_if = "Option::is_none"
    )]
    pub access_policies_requests: Option<Box<models::SecretAccessPoliciesRequestsModel>>,
}

impl SecretCreateRequestModel {
    pub fn new(key: String, value: String, note: String) -> SecretCreateRequestModel {
        SecretCreateRequestModel {
            key,
            value,
            note,
            project_ids: None,
            access_policies_requests: None,
        }
    }
}