from typing import (
    Any,
    List,
    Optional,
)


class ItemGoals(object):
    def __init__(
        self,
        name,                           # type: unicode
        part_codes,                     # type: List
        part_codes_set,                 # type: List
        quantity_goal,                  # type: int
        quantity_operator_goal,         # type: int
        quantity_sold,                  # type: int
        total_goal_percentage=None,     # type: Optional[float]
        part_code_set_percentage=None,  # type: Optional[float]
    ):
        # type: (...) -> None

        self.name = name
        self.part_codes = part_codes
        self.part_codes_set = part_codes_set
        self.quantity_goal = quantity_goal
        self.quantity_operator_goal = quantity_operator_goal
        self.quantity_sold = quantity_sold
        self.total_goal_percentage = total_goal_percentage
        self.part_code_set_percentage = part_code_set_percentage

    def __getitem__(
        self,
        key,    # type: str
    ):
        # type: (...) -> Any

        return self.__getattribute__(key)
