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

from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap({"prime_code": "PrimeCode", "sub_code": "SubCode"})
class CommodityNmfc(BaseModel):
    """NMFC Commodity container.  For GFP Only.

    :param prime_code: Value of NMFC Prime. Contact your service representative if you need information concerning NMFC Codes.  Required if NMFC Container is present. For GFP Only.
    :type prime_code: str
    :param sub_code: Value of NMFC Sub. Contact your service representative if you need information concerning NMFC Codes.  Needs to be provided when the SubCode associated with the PrimeCode is other than 00. API defaults the sub value to 00 if not provided. If provided the Sub Code should be associated with the PrimeCode of the NMFC., defaults to None
    :type sub_code: str, optional
    """

    def __init__(self, prime_code: str, sub_code: str = None):
        self.prime_code = prime_code
        if sub_code is not None:
            self.sub_code = sub_code
