Skip to main content

bitwarden_api_api/models/
access_request_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/// AccessRequestCreateRequestModel : A request to lease a cipher. Supply
16/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.DurationSeconds for the
17/// automatic path, or
18/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start/Bit.Services.Pam.Api.
19/// Models.Request.AccessRequestCreateRequestModel.End +
20/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Reason for the human path.
21/// The server validates the shape against the cipher's resolved approval outcome (run a pre-check
22/// first). The cipher is identified by the route.
23#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
24pub struct AccessRequestCreateRequestModel {
25    #[serde(
26        rename = "durationSeconds",
27        alias = "DurationSeconds",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub duration_seconds: Option<i32>,
31    #[serde(
32        rename = "start",
33        alias = "Start",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub start: Option<String>,
37    #[serde(rename = "end", alias = "End", skip_serializing_if = "Option::is_none")]
38    pub end: Option<String>,
39    #[serde(
40        rename = "reason",
41        alias = "Reason",
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub reason: Option<String>,
45}
46
47impl AccessRequestCreateRequestModel {
48    /// A request to lease a cipher. Supply
49    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.DurationSeconds for the
50    /// automatic path, or
51    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start/Bit.Services.Pam.
52    /// Api.Models.Request.AccessRequestCreateRequestModel.End +
53    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Reason for the human
54    /// path. The server validates the shape against the cipher's resolved approval outcome (run a
55    /// pre-check first). The cipher is identified by the route.
56    pub fn new() -> AccessRequestCreateRequestModel {
57        AccessRequestCreateRequestModel {
58            duration_seconds: None,
59            start: None,
60            end: None,
61            reason: None,
62        }
63    }
64}