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 the routed cipher. Supply
16/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.DurationSeconds on the
17/// automatic path, or Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start,
18/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.End and
19/// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Reason on the human path;
20/// the pre-check reports which path applies.
21#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
22pub struct AccessRequestCreateRequestModel {
23    #[serde(
24        rename = "durationSeconds",
25        alias = "DurationSeconds",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub duration_seconds: Option<i32>,
29    /// The start of the requested window. A timestamp with neither `Z` nor an offset is read as
30    /// UTC.
31    #[serde(
32        rename = "start",
33        alias = "Start",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub start: Option<String>,
37    /// The end of the requested window, read like
38    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start.
39    #[serde(rename = "end", alias = "End", skip_serializing_if = "Option::is_none")]
40    pub end: Option<String>,
41    #[serde(
42        rename = "reason",
43        alias = "Reason",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub reason: Option<String>,
47}
48
49impl AccessRequestCreateRequestModel {
50    /// A request to lease the routed cipher. Supply
51    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.DurationSeconds on the
52    /// automatic path, or
53    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start,
54    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.End and
55    /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Reason on the human
56    /// path; the pre-check reports which path applies.
57    pub fn new() -> AccessRequestCreateRequestModel {
58        AccessRequestCreateRequestModel {
59            duration_seconds: None,
60            start: None,
61            end: None,
62            reason: None,
63        }
64    }
65}