from __future__ import annotations
from dataclasses import dataclass, field
from .assignment_version_structure import AssignmentVersionStructure
from .scheduled_stop_point_ref_structure import ScheduledStopPointRefStructure
from .transfer_constraint_type_enumeration import TransferConstraintTypeEnumeration
from .type_of_transfer_ref import TypeOfTransferRef

__NAMESPACE__ = "http://www.netex.org.uk/netex"


@dataclass(slots=True, kw_only=True)
class TransferRestrictionVersionStructure(AssignmentVersionStructure):
    class Meta:
        name = "TransferRestriction_VersionStructure"

    type_of_transfer_ref: None | TypeOfTransferRef = field(
        default=None,
        metadata={
            "name": "TypeOfTransferRef",
            "type": "Element",
            "namespace": "http://www.netex.org.uk/netex",
        }
    )
    both_ways: None | bool = field(
        default=None,
        metadata={
            "name": "BothWays",
            "type": "Element",
            "namespace": "http://www.netex.org.uk/netex",
        }
    )
    restriction_type: TransferConstraintTypeEnumeration = field(
        metadata={
            "name": "RestrictionType",
            "type": "Element",
            "namespace": "http://www.netex.org.uk/netex",
        }
    )
    from_point_ref: None | ScheduledStopPointRefStructure = field(
        default=None,
        metadata={
            "name": "FromPointRef",
            "type": "Element",
            "namespace": "http://www.netex.org.uk/netex",
        }
    )
    to_point_ref: None | ScheduledStopPointRefStructure = field(
        default=None,
        metadata={
            "name": "ToPointRef",
            "type": "Element",
            "namespace": "http://www.netex.org.uk/netex",
        }
    )