Skip to main content

orvanta_api/models/
set_password_request.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.6.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SetPasswordRequest {
16    #[serde(rename = "password")]
17    pub password: String,
18    /// Optional. When provided, verified against the caller's current password before the rotation is applied.
19    #[serde(rename = "current_password", skip_serializing_if = "Option::is_none")]
20    pub current_password: Option<String>,
21}
22
23impl SetPasswordRequest {
24    pub fn new(password: String) -> SetPasswordRequest {
25        SetPasswordRequest {
26            password,
27            current_password: None,
28        }
29    }
30}
31