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

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .element_level_information_element_identifier import (
    ElementLevelInformationElementIdentifier,
)


@JsonMap({"level": "Level", "element_identifier": "ElementIdentifier"})
class AlertDetailElementLevelInformation(BaseModel):
    """Provides more information about the element that represents the alert.

    :param level: Define type of element in request. Possible values are - - 'H' for the header details level, - 'S' for the shipment level, - 'P' for the package level, - 'C' for the commodity level.
    :type level: str
    :param element_identifier: Contains more information about the type of element. Returned if Level is 'P' or 'C'. **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1. , defaults to None
    :type element_identifier: List[ElementLevelInformationElementIdentifier], optional
    """

    def __init__(
        self,
        level: str,
        element_identifier: List[ElementLevelInformationElementIdentifier] = None,
    ):
        self.level = level
        if element_identifier is not None:
            self.element_identifier = self._define_list(
                element_identifier, ElementLevelInformationElementIdentifier
            )
