/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OffboardRequest {
    /// Target for reassignment: 'u/{username}' or 'f/{folder}'
    #[serde(rename = "reassign_to")]
    pub reassign_to: String,
    /// Required when reassign_to is a folder. The username whose identity will be used as permissioned_as for schedules and triggers.
    #[serde(rename = "new_on_behalf_of_user", skip_serializing_if = "Option::is_none")]
    pub new_on_behalf_of_user: Option<String>,
    /// Whether to also remove the user from the workspace
    #[serde(rename = "delete_user", skip_serializing_if = "Option::is_none")]
    pub delete_user: Option<bool>,
}

impl OffboardRequest {
    pub fn new(reassign_to: String) -> OffboardRequest {
        OffboardRequest {
            reassign_to,
            new_on_behalf_of_user: None,
            delete_user: None,
        }
    }
}

