Skip to main content

bitwarden_api_api/models/
register_target_system_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/// RegisterTargetSystemRequestModel : Registers a target system's first phase (spec
16/// `RegisterTargetSystem`); a follow-up `PUT` seals it.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct RegisterTargetSystemRequestModel {
19    #[serde(rename = "name", alias = "Name")]
20    pub name: String,
21    #[serde(rename = "method", alias = "Method")]
22    pub method: models::PamTargetSystemMethod,
23}
24
25impl RegisterTargetSystemRequestModel {
26    /// Registers a target system's first phase (spec `RegisterTargetSystem`); a follow-up `PUT`
27    /// seals it.
28    pub fn new(
29        name: String,
30        method: models::PamTargetSystemMethod,
31    ) -> RegisterTargetSystemRequestModel {
32        RegisterTargetSystemRequestModel { name, method }
33    }
34}