# This file was generated by liblab | https://liblab.com/

from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap(
    {
        "chemical_record_identifier": "ChemicalRecordIdentifier",
        "class_division_number": "ClassDivisionNumber",
        "id_number": "IDNumber",
        "transportation_mode": "TransportationMode",
        "regulation_set": "RegulationSet",
        "emergency_phone": "EmergencyPhone",
        "emergency_contact": "EmergencyContact",
        "reportable_quantity": "ReportableQuantity",
        "sub_risk_class": "SubRiskClass",
        "packaging_group_type": "PackagingGroupType",
        "quantity": "Quantity",
        "uom": "UOM",
        "packaging_instruction_code": "PackagingInstructionCode",
        "proper_shipping_name": "ProperShippingName",
        "technical_name": "TechnicalName",
        "additional_description": "AdditionalDescription",
        "packaging_type": "PackagingType",
        "hazard_label_required": "HazardLabelRequired",
        "packaging_type_quantity": "PackagingTypeQuantity",
        "commodity_regulated_level_code": "CommodityRegulatedLevelCode",
        "transport_category": "TransportCategory",
        "tunnel_restriction_code": "TunnelRestrictionCode",
    }
)
class HazMatHazMatChemicalRecord(BaseModel):
    """Container to hold HazMat Chemical Records.

    :param chemical_record_identifier: Identifies the Chemcial Record.  Required if SubVersion is greater than or equal to 1701., defaults to None
    :type chemical_record_identifier: str, optional
    :param class_division_number: This is the hazard class associated to the specified commodity. Required if CommodityRegulatedLevelCode is 'LQ' or 'FR'  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type class_division_number: str, optional
    :param id_number: This is the ID number (UN/NA/ID) for the specified commodity. Required if CommodityRegulatedLevelCode = LR, LQ or FR and if the field applies to the material by regulation. UN/NA/ID Identification Number assigned to the specified regulated good. (Include the UN/NA/ID as part of the entry).  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type id_number: str, optional
    :param transportation_mode: The method of transport by which a shipment is approved to move and the regulations associated with that method.  Only required when the CommodityRegulatedLevelCode is FR or LQ.Valid values: 01 - Highway02 - Ground03 - Passenger Aircraft04 - Cargo Aircraft Only  Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package having different TransportationMode, TransportationMode of first ChemicalRecord would be considered for validating and rating the package. All TransportationMode except for '04' are general service offering. If any chemical record contains '04' as TransportationMode, ShipperNumber needs to be authorized to use '04' as TransportationMode.
    :type transportation_mode: str
    :param regulation_set: The Regulatory set associated with every regulated shipment. It must be the same across the shipment. Valid values:   ADR -  For Europe to Europe Ground Movement CFR -  For HazMat regulated by US Dept. of Transportation within the U.S. or ground shipments to Canada, IATA -  For Worldwide Air movement TDG -  For Canada to Canada ground movement or Canada to U.S. standard movement  Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package or multiple packages containing different RegulationSet, RegulationSet of first ChemicalRecord would be considered for validating and rating the entire shipment.
    :type regulation_set: str
    :param emergency_phone: 24 Hour Emergency Phone Number of the shipper. Valid values for this field are (0) through (9) with trailing blanks. For numbers within the U.S., the layout is '1', area code, 7-digit number. For all other countries or territories the layout is country or territory code, area code, number.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type emergency_phone: str, optional
    :param emergency_contact: The emergency information, contact name and/or contact number, required to be communicated when a call is placed to the EmergencyPhoneNumber. The information is required if there is a value in the EmergencyPhoneNumber field above and the shipment is with a US50 or PR origin and/or destination and the RegulationSet is IATA.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type emergency_contact: str, optional
    :param reportable_quantity: Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. If reportable quantity is met, 'RQ' should be entered.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type reportable_quantity: str, optional
    :param sub_risk_class: Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Secondary hazardous characteristics of a package. (There can be more than one – separate each with a comma).  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type sub_risk_class: str, optional
    :param packaging_group_type: This is the packing group category associated to the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Must be shown in Roman Numerals.Valid values are:I, II,III,blank.   Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type packaging_group_type: str, optional
    :param quantity: Required if CommodityRegulatedLevelCode = LQ or FR. The numerical value of the mass capacity of the regulated good.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type quantity: str, optional
    :param uom: Required if CommodityRegulatedLevelCode = LQ or FR. The unit of measure used for the mass capacity of the regulated good. For Example: ml, L, g, mg, kg, cylinder, pound, pint, quart, gallon, ounce etc.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type uom: str, optional
    :param packaging_instruction_code: The packing instructions related to the chemical record. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type packaging_instruction_code: str, optional
    :param proper_shipping_name: The Proper Shipping Name assigned by ADR, CFR or IATA. Required if CommodityRegulatedLevelCode = LR, LQ or FR.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type proper_shipping_name: str, optional
    :param technical_name: The technical name (when required) for the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type technical_name: str, optional
    :param additional_description: Additional remarks or special provision information. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Additional information that may be required by regulation about a hazardous material, such as, "Limited Quantity", DOT-SP numbers, EX numbers.  Applies only if SubVersion is greater than or equal to 1701. , defaults to None
    :type additional_description: str, optional
    :param packaging_type: The package type code identifying the type of packaging used for the commodity. (Ex: Fiberboard Box). Required if CommodityRegulatedLevelCode = LQ or FR.   Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type packaging_type: str, optional
    :param hazard_label_required: Defines the type of label that is required on the package for the commodity. Not applicable if CommodityRegulatedLevelCode = LR or EQ.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type hazard_label_required: str, optional
    :param packaging_type_quantity: The number of pieces of the specific commodity. Required if CommodityRegulatedLevelCode = LQ or FR.Valid values are 1 to 999.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type packaging_type_quantity: str, optional
    :param commodity_regulated_level_code: Indicates the type of commodity - Fully Regulated (FR), Limited Quantity (LQ), Excepted Quantity (EQ), Lightly Regulated (LR). Default value is FR.Valid values are LR, FR, LQ, EQ.   Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type commodity_regulated_level_code: str, optional
    :param transport_category: Transport Category.Valid values are 0 to 4.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type transport_category: str, optional
    :param tunnel_restriction_code: Defines what is restricted to pass through a tunnel.  Applies only if SubVersion is greater than or equal to 1701., defaults to None
    :type tunnel_restriction_code: str, optional
    """

    def __init__(
        self,
        transportation_mode: str,
        regulation_set: str,
        chemical_record_identifier: str = None,
        class_division_number: str = None,
        id_number: str = None,
        emergency_phone: str = None,
        emergency_contact: str = None,
        reportable_quantity: str = None,
        sub_risk_class: str = None,
        packaging_group_type: str = None,
        quantity: str = None,
        uom: str = None,
        packaging_instruction_code: str = None,
        proper_shipping_name: str = None,
        technical_name: str = None,
        additional_description: str = None,
        packaging_type: str = None,
        hazard_label_required: str = None,
        packaging_type_quantity: str = None,
        commodity_regulated_level_code: str = None,
        transport_category: str = None,
        tunnel_restriction_code: str = None,
    ):
        if chemical_record_identifier is not None:
            self.chemical_record_identifier = chemical_record_identifier
        if class_division_number is not None:
            self.class_division_number = class_division_number
        if id_number is not None:
            self.id_number = id_number
        self.transportation_mode = transportation_mode
        self.regulation_set = regulation_set
        if emergency_phone is not None:
            self.emergency_phone = emergency_phone
        if emergency_contact is not None:
            self.emergency_contact = emergency_contact
        if reportable_quantity is not None:
            self.reportable_quantity = reportable_quantity
        if sub_risk_class is not None:
            self.sub_risk_class = sub_risk_class
        if packaging_group_type is not None:
            self.packaging_group_type = packaging_group_type
        if quantity is not None:
            self.quantity = quantity
        if uom is not None:
            self.uom = uom
        if packaging_instruction_code is not None:
            self.packaging_instruction_code = packaging_instruction_code
        if proper_shipping_name is not None:
            self.proper_shipping_name = proper_shipping_name
        if technical_name is not None:
            self.technical_name = technical_name
        if additional_description is not None:
            self.additional_description = additional_description
        if packaging_type is not None:
            self.packaging_type = packaging_type
        if hazard_label_required is not None:
            self.hazard_label_required = hazard_label_required
        if packaging_type_quantity is not None:
            self.packaging_type_quantity = packaging_type_quantity
        if commodity_regulated_level_code is not None:
            self.commodity_regulated_level_code = commodity_regulated_level_code
        if transport_category is not None:
            self.transport_category = transport_category
        if tunnel_restriction_code is not None:
            self.tunnel_restriction_code = tunnel_restriction_code
