autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2023-08-01
 * Contact: core@stedi.com
 * Generated by: https://openapi-generator.tech
 */

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

/// X12TransactionMetadata : Metadata about the X12 EDI transaction, including information from the interchange, functional group, and transaction headers as well as the sender and receiver IDs.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct X12TransactionMetadata {
    #[serde(rename = "interchange")]
    pub interchange: Box<models::X12TransactionMetadataInterchange>,
    #[serde(rename = "functionalGroup")]
    pub functional_group: Box<models::X12TransactionMetadataFunctionalGroup>,
    #[serde(rename = "transaction")]
    pub transaction: Box<models::X12TransactionMetadataTransaction>,
    #[serde(rename = "sender")]
    pub sender: Box<models::X12TransactionMetadataProfile>,
    #[serde(rename = "receiver")]
    pub receiver: Box<models::X12TransactionMetadataProfile>,
}

impl X12TransactionMetadata {
    /// Metadata about the X12 EDI transaction, including information from the interchange, functional group, and transaction headers as well as the sender and receiver IDs.
    pub fn new(interchange: models::X12TransactionMetadataInterchange, functional_group: models::X12TransactionMetadataFunctionalGroup, transaction: models::X12TransactionMetadataTransaction, sender: models::X12TransactionMetadataProfile, receiver: models::X12TransactionMetadataProfile) -> X12TransactionMetadata {
        X12TransactionMetadata {
            interchange: Box::new(interchange),
            functional_group: Box::new(functional_group),
            transaction: Box::new(transaction),
            sender: Box::new(sender),
            receiver: Box::new(receiver),
        }
    }
}