Skip to main content

bitwarden_api_api/models/
pam_password_policy_response_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/// PamPasswordPolicyResponseModel : A target system's password-generation constraints, embedded
16/// wherever that policy is surfaced.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct PamPasswordPolicyResponseModel {
19    /// The shortest password the access connector may generate.
20    #[serde(
21        rename = "minLength",
22        alias = "MinLength",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub min_length: Option<i32>,
26    /// The longest password the access connector may generate.
27    #[serde(
28        rename = "maxLength",
29        alias = "MaxLength",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub max_length: Option<i32>,
33    /// Whether generated passwords include uppercase letters.
34    #[serde(
35        rename = "includeUppercase",
36        alias = "IncludeUppercase",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub include_uppercase: Option<bool>,
40    /// Whether generated passwords include lowercase letters.
41    #[serde(
42        rename = "includeLowercase",
43        alias = "IncludeLowercase",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub include_lowercase: Option<bool>,
47    /// Whether generated passwords include digits.
48    #[serde(
49        rename = "includeDigits",
50        alias = "IncludeDigits",
51        skip_serializing_if = "Option::is_none"
52    )]
53    pub include_digits: Option<bool>,
54    /// Whether generated passwords include symbols.
55    #[serde(
56        rename = "includeSymbols",
57        alias = "IncludeSymbols",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub include_symbols: Option<bool>,
61}
62
63impl PamPasswordPolicyResponseModel {
64    /// A target system's password-generation constraints, embedded wherever that policy is
65    /// surfaced.
66    pub fn new() -> PamPasswordPolicyResponseModel {
67        PamPasswordPolicyResponseModel {
68            min_length: None,
69            max_length: None,
70            include_uppercase: None,
71            include_lowercase: None,
72            include_digits: None,
73            include_symbols: None,
74        }
75    }
76}