# 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 BatchChangeInventoryRequest(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, idempotency_key=None, changes=None, ignore_unchanged_counts=None):
        """
        BatchChangeInventoryRequest - 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 = {
            'idempotency_key': 'str',
            'changes': 'list[InventoryChange]',
            'ignore_unchanged_counts': 'bool'
        }

        self.attribute_map = {
            'idempotency_key': 'idempotency_key',
            'changes': 'changes',
            'ignore_unchanged_counts': 'ignore_unchanged_counts'
        }

        self._idempotency_key = idempotency_key
        self._changes = changes
        self._ignore_unchanged_counts = ignore_unchanged_counts

    @property
    def idempotency_key(self):
        """
        Gets the idempotency_key of this BatchChangeInventoryRequest.
        A client-supplied, universally unique identifier (UUID) for the request.  See [Idempotency](/basics/api101/idempotency) in the [API Development 101](/basics/api101/overview) section for more information.

        :return: The idempotency_key of this BatchChangeInventoryRequest.
        :rtype: str
        """
        return self._idempotency_key

    @idempotency_key.setter
    def idempotency_key(self, idempotency_key):
        """
        Sets the idempotency_key of this BatchChangeInventoryRequest.
        A client-supplied, universally unique identifier (UUID) for the request.  See [Idempotency](/basics/api101/idempotency) in the [API Development 101](/basics/api101/overview) section for more information.

        :param idempotency_key: The idempotency_key of this BatchChangeInventoryRequest.
        :type: str
        """

        self._idempotency_key = idempotency_key

    @property
    def changes(self):
        """
        Gets the changes of this BatchChangeInventoryRequest.
        The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order. Max size is 100 changes.

        :return: The changes of this BatchChangeInventoryRequest.
        :rtype: list[InventoryChange]
        """
        return self._changes

    @changes.setter
    def changes(self, changes):
        """
        Sets the changes of this BatchChangeInventoryRequest.
        The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order. Max size is 100 changes.

        :param changes: The changes of this BatchChangeInventoryRequest.
        :type: list[InventoryChange]
        """

        self._changes = changes

    @property
    def ignore_unchanged_counts(self):
        """
        Gets the ignore_unchanged_counts of this BatchChangeInventoryRequest.
        Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`.

        :return: The ignore_unchanged_counts of this BatchChangeInventoryRequest.
        :rtype: bool
        """
        return self._ignore_unchanged_counts

    @ignore_unchanged_counts.setter
    def ignore_unchanged_counts(self, ignore_unchanged_counts):
        """
        Sets the ignore_unchanged_counts of this BatchChangeInventoryRequest.
        Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`.

        :param ignore_unchanged_counts: The ignore_unchanged_counts of this BatchChangeInventoryRequest.
        :type: bool
        """

        self._ignore_unchanged_counts = ignore_unchanged_counts

    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
