Skip to main content

bitwarden_api_api/models/
access_lease_revoke_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/// AccessLeaseRevokeRequestModel : A request to revoke an active lease early.
16/// Bit.Services.Pam.Api.Models.Request.AccessLeaseRevokeRequestModel.Reason is optional and
17/// retained for the audit trail.
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct AccessLeaseRevokeRequestModel {
20    /// An optional note explaining the revocation. Recorded on the audit trail; not surfaced on
21    /// the lease itself.
22    #[serde(
23        rename = "reason",
24        alias = "Reason",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub reason: Option<String>,
28}
29
30impl AccessLeaseRevokeRequestModel {
31    /// A request to revoke an active lease early.
32    /// Bit.Services.Pam.Api.Models.Request.AccessLeaseRevokeRequestModel.Reason is optional and
33    /// retained for the audit trail.
34    pub fn new() -> AccessLeaseRevokeRequestModel {
35        AccessLeaseRevokeRequestModel { reason: None }
36    }
37}