/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.8
 * 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 WorkspaceReassignment {
    /// Target: 'u/{username}' or 'f/{folder}'
    #[serde(rename = "reassign_to")]
    pub reassign_to: String,
    /// Required when reassign_to is a folder. Username to use as permissioned_as.
    #[serde(rename = "new_on_behalf_of_user", skip_serializing_if = "Option::is_none")]
    pub new_on_behalf_of_user: Option<String>,
}

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

