/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * 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 GetDatatableFullSchema200ResponseValueValueForeignKeysInner {
    #[serde(rename = "target_table", skip_serializing_if = "Option::is_none")]
    pub target_table: Option<String>,
    #[serde(rename = "columns")]
    pub columns: Vec<models::GetDatatableFullSchema200ResponseValueValueForeignKeysInnerColumnsInner>,
    #[serde(rename = "on_delete")]
    pub on_delete: String,
    #[serde(rename = "on_update")]
    pub on_update: String,
    #[serde(rename = "fk_constraint_name", skip_serializing_if = "Option::is_none")]
    pub fk_constraint_name: Option<String>,
}

impl GetDatatableFullSchema200ResponseValueValueForeignKeysInner {
    pub fn new(columns: Vec<models::GetDatatableFullSchema200ResponseValueValueForeignKeysInnerColumnsInner>, on_delete: String, on_update: String) -> GetDatatableFullSchema200ResponseValueValueForeignKeysInner {
        GetDatatableFullSchema200ResponseValueValueForeignKeysInner {
            target_table: None,
            columns,
            on_delete,
            on_update,
            fk_constraint_name: None,
        }
    }
}

