orvanta-api 6.3.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.3.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// NewDataMigration : The body of `create` / `update` for a saved data-migration definition (#1220). `source_resource_path` / `target_resource_path` name *resources*; credentials are never stored, and are resolved fresh through RLS on every run. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewDataMigration {
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<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", skip_serializing_if = "Option::is_none")]
    pub mapping: Option<Vec<models::ColumnMapping>>,
    #[serde(rename = "options", skip_serializing_if = "Option::is_none")]
    pub options: Option<Box<models::DataMigrationOptions>>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl NewDataMigration {
    /// The body of `create` / `update` for a saved data-migration definition (#1220). `source_resource_path` / `target_resource_path` name *resources*; credentials are never stored, and are resolved fresh through RLS on every run. 
    pub fn new(path: String, source_resource_path: String, target_resource_path: String, source_table: String, target_table: String) -> NewDataMigration {
        NewDataMigration {
            path,
            summary: None,
            description: None,
            source_resource_path,
            target_resource_path,
            source_table,
            target_table,
            mapping: None,
            options: None,
            labels: None,
        }
    }
}