
from __future__ import annotations
from .utils.json_map import JsonMap
from .utils.base_model import BaseModel
from .utils.sentinel import SENTINEL
from .custom_fields import CustomFields


@JsonMap(
    {
        "account": "account",
        "action_type": "actionType",
        "application_reference": "applicationReference",
        "atom_id": "atomId",
        "connector_name": "connectorName",
        "connector_type": "connectorType",
        "custom_fields": "customFields",
        "date_": "date",
        "date_processed": "dateProcessed",
        "document_index": "documentIndex",
        "error_message": "errorMessage",
        "execution_id": "executionId",
        "file_generation_number": "fileGenerationNumber",
        "file_version_number": "fileVersionNumber",
        "id_": "id",
        "message_type": "messageType",
        "operation_name": "operationName",
        "receiver_code": "receiverCode",
        "receiver_name": "receiverName",
        "receiver_transmission_reference": "receiverTransmissionReference",
        "sender_code": "senderCode",
        "sender_name": "senderName",
        "sender_transmission_reference": "senderTransmissionReference",
        "size": "size",
        "successful": "successful",
        "time": "time",
        "transmission_priority_code": "transmissionPriorityCode",
        "validation_report": "validationReport",
        "validation_status": "validationStatus",
    }
)
class TradacomsConnectorRecord(BaseModel):
    """TradacomsConnectorRecord

    :param account: The ID of the account in which you ran this record.
    :type account: str
    :param action_type: The type of action with which this record corresponds — Send for an outbound interchange, Get for an inbound interchange using the Disk, FTP, or SFTP communication method, or Listen for an inbound interchange using the AS2 or HTTP communication method.
    :type action_type: str
    :param application_reference: The code that enables the receiving trading partner to identify whether the message contains data for a particular type of application., defaults to None
    :type application_reference: str, optional
    :param atom_id: The Runtime ID from which you process this record.
    :type atom_id: str
    :param connector_name: The value is Trading Partner for a Tradacoms trading partner Send operation, or Start for a Tradacoms trading partner Listen operation.
    :type connector_name: str
    :param connector_type: Tradacoms is the connector type for any record.
    :type connector_type: str
    :param custom_fields: custom_fields
    :type custom_fields: CustomFields
    :param date_: The date of the message delivery., defaults to None
    :type date_: str, optional
    :param date_processed: The processing date and time of this record. The format is *yyyy-MM-dd'T'HH:mm:ss'Z'*, such as 2022-08-10T15:32:00Z.
    :type date_processed: str
    :param document_index: The numerical index of this record in the run., defaults to None
    :type document_index: int, optional
    :param error_message: Any error message associated with this record. Omit this field for a successful interchange.
    :type error_message: str
    :param execution_id: The ID of the run.
    :type execution_id: str
    :param file_generation_number: The number generated by the sending trading partner to uniquely reference the transmitted file., defaults to None
    :type file_generation_number: str, optional
    :param file_version_number: The number generated to uniquely reference a copy of the transmitted file., defaults to None
    :type file_version_number: str, optional
    :param id_: The ID of this record.
    :type id_: str
    :param message_type: The code identifying the type of message., defaults to None
    :type message_type: str, optional
    :param operation_name: The name of the operation component from which you processed the record.
    :type operation_name: str
    :param receiver_code: The identifier code of the receiving trading partner., defaults to None
    :type receiver_code: str, optional
    :param receiver_name: The name of the receiving trading partner., defaults to None
    :type receiver_name: str, optional
    :param receiver_transmission_reference: The receiving trading partner’s reference for the message, if known to the sending trading partner., defaults to None
    :type receiver_transmission_reference: str, optional
    :param sender_code: The identifier code of the sending trading partner., defaults to None
    :type sender_code: str, optional
    :param sender_name: The name of the sending trading partner., defaults to None
    :type sender_name: str, optional
    :param sender_transmission_reference: The sending trading partner’s reference for the message., defaults to None
    :type sender_transmission_reference: str, optional
    :param size: The size, in bytes, of the document that corresponds to this record., defaults to None
    :type size: int, optional
    :param successful: Whether the record is a success or error., defaults to None
    :type successful: bool, optional
    :param time: The time of the message delivery., defaults to None
    :type time: str, optional
    :param transmission_priority_code: The code for the message transmission priority., defaults to None
    :type transmission_priority_code: str, optional
    :param validation_report: The validation report, which contains descriptions of segment validation errors., defaults to None
    :type validation_report: str, optional
    :param validation_status: The validation status — either Success or Errors., defaults to None
    :type validation_status: str, optional
    """

    def __init__(
        self,
        account: str,
        action_type: str,
        atom_id: str,
        connector_name: str,
        connector_type: str,
        custom_fields: CustomFields,
        date_processed: str,
        error_message: str,
        execution_id: str,
        id_: str,
        operation_name: str,
        application_reference: str = SENTINEL,
        date_: str = SENTINEL,
        document_index: int = SENTINEL,
        file_generation_number: str = SENTINEL,
        file_version_number: str = SENTINEL,
        message_type: str = SENTINEL,
        receiver_code: str = SENTINEL,
        receiver_name: str = SENTINEL,
        receiver_transmission_reference: str = SENTINEL,
        sender_code: str = SENTINEL,
        sender_name: str = SENTINEL,
        sender_transmission_reference: str = SENTINEL,
        size: int = SENTINEL,
        successful: bool = SENTINEL,
        time: str = SENTINEL,
        transmission_priority_code: str = SENTINEL,
        validation_report: str = SENTINEL,
        validation_status: str = SENTINEL,
        **kwargs,
    ):
        """TradacomsConnectorRecord

        :param account: The ID of the account in which you ran this record.
        :type account: str
        :param action_type: The type of action with which this record corresponds — Send for an outbound interchange, Get for an inbound interchange using the Disk, FTP, or SFTP communication method, or Listen for an inbound interchange using the AS2 or HTTP communication method.
        :type action_type: str
        :param application_reference: The code that enables the receiving trading partner to identify whether the message contains data for a particular type of application., defaults to None
        :type application_reference: str, optional
        :param atom_id: The Runtime ID from which you process this record.
        :type atom_id: str
        :param connector_name: The value is Trading Partner for a Tradacoms trading partner Send operation, or Start for a Tradacoms trading partner Listen operation.
        :type connector_name: str
        :param connector_type: Tradacoms is the connector type for any record.
        :type connector_type: str
        :param custom_fields: custom_fields
        :type custom_fields: CustomFields
        :param date_: The date of the message delivery., defaults to None
        :type date_: str, optional
        :param date_processed: The processing date and time of this record. The format is *yyyy-MM-dd'T'HH:mm:ss'Z'*, such as 2022-08-10T15:32:00Z.
        :type date_processed: str
        :param document_index: The numerical index of this record in the run., defaults to None
        :type document_index: int, optional
        :param error_message: Any error message associated with this record. Omit this field for a successful interchange.
        :type error_message: str
        :param execution_id: The ID of the run.
        :type execution_id: str
        :param file_generation_number: The number generated by the sending trading partner to uniquely reference the transmitted file., defaults to None
        :type file_generation_number: str, optional
        :param file_version_number: The number generated to uniquely reference a copy of the transmitted file., defaults to None
        :type file_version_number: str, optional
        :param id_: The ID of this record.
        :type id_: str
        :param message_type: The code identifying the type of message., defaults to None
        :type message_type: str, optional
        :param operation_name: The name of the operation component from which you processed the record.
        :type operation_name: str
        :param receiver_code: The identifier code of the receiving trading partner., defaults to None
        :type receiver_code: str, optional
        :param receiver_name: The name of the receiving trading partner., defaults to None
        :type receiver_name: str, optional
        :param receiver_transmission_reference: The receiving trading partner’s reference for the message, if known to the sending trading partner., defaults to None
        :type receiver_transmission_reference: str, optional
        :param sender_code: The identifier code of the sending trading partner., defaults to None
        :type sender_code: str, optional
        :param sender_name: The name of the sending trading partner., defaults to None
        :type sender_name: str, optional
        :param sender_transmission_reference: The sending trading partner’s reference for the message., defaults to None
        :type sender_transmission_reference: str, optional
        :param size: The size, in bytes, of the document that corresponds to this record., defaults to None
        :type size: int, optional
        :param successful: Whether the record is a success or error., defaults to None
        :type successful: bool, optional
        :param time: The time of the message delivery., defaults to None
        :type time: str, optional
        :param transmission_priority_code: The code for the message transmission priority., defaults to None
        :type transmission_priority_code: str, optional
        :param validation_report: The validation report, which contains descriptions of segment validation errors., defaults to None
        :type validation_report: str, optional
        :param validation_status: The validation status — either Success or Errors., defaults to None
        :type validation_status: str, optional
        """
        self.account = account
        self.action_type = action_type
        if application_reference is not SENTINEL:
            self.application_reference = application_reference
        self.atom_id = atom_id
        self.connector_name = connector_name
        self.connector_type = connector_type
        self.custom_fields = self._define_object(custom_fields, CustomFields)
        if date_ is not SENTINEL:
            self.date_ = date_
        self.date_processed = date_processed
        if document_index is not SENTINEL:
            self.document_index = document_index
        self.error_message = error_message
        self.execution_id = execution_id
        if file_generation_number is not SENTINEL:
            self.file_generation_number = file_generation_number
        if file_version_number is not SENTINEL:
            self.file_version_number = file_version_number
        self.id_ = id_
        if message_type is not SENTINEL:
            self.message_type = message_type
        self.operation_name = operation_name
        if receiver_code is not SENTINEL:
            self.receiver_code = receiver_code
        if receiver_name is not SENTINEL:
            self.receiver_name = receiver_name
        if receiver_transmission_reference is not SENTINEL:
            self.receiver_transmission_reference = receiver_transmission_reference
        if sender_code is not SENTINEL:
            self.sender_code = sender_code
        if sender_name is not SENTINEL:
            self.sender_name = sender_name
        if sender_transmission_reference is not SENTINEL:
            self.sender_transmission_reference = sender_transmission_reference
        if size is not SENTINEL:
            self.size = size
        if successful is not SENTINEL:
            self.successful = successful
        if time is not SENTINEL:
            self.time = time
        if transmission_priority_code is not SENTINEL:
            self.transmission_priority_code = transmission_priority_code
        if validation_report is not SENTINEL:
            self.validation_report = validation_report
        if validation_status is not SENTINEL:
            self.validation_status = validation_status
        self._kwargs = kwargs
