# 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 V1TimecardEvent(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, clockin_time=None, clockout_time=None, created_at=None):
        """
        V1TimecardEvent - 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',
            'clockin_time': 'str',
            'clockout_time': 'str',
            'created_at': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'event_type': 'event_type',
            'clockin_time': 'clockin_time',
            'clockout_time': 'clockout_time',
            'created_at': 'created_at'
        }

        self._id = id
        self._event_type = event_type
        self._clockin_time = clockin_time
        self._clockout_time = clockout_time
        self._created_at = created_at

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

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

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

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

        self._id = id

    @property
    def event_type(self):
        """
        Gets the event_type of this V1TimecardEvent.
        The ID of the timecard to list events for. See [V1TimecardEventEventType](#type-v1timecardeventeventtype) for possible values

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

    @event_type.setter
    def event_type(self, event_type):
        """
        Sets the event_type of this V1TimecardEvent.
        The ID of the timecard to list events for. See [V1TimecardEventEventType](#type-v1timecardeventeventtype) for possible values

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

        self._event_type = event_type

    @property
    def clockin_time(self):
        """
        Gets the clockin_time of this V1TimecardEvent.
        The time the employee clocked in, in ISO 8601 format.

        :return: The clockin_time of this V1TimecardEvent.
        :rtype: str
        """
        return self._clockin_time

    @clockin_time.setter
    def clockin_time(self, clockin_time):
        """
        Sets the clockin_time of this V1TimecardEvent.
        The time the employee clocked in, in ISO 8601 format.

        :param clockin_time: The clockin_time of this V1TimecardEvent.
        :type: str
        """

        self._clockin_time = clockin_time

    @property
    def clockout_time(self):
        """
        Gets the clockout_time of this V1TimecardEvent.
        The time the employee clocked out, in ISO 8601 format.

        :return: The clockout_time of this V1TimecardEvent.
        :rtype: str
        """
        return self._clockout_time

    @clockout_time.setter
    def clockout_time(self, clockout_time):
        """
        Sets the clockout_time of this V1TimecardEvent.
        The time the employee clocked out, in ISO 8601 format.

        :param clockout_time: The clockout_time of this V1TimecardEvent.
        :type: str
        """

        self._clockout_time = clockout_time

    @property
    def created_at(self):
        """
        Gets the created_at of this V1TimecardEvent.
        The time when the event was created, in ISO 8601 format.

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

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this V1TimecardEvent.
        The time when the event was created, in ISO 8601 format.

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

        self._created_at = created_at

    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
