orvanta-api 6.5.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 6.5.0
 * 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 DataMigrationDefinition {
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "summary")]
    pub summary: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "source_resource_path")]
    pub source_resource_path: String,
    #[serde(rename = "target_resource_path")]
    pub target_resource_path: String,
    #[serde(rename = "source_table")]
    pub source_table: String,
    #[serde(rename = "target_table")]
    pub target_table: String,
    #[serde(rename = "mapping")]
    pub mapping: Vec<models::ColumnMapping>,
    #[serde(rename = "options")]
    pub options: Box<models::DataMigrationOptions>,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "edited_by")]
    pub edited_by: String,
    #[serde(rename = "edited_at")]
    pub edited_at: String,
    #[serde(rename = "archived")]
    pub archived: bool,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl DataMigrationDefinition {
    pub fn new(workspace_id: String, path: String, summary: String, description: String, source_resource_path: String, target_resource_path: String, source_table: String, target_table: String, mapping: Vec<models::ColumnMapping>, options: models::DataMigrationOptions, extra_perms: std::collections::HashMap<String, bool>, edited_by: String, edited_at: String, archived: bool) -> DataMigrationDefinition {
        DataMigrationDefinition {
            workspace_id,
            path,
            summary,
            description,
            source_resource_path,
            target_resource_path,
            source_table,
            target_table,
            mapping,
            options: Box::new(options),
            extra_perms,
            edited_by,
            edited_at,
            archived,
            labels: None,
        }
    }
}