use serde::{Deserialize, Serialize}; /*
                                      * Cloud Resource Manager API
                                      *
                                      * Creates, reads, and updates metadata for Google Cloud Platform resource containers.
                                      *
                                      * The version of the OpenAPI document: v3
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::cloudresourcemanager_v3::models;

/// CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation : Metadata describing a long running folder operation
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation {
    /// The resource name of the folder or organization we are either creating the folder under or moving the folder to.
    #[serde(rename = "destinationParent", skip_serializing_if = "Option::is_none")]
    pub destination_parent: Option<String>,
    /// The display name of the folder.
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// The type of this operation.
    #[serde(rename = "operationType", skip_serializing_if = "Option::is_none")]
    pub operation_type: Option<OperationType>,
    /// The resource name of the folder's parent. Only applicable when the operation_type is MOVE.
    #[serde(rename = "sourceParent", skip_serializing_if = "Option::is_none")]
    pub source_parent: Option<String>,
}

impl CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation {
    /// Metadata describing a long running folder operation
    pub fn new() -> CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation {
        CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation {
            destination_parent: None,
            display_name: None,
            operation_type: None,
            source_parent: None,
        }
    }
}
/// The type of this operation.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OperationType {
    #[serde(rename = "OPERATION_TYPE_UNSPECIFIED")]
    OperationTypeUnspecified,
    #[serde(rename = "CREATE")]
    Create,
    #[serde(rename = "MOVE")]
    Move,
}

impl Default for OperationType {
    fn default() -> OperationType {
        Self::OperationTypeUnspecified
    }
}
