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 /// The start of the requested window. A timestamp with neither `Z` nor an offset is read as
32 /// UTC.
33 #[serde(
34 rename = "start",
35 alias = "Start",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub start: Option<String>,
39 /// The end of the requested window, read like
40 /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start.
41 #[serde(rename = "end", alias = "End", skip_serializing_if = "Option::is_none")]
42 pub end: Option<String>,
43 #[serde(
44 rename = "reason",
45 alias = "Reason",
46 skip_serializing_if = "Option::is_none"
47 )]
48 pub reason: Option<String>,
49}
50
51impl AccessRequestCreateRequestModel {
52 /// A request to lease a cipher. Supply
53 /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.DurationSeconds for the
54 /// automatic path, or
55 /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Start/Bit.Services.Pam.
56 /// Api.Models.Request.AccessRequestCreateRequestModel.End +
57 /// Bit.Services.Pam.Api.Models.Request.AccessRequestCreateRequestModel.Reason for the human
58 /// path. The server validates the shape against the cipher's resolved approval outcome (run a
59 /// pre-check first). The cipher is identified by the route.
60 pub fn new() -> AccessRequestCreateRequestModel {
61 AccessRequestCreateRequestModel {
62 duration_seconds: None,
63 start: None,
64 end: None,
65 reason: None,
66 }
67 }
68}