# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re


class V1Item(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, name=None, description=None, type=None, color=None, abbreviation=None, visibility=None, available_online=None, master_image=None, category=None, variations=None, modifier_lists=None, fees=None, taxable=None, category_id=None, available_for_pickup=None, v2_id=None):
        """
        V1Item - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'str',
            'name': 'str',
            'description': 'str',
            'type': 'str',
            'color': 'str',
            'abbreviation': 'str',
            'visibility': 'str',
            'available_online': 'bool',
            'master_image': 'V1ItemImage',
            'category': 'V1Category',
            'variations': 'list[V1Variation]',
            'modifier_lists': 'list[V1Variation]',
            'fees': 'list[V1Fee]',
            'taxable': 'bool',
            'category_id': 'str',
            'available_for_pickup': 'bool',
            'v2_id': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'description': 'description',
            'type': 'type',
            'color': 'color',
            'abbreviation': 'abbreviation',
            'visibility': 'visibility',
            'available_online': 'available_online',
            'master_image': 'master_image',
            'category': 'category',
            'variations': 'variations',
            'modifier_lists': 'modifier_lists',
            'fees': 'fees',
            'taxable': 'taxable',
            'category_id': 'category_id',
            'available_for_pickup': 'available_for_pickup',
            'v2_id': 'v2_id'
        }

        self._id = id
        self._name = name
        self._description = description
        self._type = type
        self._color = color
        self._abbreviation = abbreviation
        self._visibility = visibility
        self._available_online = available_online
        self._master_image = master_image
        self._category = category
        self._variations = variations
        self._modifier_lists = modifier_lists
        self._fees = fees
        self._taxable = taxable
        self._category_id = category_id
        self._available_for_pickup = available_for_pickup
        self._v2_id = v2_id

    @property
    def id(self):
        """
        Gets the id of this V1Item.
        The item's ID. Must be unique among all entity IDs ever provided on behalf of the merchant. You can never reuse an ID. This value can include alphanumeric characters, dashes (-), and underscores (_).

        :return: The id of this V1Item.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this V1Item.
        The item's ID. Must be unique among all entity IDs ever provided on behalf of the merchant. You can never reuse an ID. This value can include alphanumeric characters, dashes (-), and underscores (_).

        :param id: The id of this V1Item.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this V1Item.
        The item's name.

        :return: The name of this V1Item.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this V1Item.
        The item's name.

        :param name: The name of this V1Item.
        :type: str
        """

        self._name = name

    @property
    def description(self):
        """
        Gets the description of this V1Item.
        The item's description.

        :return: The description of this V1Item.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this V1Item.
        The item's description.

        :param description: The description of this V1Item.
        :type: str
        """

        self._description = description

    @property
    def type(self):
        """
        Gets the type of this V1Item.
        The item's type. This value is NORMAL for almost all items. See [V1ItemType](#type-v1itemtype) for possible values

        :return: The type of this V1Item.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this V1Item.
        The item's type. This value is NORMAL for almost all items. See [V1ItemType](#type-v1itemtype) for possible values

        :param type: The type of this V1Item.
        :type: str
        """

        self._type = type

    @property
    def color(self):
        """
        Gets the color of this V1Item.
        The color of the discount's display label in Square Register, if not the default color. The default color is 9da2a6. See [V1ItemColor](#type-v1itemcolor) for possible values

        :return: The color of this V1Item.
        :rtype: str
        """
        return self._color

    @color.setter
    def color(self, color):
        """
        Sets the color of this V1Item.
        The color of the discount's display label in Square Register, if not the default color. The default color is 9da2a6. See [V1ItemColor](#type-v1itemcolor) for possible values

        :param color: The color of this V1Item.
        :type: str
        """

        self._color = color

    @property
    def abbreviation(self):
        """
        Gets the abbreviation of this V1Item.
        The text of the item's display label in Square Register. Only up to the first five characters of the string are used.

        :return: The abbreviation of this V1Item.
        :rtype: str
        """
        return self._abbreviation

    @abbreviation.setter
    def abbreviation(self, abbreviation):
        """
        Sets the abbreviation of this V1Item.
        The text of the item's display label in Square Register. Only up to the first five characters of the string are used.

        :param abbreviation: The abbreviation of this V1Item.
        :type: str
        """

        self._abbreviation = abbreviation

    @property
    def visibility(self):
        """
        Gets the visibility of this V1Item.
        Indicates whether the item is viewable from the merchant's online store (PUBLIC) or PRIVATE. See [V1ItemVisibility](#type-v1itemvisibility) for possible values

        :return: The visibility of this V1Item.
        :rtype: str
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """
        Sets the visibility of this V1Item.
        Indicates whether the item is viewable from the merchant's online store (PUBLIC) or PRIVATE. See [V1ItemVisibility](#type-v1itemvisibility) for possible values

        :param visibility: The visibility of this V1Item.
        :type: str
        """

        self._visibility = visibility

    @property
    def available_online(self):
        """
        Gets the available_online of this V1Item.
        If true, the item can be added to shipping orders from the merchant's online store.

        :return: The available_online of this V1Item.
        :rtype: bool
        """
        return self._available_online

    @available_online.setter
    def available_online(self, available_online):
        """
        Sets the available_online of this V1Item.
        If true, the item can be added to shipping orders from the merchant's online store.

        :param available_online: The available_online of this V1Item.
        :type: bool
        """

        self._available_online = available_online

    @property
    def master_image(self):
        """
        Gets the master_image of this V1Item.
        The item's master image, if any.

        :return: The master_image of this V1Item.
        :rtype: V1ItemImage
        """
        return self._master_image

    @master_image.setter
    def master_image(self, master_image):
        """
        Sets the master_image of this V1Item.
        The item's master image, if any.

        :param master_image: The master_image of this V1Item.
        :type: V1ItemImage
        """

        self._master_image = master_image

    @property
    def category(self):
        """
        Gets the category of this V1Item.
        The category the item belongs to, if any.

        :return: The category of this V1Item.
        :rtype: V1Category
        """
        return self._category

    @category.setter
    def category(self, category):
        """
        Sets the category of this V1Item.
        The category the item belongs to, if any.

        :param category: The category of this V1Item.
        :type: V1Category
        """

        self._category = category

    @property
    def variations(self):
        """
        Gets the variations of this V1Item.
        The item's variations. You must specify at least one variation.

        :return: The variations of this V1Item.
        :rtype: list[V1Variation]
        """
        return self._variations

    @variations.setter
    def variations(self, variations):
        """
        Sets the variations of this V1Item.
        The item's variations. You must specify at least one variation.

        :param variations: The variations of this V1Item.
        :type: list[V1Variation]
        """

        self._variations = variations

    @property
    def modifier_lists(self):
        """
        Gets the modifier_lists of this V1Item.
        The modifier lists that apply to the item, if any.

        :return: The modifier_lists of this V1Item.
        :rtype: list[V1Variation]
        """
        return self._modifier_lists

    @modifier_lists.setter
    def modifier_lists(self, modifier_lists):
        """
        Sets the modifier_lists of this V1Item.
        The modifier lists that apply to the item, if any.

        :param modifier_lists: The modifier_lists of this V1Item.
        :type: list[V1Variation]
        """

        self._modifier_lists = modifier_lists

    @property
    def fees(self):
        """
        Gets the fees of this V1Item.
        The fees that apply to the item, if any.

        :return: The fees of this V1Item.
        :rtype: list[V1Fee]
        """
        return self._fees

    @fees.setter
    def fees(self, fees):
        """
        Sets the fees of this V1Item.
        The fees that apply to the item, if any.

        :param fees: The fees of this V1Item.
        :type: list[V1Fee]
        """

        self._fees = fees

    @property
    def taxable(self):
        """
        Gets the taxable of this V1Item.
        Deprecated. This field is not used.

        :return: The taxable of this V1Item.
        :rtype: bool
        """
        return self._taxable

    @taxable.setter
    def taxable(self, taxable):
        """
        Sets the taxable of this V1Item.
        Deprecated. This field is not used.

        :param taxable: The taxable of this V1Item.
        :type: bool
        """

        self._taxable = taxable

    @property
    def category_id(self):
        """
        Gets the category_id of this V1Item.
        The ID of the item's category, if any.

        :return: The category_id of this V1Item.
        :rtype: str
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """
        Sets the category_id of this V1Item.
        The ID of the item's category, if any.

        :param category_id: The category_id of this V1Item.
        :type: str
        """

        self._category_id = category_id

    @property
    def available_for_pickup(self):
        """
        Gets the available_for_pickup of this V1Item.
        If true, the item can be added to pickup orders from the merchant's online store. Default value: false

        :return: The available_for_pickup of this V1Item.
        :rtype: bool
        """
        return self._available_for_pickup

    @available_for_pickup.setter
    def available_for_pickup(self, available_for_pickup):
        """
        Sets the available_for_pickup of this V1Item.
        If true, the item can be added to pickup orders from the merchant's online store. Default value: false

        :param available_for_pickup: The available_for_pickup of this V1Item.
        :type: bool
        """

        self._available_for_pickup = available_for_pickup

    @property
    def v2_id(self):
        """
        Gets the v2_id of this V1Item.
        The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.

        :return: The v2_id of this V1Item.
        :rtype: str
        """
        return self._v2_id

    @v2_id.setter
    def v2_id(self, v2_id):
        """
        Sets the v2_id of this V1Item.
        The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.

        :param v2_id: The v2_id of this V1Item.
        :type: str
        """

        self._v2_id = v2_id

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
