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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .alternate_delivery_address_address import AlternateDeliveryAddressAddress


@JsonMap({"name": "Name", "address": "Address"})
class ShipmentAlternateDeliveryAddress(BaseModel):
    """Alternate Delivery Address container. Applies for deliveries to UPS Access Point™ locations.

    Required for the following ShipmentIndicationType values:
    - 01 - Hold for Pickup at UPS Access Point™
    - 02 - UPS Access Point™ Delivery


    :param name: UPS Access Point location name., defaults to None
    :type name: str, optional
    :param address: Address container for Alternate Delivery Address.
    :type address: AlternateDeliveryAddressAddress
    """

    def __init__(self, address: AlternateDeliveryAddressAddress, name: str = None):
        if name is not None:
            self.name = name
        self.address = self._define_object(address, AlternateDeliveryAddressAddress)
