Skip to main content

orvanta_api/models/
data_migration_definition.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 6.5.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DataMigrationDefinition {
16    #[serde(rename = "workspace_id")]
17    pub workspace_id: String,
18    #[serde(rename = "path")]
19    pub path: String,
20    #[serde(rename = "summary")]
21    pub summary: String,
22    #[serde(rename = "description")]
23    pub description: String,
24    #[serde(rename = "source_resource_path")]
25    pub source_resource_path: String,
26    #[serde(rename = "target_resource_path")]
27    pub target_resource_path: String,
28    #[serde(rename = "source_table")]
29    pub source_table: String,
30    #[serde(rename = "target_table")]
31    pub target_table: String,
32    #[serde(rename = "mapping")]
33    pub mapping: Vec<models::ColumnMapping>,
34    #[serde(rename = "options")]
35    pub options: Box<models::DataMigrationOptions>,
36    #[serde(rename = "extra_perms")]
37    pub extra_perms: std::collections::HashMap<String, bool>,
38    #[serde(rename = "edited_by")]
39    pub edited_by: String,
40    #[serde(rename = "edited_at")]
41    pub edited_at: String,
42    #[serde(rename = "archived")]
43    pub archived: bool,
44    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
45    pub labels: Option<Vec<String>>,
46}
47
48impl DataMigrationDefinition {
49    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 {
50        DataMigrationDefinition {
51            workspace_id,
52            path,
53            summary,
54            description,
55            source_resource_path,
56            target_resource_path,
57            source_table,
58            target_table,
59            mapping,
60            options: Box::new(options),
61            extra_perms,
62            edited_by,
63            edited_at,
64            archived,
65            labels: None,
66        }
67    }
68}
69