# coding: utf-8

"""
    Xero Accounting API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    Contact: api@xero.com
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401

from xero_python.models import BaseModel


class LineItemItem(BaseModel):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {"code": "str", "name": "str", "item_id": "str"}

    attribute_map = {"code": "Code", "name": "Name", "item_id": "ItemID"}

    def __init__(self, code=None, name=None, item_id=None):  # noqa: E501
        """LineItemItem - a model defined in OpenAPI"""  # noqa: E501

        self._code = None
        self._name = None
        self._item_id = None
        self.discriminator = None

        if code is not None:
            self.code = code
        if name is not None:
            self.name = name
        if item_id is not None:
            self.item_id = item_id

    @property
    def code(self):
        """Gets the code of this LineItemItem.  # noqa: E501

        User defined item code (max length = 30)  # noqa: E501

        :return: The code of this LineItemItem.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this LineItemItem.

        User defined item code (max length = 30)  # noqa: E501

        :param code: The code of this LineItemItem.  # noqa: E501
        :type: str
        """
        if code is not None and len(code) > 30:
            raise ValueError(
                "Invalid value for `code`, " "length must be less than or equal to `30`"
            )  # noqa: E501

        self._code = code

    @property
    def name(self):
        """Gets the name of this LineItemItem.  # noqa: E501

        The name of the item (max length = 50)  # noqa: E501

        :return: The name of this LineItemItem.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this LineItemItem.

        The name of the item (max length = 50)  # noqa: E501

        :param name: The name of this LineItemItem.  # noqa: E501
        :type: str
        """
        if name is not None and len(name) > 50:
            raise ValueError(
                "Invalid value for `name`, " "length must be less than or equal to `50`"
            )  # noqa: E501

        self._name = name

    @property
    def item_id(self):
        """Gets the item_id of this LineItemItem.  # noqa: E501

        The Xero identifier for an Item  # noqa: E501

        :return: The item_id of this LineItemItem.  # noqa: E501
        :rtype: str
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id):
        """Sets the item_id of this LineItemItem.

        The Xero identifier for an Item  # noqa: E501

        :param item_id: The item_id of this LineItemItem.  # noqa: E501
        :type: str
        """

        self._item_id = item_id
