# 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 InventoryTransfer(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, reference_id=None, state=None, from_location_id=None, to_location_id=None, catalog_object_id=None, catalog_object_type=None, quantity=None, occurred_at=None, created_at=None, source=None, employee_id=None):
        """
        InventoryTransfer - 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',
            'reference_id': 'str',
            'state': 'str',
            'from_location_id': 'str',
            'to_location_id': 'str',
            'catalog_object_id': 'str',
            'catalog_object_type': 'str',
            'quantity': 'str',
            'occurred_at': 'str',
            'created_at': 'str',
            'source': 'SourceApplication',
            'employee_id': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'reference_id': 'reference_id',
            'state': 'state',
            'from_location_id': 'from_location_id',
            'to_location_id': 'to_location_id',
            'catalog_object_id': 'catalog_object_id',
            'catalog_object_type': 'catalog_object_type',
            'quantity': 'quantity',
            'occurred_at': 'occurred_at',
            'created_at': 'created_at',
            'source': 'source',
            'employee_id': 'employee_id'
        }

        self._id = id
        self._reference_id = reference_id
        self._state = state
        self._from_location_id = from_location_id
        self._to_location_id = to_location_id
        self._catalog_object_id = catalog_object_id
        self._catalog_object_type = catalog_object_type
        self._quantity = quantity
        self._occurred_at = occurred_at
        self._created_at = created_at
        self._source = source
        self._employee_id = employee_id

    @property
    def id(self):
        """
        Gets the id of this InventoryTransfer.
        A unique ID generated by Square for the [InventoryTransfer](#type-inventorytransfer).

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this InventoryTransfer.
        A unique ID generated by Square for the [InventoryTransfer](#type-inventorytransfer).

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

        self._id = id

    @property
    def reference_id(self):
        """
        Gets the reference_id of this InventoryTransfer.
        An optional ID provided by the application to tie the [InventoryTransfer](#type-inventorytransfer) to an external system.

        :return: The reference_id of this InventoryTransfer.
        :rtype: str
        """
        return self._reference_id

    @reference_id.setter
    def reference_id(self, reference_id):
        """
        Sets the reference_id of this InventoryTransfer.
        An optional ID provided by the application to tie the [InventoryTransfer](#type-inventorytransfer) to an external system.

        :param reference_id: The reference_id of this InventoryTransfer.
        :type: str
        """

        self._reference_id = reference_id

    @property
    def state(self):
        """
        Gets the state of this InventoryTransfer.
        The [InventoryState](#type-inventorystate) for the quantity of items being transfered.

        :return: The state of this InventoryTransfer.
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """
        Sets the state of this InventoryTransfer.
        The [InventoryState](#type-inventorystate) for the quantity of items being transfered.

        :param state: The state of this InventoryTransfer.
        :type: str
        """

        self._state = state

    @property
    def from_location_id(self):
        """
        Gets the from_location_id of this InventoryTransfer.
        The Square ID of the [Location](#type-location) where the related quantity of items were tracked before the transfer.

        :return: The from_location_id of this InventoryTransfer.
        :rtype: str
        """
        return self._from_location_id

    @from_location_id.setter
    def from_location_id(self, from_location_id):
        """
        Sets the from_location_id of this InventoryTransfer.
        The Square ID of the [Location](#type-location) where the related quantity of items were tracked before the transfer.

        :param from_location_id: The from_location_id of this InventoryTransfer.
        :type: str
        """

        self._from_location_id = from_location_id

    @property
    def to_location_id(self):
        """
        Gets the to_location_id of this InventoryTransfer.
        The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer.

        :return: The to_location_id of this InventoryTransfer.
        :rtype: str
        """
        return self._to_location_id

    @to_location_id.setter
    def to_location_id(self, to_location_id):
        """
        Sets the to_location_id of this InventoryTransfer.
        The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer.

        :param to_location_id: The to_location_id of this InventoryTransfer.
        :type: str
        """

        self._to_location_id = to_location_id

    @property
    def catalog_object_id(self):
        """
        Gets the catalog_object_id of this InventoryTransfer.
        The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked.

        :return: The catalog_object_id of this InventoryTransfer.
        :rtype: str
        """
        return self._catalog_object_id

    @catalog_object_id.setter
    def catalog_object_id(self, catalog_object_id):
        """
        Sets the catalog_object_id of this InventoryTransfer.
        The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked.

        :param catalog_object_id: The catalog_object_id of this InventoryTransfer.
        :type: str
        """

        self._catalog_object_id = catalog_object_id

    @property
    def catalog_object_type(self):
        """
        Gets the catalog_object_type of this InventoryTransfer.
        The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type.

        :return: The catalog_object_type of this InventoryTransfer.
        :rtype: str
        """
        return self._catalog_object_type

    @catalog_object_type.setter
    def catalog_object_type(self, catalog_object_type):
        """
        Sets the catalog_object_type of this InventoryTransfer.
        The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type.

        :param catalog_object_type: The catalog_object_type of this InventoryTransfer.
        :type: str
        """

        self._catalog_object_type = catalog_object_type

    @property
    def quantity(self):
        """
        Gets the quantity of this InventoryTransfer.
        The number of items affected by the transfer as a decimal string. Fractional quantities are not supported.

        :return: The quantity of this InventoryTransfer.
        :rtype: str
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """
        Sets the quantity of this InventoryTransfer.
        The number of items affected by the transfer as a decimal string. Fractional quantities are not supported.

        :param quantity: The quantity of this InventoryTransfer.
        :type: str
        """

        self._quantity = quantity

    @property
    def occurred_at(self):
        """
        Gets the occurred_at of this InventoryTransfer.
        A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request.

        :return: The occurred_at of this InventoryTransfer.
        :rtype: str
        """
        return self._occurred_at

    @occurred_at.setter
    def occurred_at(self, occurred_at):
        """
        Sets the occurred_at of this InventoryTransfer.
        A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request.

        :param occurred_at: The occurred_at of this InventoryTransfer.
        :type: str
        """

        self._occurred_at = occurred_at

    @property
    def created_at(self):
        """
        Gets the created_at of this InventoryTransfer.
        A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request.

        :return: The created_at of this InventoryTransfer.
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this InventoryTransfer.
        A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request.

        :param created_at: The created_at of this InventoryTransfer.
        :type: str
        """

        self._created_at = created_at

    @property
    def source(self):
        """
        Gets the source of this InventoryTransfer.
        Read-only information about the application that initiated the inventory transfer.

        :return: The source of this InventoryTransfer.
        :rtype: SourceApplication
        """
        return self._source

    @source.setter
    def source(self, source):
        """
        Sets the source of this InventoryTransfer.
        Read-only information about the application that initiated the inventory transfer.

        :param source: The source of this InventoryTransfer.
        :type: SourceApplication
        """

        self._source = source

    @property
    def employee_id(self):
        """
        Gets the employee_id of this InventoryTransfer.
        The Square ID of the [Employee](#type-employee) responsible for the inventory transfer.

        :return: The employee_id of this InventoryTransfer.
        :rtype: str
        """
        return self._employee_id

    @employee_id.setter
    def employee_id(self, employee_id):
        """
        Sets the employee_id of this InventoryTransfer.
        The Square ID of the [Employee](#type-employee) responsible for the inventory transfer.

        :param employee_id: The employee_id of this InventoryTransfer.
        :type: str
        """

        self._employee_id = employee_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
