# 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 V1CashDrawerShift(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, event_type=None, opened_at=None, ended_at=None, closed_at=None, employee_ids=None, opening_employee_id=None, ending_employee_id=None, closing_employee_id=None, description=None, starting_cash_money=None, cash_payment_money=None, cash_refunds_money=None, cash_paid_in_money=None, cash_paid_out_money=None, expected_cash_money=None, closed_cash_money=None, device=None, events=None):
        """
        V1CashDrawerShift - 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',
            'event_type': 'str',
            'opened_at': 'str',
            'ended_at': 'str',
            'closed_at': 'str',
            'employee_ids': 'list[str]',
            'opening_employee_id': 'str',
            'ending_employee_id': 'str',
            'closing_employee_id': 'str',
            'description': 'str',
            'starting_cash_money': 'V1Money',
            'cash_payment_money': 'V1Money',
            'cash_refunds_money': 'V1Money',
            'cash_paid_in_money': 'V1Money',
            'cash_paid_out_money': 'V1Money',
            'expected_cash_money': 'V1Money',
            'closed_cash_money': 'V1Money',
            'device': 'Device',
            'events': 'list[V1CashDrawerEvent]'
        }

        self.attribute_map = {
            'id': 'id',
            'event_type': 'event_type',
            'opened_at': 'opened_at',
            'ended_at': 'ended_at',
            'closed_at': 'closed_at',
            'employee_ids': 'employee_ids',
            'opening_employee_id': 'opening_employee_id',
            'ending_employee_id': 'ending_employee_id',
            'closing_employee_id': 'closing_employee_id',
            'description': 'description',
            'starting_cash_money': 'starting_cash_money',
            'cash_payment_money': 'cash_payment_money',
            'cash_refunds_money': 'cash_refunds_money',
            'cash_paid_in_money': 'cash_paid_in_money',
            'cash_paid_out_money': 'cash_paid_out_money',
            'expected_cash_money': 'expected_cash_money',
            'closed_cash_money': 'closed_cash_money',
            'device': 'device',
            'events': 'events'
        }

        self._id = id
        self._event_type = event_type
        self._opened_at = opened_at
        self._ended_at = ended_at
        self._closed_at = closed_at
        self._employee_ids = employee_ids
        self._opening_employee_id = opening_employee_id
        self._ending_employee_id = ending_employee_id
        self._closing_employee_id = closing_employee_id
        self._description = description
        self._starting_cash_money = starting_cash_money
        self._cash_payment_money = cash_payment_money
        self._cash_refunds_money = cash_refunds_money
        self._cash_paid_in_money = cash_paid_in_money
        self._cash_paid_out_money = cash_paid_out_money
        self._expected_cash_money = expected_cash_money
        self._closed_cash_money = closed_cash_money
        self._device = device
        self._events = events

    @property
    def id(self):
        """
        Gets the id of this V1CashDrawerShift.
        The shift's unique ID.

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this V1CashDrawerShift.
        The shift's unique ID.

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

        self._id = id

    @property
    def event_type(self):
        """
        Gets the event_type of this V1CashDrawerShift.
        The shift's current state. See [V1CashDrawerShiftEventType](#type-v1cashdrawershifteventtype) for possible values

        :return: The event_type of this V1CashDrawerShift.
        :rtype: str
        """
        return self._event_type

    @event_type.setter
    def event_type(self, event_type):
        """
        Sets the event_type of this V1CashDrawerShift.
        The shift's current state. See [V1CashDrawerShiftEventType](#type-v1cashdrawershifteventtype) for possible values

        :param event_type: The event_type of this V1CashDrawerShift.
        :type: str
        """

        self._event_type = event_type

    @property
    def opened_at(self):
        """
        Gets the opened_at of this V1CashDrawerShift.
        The time when the shift began, in ISO 8601 format.

        :return: The opened_at of this V1CashDrawerShift.
        :rtype: str
        """
        return self._opened_at

    @opened_at.setter
    def opened_at(self, opened_at):
        """
        Sets the opened_at of this V1CashDrawerShift.
        The time when the shift began, in ISO 8601 format.

        :param opened_at: The opened_at of this V1CashDrawerShift.
        :type: str
        """

        self._opened_at = opened_at

    @property
    def ended_at(self):
        """
        Gets the ended_at of this V1CashDrawerShift.
        The time when the shift ended, in ISO 8601 format.

        :return: The ended_at of this V1CashDrawerShift.
        :rtype: str
        """
        return self._ended_at

    @ended_at.setter
    def ended_at(self, ended_at):
        """
        Sets the ended_at of this V1CashDrawerShift.
        The time when the shift ended, in ISO 8601 format.

        :param ended_at: The ended_at of this V1CashDrawerShift.
        :type: str
        """

        self._ended_at = ended_at

    @property
    def closed_at(self):
        """
        Gets the closed_at of this V1CashDrawerShift.
        The time when the shift was closed, in ISO 8601 format.

        :return: The closed_at of this V1CashDrawerShift.
        :rtype: str
        """
        return self._closed_at

    @closed_at.setter
    def closed_at(self, closed_at):
        """
        Sets the closed_at of this V1CashDrawerShift.
        The time when the shift was closed, in ISO 8601 format.

        :param closed_at: The closed_at of this V1CashDrawerShift.
        :type: str
        """

        self._closed_at = closed_at

    @property
    def employee_ids(self):
        """
        Gets the employee_ids of this V1CashDrawerShift.
        The IDs of all employees that were logged into Square Register at some point during the cash drawer shift.

        :return: The employee_ids of this V1CashDrawerShift.
        :rtype: list[str]
        """
        return self._employee_ids

    @employee_ids.setter
    def employee_ids(self, employee_ids):
        """
        Sets the employee_ids of this V1CashDrawerShift.
        The IDs of all employees that were logged into Square Register at some point during the cash drawer shift.

        :param employee_ids: The employee_ids of this V1CashDrawerShift.
        :type: list[str]
        """

        self._employee_ids = employee_ids

    @property
    def opening_employee_id(self):
        """
        Gets the opening_employee_id of this V1CashDrawerShift.
        The ID of the employee that started the cash drawer shift.

        :return: The opening_employee_id of this V1CashDrawerShift.
        :rtype: str
        """
        return self._opening_employee_id

    @opening_employee_id.setter
    def opening_employee_id(self, opening_employee_id):
        """
        Sets the opening_employee_id of this V1CashDrawerShift.
        The ID of the employee that started the cash drawer shift.

        :param opening_employee_id: The opening_employee_id of this V1CashDrawerShift.
        :type: str
        """

        self._opening_employee_id = opening_employee_id

    @property
    def ending_employee_id(self):
        """
        Gets the ending_employee_id of this V1CashDrawerShift.
        The ID of the employee that ended the cash drawer shift.

        :return: The ending_employee_id of this V1CashDrawerShift.
        :rtype: str
        """
        return self._ending_employee_id

    @ending_employee_id.setter
    def ending_employee_id(self, ending_employee_id):
        """
        Sets the ending_employee_id of this V1CashDrawerShift.
        The ID of the employee that ended the cash drawer shift.

        :param ending_employee_id: The ending_employee_id of this V1CashDrawerShift.
        :type: str
        """

        self._ending_employee_id = ending_employee_id

    @property
    def closing_employee_id(self):
        """
        Gets the closing_employee_id of this V1CashDrawerShift.
        The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents.

        :return: The closing_employee_id of this V1CashDrawerShift.
        :rtype: str
        """
        return self._closing_employee_id

    @closing_employee_id.setter
    def closing_employee_id(self, closing_employee_id):
        """
        Sets the closing_employee_id of this V1CashDrawerShift.
        The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents.

        :param closing_employee_id: The closing_employee_id of this V1CashDrawerShift.
        :type: str
        """

        self._closing_employee_id = closing_employee_id

    @property
    def description(self):
        """
        Gets the description of this V1CashDrawerShift.
        The time when the timecard was created, in ISO 8601 format.

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

    @description.setter
    def description(self, description):
        """
        Sets the description of this V1CashDrawerShift.
        The time when the timecard was created, in ISO 8601 format.

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

        self._description = description

    @property
    def starting_cash_money(self):
        """
        Gets the starting_cash_money of this V1CashDrawerShift.
        The amount of money in the cash drawer at the start of the shift.

        :return: The starting_cash_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._starting_cash_money

    @starting_cash_money.setter
    def starting_cash_money(self, starting_cash_money):
        """
        Sets the starting_cash_money of this V1CashDrawerShift.
        The amount of money in the cash drawer at the start of the shift.

        :param starting_cash_money: The starting_cash_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._starting_cash_money = starting_cash_money

    @property
    def cash_payment_money(self):
        """
        Gets the cash_payment_money of this V1CashDrawerShift.
        The amount of money added to the cash drawer from cash payments.

        :return: The cash_payment_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._cash_payment_money

    @cash_payment_money.setter
    def cash_payment_money(self, cash_payment_money):
        """
        Sets the cash_payment_money of this V1CashDrawerShift.
        The amount of money added to the cash drawer from cash payments.

        :param cash_payment_money: The cash_payment_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._cash_payment_money = cash_payment_money

    @property
    def cash_refunds_money(self):
        """
        Gets the cash_refunds_money of this V1CashDrawerShift.
        The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero.

        :return: The cash_refunds_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._cash_refunds_money

    @cash_refunds_money.setter
    def cash_refunds_money(self, cash_refunds_money):
        """
        Sets the cash_refunds_money of this V1CashDrawerShift.
        The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero.

        :param cash_refunds_money: The cash_refunds_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._cash_refunds_money = cash_refunds_money

    @property
    def cash_paid_in_money(self):
        """
        Gets the cash_paid_in_money of this V1CashDrawerShift.
        The amount of money added to the cash drawer for reasons other than cash payments.

        :return: The cash_paid_in_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._cash_paid_in_money

    @cash_paid_in_money.setter
    def cash_paid_in_money(self, cash_paid_in_money):
        """
        Sets the cash_paid_in_money of this V1CashDrawerShift.
        The amount of money added to the cash drawer for reasons other than cash payments.

        :param cash_paid_in_money: The cash_paid_in_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._cash_paid_in_money = cash_paid_in_money

    @property
    def cash_paid_out_money(self):
        """
        Gets the cash_paid_out_money of this V1CashDrawerShift.
        The amount of money removed from the cash drawer for reasons other than cash refunds.

        :return: The cash_paid_out_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._cash_paid_out_money

    @cash_paid_out_money.setter
    def cash_paid_out_money(self, cash_paid_out_money):
        """
        Sets the cash_paid_out_money of this V1CashDrawerShift.
        The amount of money removed from the cash drawer for reasons other than cash refunds.

        :param cash_paid_out_money: The cash_paid_out_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._cash_paid_out_money = cash_paid_out_money

    @property
    def expected_cash_money(self):
        """
        Gets the expected_cash_money of this V1CashDrawerShift.
        The amount of money that should be in the cash drawer at the end of the shift, based on the shift's other money amounts.

        :return: The expected_cash_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._expected_cash_money

    @expected_cash_money.setter
    def expected_cash_money(self, expected_cash_money):
        """
        Sets the expected_cash_money of this V1CashDrawerShift.
        The amount of money that should be in the cash drawer at the end of the shift, based on the shift's other money amounts.

        :param expected_cash_money: The expected_cash_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._expected_cash_money = expected_cash_money

    @property
    def closed_cash_money(self):
        """
        Gets the closed_cash_money of this V1CashDrawerShift.
        The amount of money found in the cash drawer at the end of the shift by an auditing employee.

        :return: The closed_cash_money of this V1CashDrawerShift.
        :rtype: V1Money
        """
        return self._closed_cash_money

    @closed_cash_money.setter
    def closed_cash_money(self, closed_cash_money):
        """
        Sets the closed_cash_money of this V1CashDrawerShift.
        The amount of money found in the cash drawer at the end of the shift by an auditing employee.

        :param closed_cash_money: The closed_cash_money of this V1CashDrawerShift.
        :type: V1Money
        """

        self._closed_cash_money = closed_cash_money

    @property
    def device(self):
        """
        Gets the device of this V1CashDrawerShift.
        The device running Square Register that was connected to the cash drawer.

        :return: The device of this V1CashDrawerShift.
        :rtype: Device
        """
        return self._device

    @device.setter
    def device(self, device):
        """
        Sets the device of this V1CashDrawerShift.
        The device running Square Register that was connected to the cash drawer.

        :param device: The device of this V1CashDrawerShift.
        :type: Device
        """

        self._device = device

    @property
    def events(self):
        """
        Gets the events of this V1CashDrawerShift.
        All of the events (payments, refunds, and so on) that involved the cash drawer during the shift.

        :return: The events of this V1CashDrawerShift.
        :rtype: list[V1CashDrawerEvent]
        """
        return self._events

    @events.setter
    def events(self, events):
        """
        Sets the events of this V1CashDrawerShift.
        All of the events (payments, refunds, and so on) that involved the cash drawer during the shift.

        :param events: The events of this V1CashDrawerShift.
        :type: list[V1CashDrawerEvent]
        """

        self._events = events

    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
