from dataclasses import dataclass, field
from typing import Optional

from generated.ubl.common.ubl_common_aggregate_components_2_1 import (
    CarrierParty,
    ConsignorParty,
    DocumentDistribution,
    DocumentReference,
    ExchangeRate,
    FreightForwarderParty,
    Shipment,
    Signature,
)
from generated.ubl.common.ubl_common_basic_components_2_1 import (
    AdValoremIndicator,
    CarrierAssignedId,
    CustomizationId,
    DeclaredCarriageValueAmount,
    Description,
    DocumentStatusCode,
    Id,
    IssueDate,
    IssueTime,
    Name,
    Note,
    OtherInstruction,
    ProfileExecutionId,
    ProfileId,
    ShippingOrderId,
    ToOrderIndicator,
    UblversionId,
    Uuid,
)
from generated.ubl.common.ubl_common_extension_components_2_1 import (
    Ublextensions,
)

__NAMESPACE__ = "urn:oasis:names:specification:ubl:schema:xsd:BillOfLading-2"


@dataclass
class BillOfLadingType:
    """<ns1:Component xmlns:ns1="urn:un:unece:uncefact:documentation:2">
    <ns1:ComponentType>ABIE</ns1:ComponentType> <ns1:DictionaryEntryName>Bill Of
    Lading.

    Details</ns1:DictionaryEntryName> <ns1:Definition>A document issued
    by the party who acts as an agent for a transportation carrier or
    other agents to the party who gives instructions for the
    transportation services (shipper, consignor, etc.) stating the
    details of the transportation, charges, and terms and conditions
    under which the transportation service is provided. The party
    issuing this document does not necessarily provide the physical
    transportation service. The information in the Bill of Lading
    corresponds to the information on the Forwarding Instructions. It is
    used for any mode of transport. A Bill of Lading can serve as a
    contractual document between the parties for the transportation
    service. The document evidences a contract of carriage by sea and
    the acceptance of responsibility for the goods by the carrier, by
    which the carrier undertakes to deliver the goods against surrender
    of the document. A provision in the document that the goods are to
    be delivered to the order of a named person, or to order, or to
    bearer, constitutes such an undertaking.</ns1:Definition>
    <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
    <ns1:AlternativeBusinessTerms>House Bill of Landing, Master Bill,
    Bill</ns1:AlternativeBusinessTerms> </ns1:Component>

    :ivar ublextensions: A container for all extensions present in the
        document.
    :ivar ublversion_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. UBL Version Identifier.
        Identifier</ns1:DictionaryEntryName> <ns1:Definition>Identifies
        the earliest version of the UBL 2 schema for this document type
        that defines all of the elements that might be encountered in
        the current instance.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>UBL Version
        Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:Examples>2.0.5</ns1:Examples> </ns1:Component>
    :ivar customization_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Customization
        Identifier. Identifier</ns1:DictionaryEntryName>
        <ns1:Definition>Identifies a user-defined customization of UBL
        for a specific use.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Customization
        Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:Examples>NES</ns1:Examples> </ns1:Component>
    :ivar profile_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Profile Identifier.
        Identifier</ns1:DictionaryEntryName> <ns1:Definition>Identifies
        a user-defined profile of the customization of UBL being
        used.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Profile Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:Examples>BasicProcurementProcess</ns1:Examples>
        </ns1:Component>
    :ivar profile_execution_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Profile Execution
        Identifier. Identifier</ns1:DictionaryEntryName>
        <ns1:Definition>Identifies an instance of executing a profile,
        to associate all transactions in a
        collaboration.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Profile Execution
        Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:Examples>BPP-1001</ns1:Examples> </ns1:Component>
    :ivar id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading.
        Identifier</ns1:DictionaryEntryName> <ns1:Definition>An
        identifier for this document, assigned by the
        sender.</ns1:Definition> <ns1:Cardinality>1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Bill of Lading
        Number</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar carrier_assigned_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Carrier Assigned_
        Identifier. Identifier</ns1:DictionaryEntryName>
        <ns1:Definition>Reference number (such as a booking reference
        number) assigned by a carrier or its agent to identify a
        specific shipment when cargo space is reserved prior to
        loading.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTermQualifier>Carrier
        Assigned</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Booking Reference
        Number</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar uuid: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. UUID.
        Identifier</ns1:DictionaryEntryName> <ns1:Definition>A
        universally unique identifier for an instance of this
        document.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>UUID</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType> </ns1:Component>
    :ivar issue_date: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Issue Date.
        Date</ns1:DictionaryEntryName> <ns1:Definition>The date,
        assigned by the sender, on which this document was
        issued.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Issue Date</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Date</ns1:RepresentationTerm>
        <ns1:DataType>Date. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Transport Document
        Date</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar issue_time: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Issue Time.
        Time</ns1:DictionaryEntryName> <ns1:Definition>The time,
        assigned by the sender, at which this document was
        issued.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Issue Time</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Time</ns1:RepresentationTerm>
        <ns1:DataType>Time. Type</ns1:DataType> </ns1:Component>
    :ivar name: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading.
        Name</ns1:DictionaryEntryName> <ns1:Definition>Text, assigned by
        the sender, that identifies this document to business
        users.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Name</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Name</ns1:RepresentationTerm>
        <ns1:DataType>Name. Type</ns1:DataType> <ns1:Examples>House Bill
        , Consolidated Bill of Lading , Proforma , Sea Waybill
        </ns1:Examples> </ns1:Component>
    :ivar description: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Description.
        Text</ns1:DictionaryEntryName> <ns1:Definition>Textual
        description of the document instance.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Description</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Text</ns1:RepresentationTerm>
        <ns1:DataType>Text. Type</ns1:DataType> </ns1:Component>
    :ivar note: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Note.
        Text</ns1:DictionaryEntryName> <ns1:Definition>Free-form text
        pertinent to this document, conveying information that is not
        contained explicitly in other structures.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Note</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Text</ns1:RepresentationTerm>
        <ns1:DataType>Text. Type</ns1:DataType> </ns1:Component>
    :ivar document_status_code: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Document Status Code.
        Code</ns1:DictionaryEntryName> <ns1:Definition>A code signifying
        the status of the Bill Of Lading (revision, replacement,
        etc.).</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Document Status Code</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Code</ns1:RepresentationTerm>
        <ns1:DataTypeQualifier>Document Status</ns1:DataTypeQualifier>
        <ns1:DataType>Document Status_ Code. Type</ns1:DataType>
        </ns1:Component>
    :ivar shipping_order_id: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Shipping Order
        Identifier. Identifier</ns1:DictionaryEntryName>
        <ns1:Definition>Reference number to identify a Shipping Order or
        Forwarding Instruction.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Shipping Order
        Identifier</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Identifier</ns1:RepresentationTerm>
        <ns1:DataType>Identifier. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Freight forwarding instruction,
        Shippers letter of instruction</ns1:AlternativeBusinessTerms>
        </ns1:Component>
    :ivar to_order_indicator: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. To Order_ Indicator.
        Indicator</ns1:DictionaryEntryName> <ns1:Definition>Indicates
        whether the transport document is consigned to
        order.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTermQualifier>To Order</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Indicator</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Indicator</ns1:RepresentationTerm>
        <ns1:DataType>Indicator. Type</ns1:DataType> </ns1:Component>
    :ivar ad_valorem_indicator: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Ad Valorem_ Indicator.
        Indicator</ns1:DictionaryEntryName> <ns1:Definition>A term used
        in commerce in reference to certain duties, called ad valorem
        duties, which are levied on commodities at certain rates per
        centum on their value.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTermQualifier>Ad
        Valorem</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Indicator</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Indicator</ns1:RepresentationTerm>
        <ns1:DataType>Indicator. Type</ns1:DataType> </ns1:Component>
    :ivar declared_carriage_value_amount: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Declared Carriage_
        Value. Amount</ns1:DictionaryEntryName> <ns1:Definition>Value
        declared by the shipper or his agent solely for the purpose of
        varying the carrier's level of liability from that provided in
        the contract of carriage in case of loss or damage to goods or
        delayed delivery.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTermQualifier>Declared
        Carriage</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Value</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Amount</ns1:RepresentationTerm>
        <ns1:DataType>Amount. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Interest in
        Delivery</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar other_instruction: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>BBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Other_ Instruction.
        Text</ns1:DictionaryEntryName> <ns1:Definition>Other free-text
        instructions to the forwarders or carriers related to the
        shipment. This element should only be used where such
        information cannot be represented in other structured
        information entities within the document.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTermQualifier>Other</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Instruction</ns1:PropertyTerm>
        <ns1:RepresentationTerm>Text</ns1:RepresentationTerm>
        <ns1:DataType>Text. Type</ns1:DataType>
        <ns1:AlternativeBusinessTerms>Bill of Lading
        Remark</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar consignor_party: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Consignor_ Party.
        Party</ns1:DictionaryEntryName> <ns1:Definition>The party
        consigning goods as stipulated in the transport contract by the
        party ordering transport.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTermQualifier>Consignor</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Party</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Party</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Party</ns1:RepresentationTerm>
        <ns1:AlternativeBusinessTerms>Consignor (WCO ID 71 and
        72)</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar carrier_party: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Carrier_ Party.
        Party</ns1:DictionaryEntryName> <ns1:Definition>The party
        providing the transport of goods between named
        points.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTermQualifier>Carrier</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Party</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Party</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Party</ns1:RepresentationTerm>
        <ns1:AlternativeBusinessTerms>Transport Company, Shipping Line,
        NVOCC, Airline, Haulier, Courier, Carrier (WCO ID 49 and
        50)</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar freight_forwarder_party: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Freight Forwarder_
        Party. Party</ns1:DictionaryEntryName> <ns1:Definition>A party
        combining individual smaller consignments into a single larger
        shipment (a so-called consolidated consignment or shipment) that
        is sent to a counterpart who mirrors the consolidator's activity
        by dividing the consolidated consignment into its original
        components.</ns1:Definition>
        <ns1:Cardinality>0..1</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTermQualifier>Freight
        Forwarder</ns1:PropertyTermQualifier>
        <ns1:PropertyTerm>Party</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Party</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Party</ns1:RepresentationTerm>
        <ns1:AlternativeBusinessTerms>Consolidator (WCO ID 192 AND
        193)</ns1:AlternativeBusinessTerms> </ns1:Component>
    :ivar shipment: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading.
        Shipment</ns1:DictionaryEntryName> <ns1:Definition>An
        identifiable collection of one or more goods items to be
        transported between the seller party and the buyer
        party.</ns1:Definition> <ns1:Cardinality>0..1</ns1:Cardinality>
        <ns1:ObjectClass>Bill Of Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Shipment</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Shipment</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Shipment</ns1:RepresentationTerm>
        </ns1:Component>
    :ivar document_reference: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Document
        Reference</ns1:DictionaryEntryName> <ns1:Definition>A reference
        to another document associated with this
        document.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Document
        Reference</ns1:PropertyTerm> <ns1:AssociatedObjectClass>Document
        Reference</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Document
        Reference</ns1:RepresentationTerm> </ns1:Component>
    :ivar exchange_rate: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Exchange
        Rate</ns1:DictionaryEntryName> <ns1:Definition>Information that
        directly relates to the rate of exchange (conversion) between
        two currencies.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Exchange
        Rate</ns1:PropertyTerm> <ns1:AssociatedObjectClass>Exchange
        Rate</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Exchange Rate</ns1:RepresentationTerm>
        </ns1:Component>
    :ivar document_distribution: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading. Document
        Distribution</ns1:DictionaryEntryName> <ns1:Definition>A list of
        interested parties to whom this document is
        distributed.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass> <ns1:PropertyTerm>Document
        Distribution</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Document
        Distribution</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Document
        Distribution</ns1:RepresentationTerm> </ns1:Component>
    :ivar signature: <ns1:Component
        xmlns:ns1="urn:un:unece:uncefact:documentation:2">
        <ns1:ComponentType>ASBIE</ns1:ComponentType>
        <ns1:DictionaryEntryName>Bill Of Lading.
        Signature</ns1:DictionaryEntryName> <ns1:Definition>A signature
        applied to this document.</ns1:Definition>
        <ns1:Cardinality>0..n</ns1:Cardinality> <ns1:ObjectClass>Bill Of
        Lading</ns1:ObjectClass>
        <ns1:PropertyTerm>Signature</ns1:PropertyTerm>
        <ns1:AssociatedObjectClass>Signature</ns1:AssociatedObjectClass>
        <ns1:RepresentationTerm>Signature</ns1:RepresentationTerm>
        </ns1:Component>
    """

    ublextensions: Optional[Ublextensions] = field(
        default=None,
        metadata={
            "name": "UBLExtensions",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2",
        },
    )
    ublversion_id: Optional[UblversionId] = field(
        default=None,
        metadata={
            "name": "UBLVersionID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    customization_id: Optional[CustomizationId] = field(
        default=None,
        metadata={
            "name": "CustomizationID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    profile_id: Optional[ProfileId] = field(
        default=None,
        metadata={
            "name": "ProfileID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    profile_execution_id: Optional[ProfileExecutionId] = field(
        default=None,
        metadata={
            "name": "ProfileExecutionID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    id: Optional[Id] = field(
        default=None,
        metadata={
            "name": "ID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
            "required": True,
        },
    )
    carrier_assigned_id: Optional[CarrierAssignedId] = field(
        default=None,
        metadata={
            "name": "CarrierAssignedID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    uuid: Optional[Uuid] = field(
        default=None,
        metadata={
            "name": "UUID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    issue_date: Optional[IssueDate] = field(
        default=None,
        metadata={
            "name": "IssueDate",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    issue_time: Optional[IssueTime] = field(
        default=None,
        metadata={
            "name": "IssueTime",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    name: Optional[Name] = field(
        default=None,
        metadata={
            "name": "Name",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    description: list[Description] = field(
        default_factory=list,
        metadata={
            "name": "Description",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    note: list[Note] = field(
        default_factory=list,
        metadata={
            "name": "Note",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    document_status_code: Optional[DocumentStatusCode] = field(
        default=None,
        metadata={
            "name": "DocumentStatusCode",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    shipping_order_id: Optional[ShippingOrderId] = field(
        default=None,
        metadata={
            "name": "ShippingOrderID",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    to_order_indicator: Optional[ToOrderIndicator] = field(
        default=None,
        metadata={
            "name": "ToOrderIndicator",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    ad_valorem_indicator: Optional[AdValoremIndicator] = field(
        default=None,
        metadata={
            "name": "AdValoremIndicator",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    declared_carriage_value_amount: Optional[DeclaredCarriageValueAmount] = (
        field(
            default=None,
            metadata={
                "name": "DeclaredCarriageValueAmount",
                "type": "Element",
                "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
            },
        )
    )
    other_instruction: list[OtherInstruction] = field(
        default_factory=list,
        metadata={
            "name": "OtherInstruction",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
        },
    )
    consignor_party: Optional[ConsignorParty] = field(
        default=None,
        metadata={
            "name": "ConsignorParty",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    carrier_party: Optional[CarrierParty] = field(
        default=None,
        metadata={
            "name": "CarrierParty",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    freight_forwarder_party: Optional[FreightForwarderParty] = field(
        default=None,
        metadata={
            "name": "FreightForwarderParty",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    shipment: Optional[Shipment] = field(
        default=None,
        metadata={
            "name": "Shipment",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    document_reference: list[DocumentReference] = field(
        default_factory=list,
        metadata={
            "name": "DocumentReference",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    exchange_rate: list[ExchangeRate] = field(
        default_factory=list,
        metadata={
            "name": "ExchangeRate",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    document_distribution: list[DocumentDistribution] = field(
        default_factory=list,
        metadata={
            "name": "DocumentDistribution",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )
    signature: list[Signature] = field(
        default_factory=list,
        metadata={
            "name": "Signature",
            "type": "Element",
            "namespace": "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2",
        },
    )


@dataclass
class BillOfLading(BillOfLadingType):
    """
    This element MUST be conveyed as the root element in any instance document
    based on this Schema expression.
    """

    class Meta:
        namespace = (
            "urn:oasis:names:specification:ubl:schema:xsd:BillOfLading-2"
        )
