# 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 WorkweekConfig(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, start_of_week=None, start_of_day_local_time=None, version=None, created_at=None, updated_at=None):
        """
        WorkweekConfig - 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',
            'start_of_week': 'str',
            'start_of_day_local_time': 'str',
            'version': 'int',
            'created_at': 'str',
            'updated_at': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'start_of_week': 'start_of_week',
            'start_of_day_local_time': 'start_of_day_local_time',
            'version': 'version',
            'created_at': 'created_at',
            'updated_at': 'updated_at'
        }

        self._id = id
        self._start_of_week = start_of_week
        self._start_of_day_local_time = start_of_day_local_time
        self._version = version
        self._created_at = created_at
        self._updated_at = updated_at

    @property
    def id(self):
        """
        Gets the id of this WorkweekConfig.
        UUID for this object

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this WorkweekConfig.
        UUID for this object

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

        self._id = id

    @property
    def start_of_week(self):
        """
        Gets the start_of_week of this WorkweekConfig.
        The day of the week on which a business week cuts over for compensation purposes. See [Weekday](#type-weekday) for possible values

        :return: The start_of_week of this WorkweekConfig.
        :rtype: str
        """
        return self._start_of_week

    @start_of_week.setter
    def start_of_week(self, start_of_week):
        """
        Sets the start_of_week of this WorkweekConfig.
        The day of the week on which a business week cuts over for compensation purposes. See [Weekday](#type-weekday) for possible values

        :param start_of_week: The start_of_week of this WorkweekConfig.
        :type: str
        """

        self._start_of_week = start_of_week

    @property
    def start_of_day_local_time(self):
        """
        Gets the start_of_day_local_time of this WorkweekConfig.
        The local time at which a business week cuts over. Represented as a string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are truncated).

        :return: The start_of_day_local_time of this WorkweekConfig.
        :rtype: str
        """
        return self._start_of_day_local_time

    @start_of_day_local_time.setter
    def start_of_day_local_time(self, start_of_day_local_time):
        """
        Sets the start_of_day_local_time of this WorkweekConfig.
        The local time at which a business week cuts over. Represented as a string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are truncated).

        :param start_of_day_local_time: The start_of_day_local_time of this WorkweekConfig.
        :type: str
        """

        if start_of_day_local_time is None:
            raise ValueError("Invalid value for `start_of_day_local_time`, must not be `None`")
        if len(start_of_day_local_time) < 1:
            raise ValueError("Invalid value for `start_of_day_local_time`, length must be greater than or equal to `1`")

        self._start_of_day_local_time = start_of_day_local_time

    @property
    def version(self):
        """
        Gets the version of this WorkweekConfig.
        Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If not provided, Square executes a blind write; potentially overwriting data from another write.

        :return: The version of this WorkweekConfig.
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """
        Sets the version of this WorkweekConfig.
        Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If not provided, Square executes a blind write; potentially overwriting data from another write.

        :param version: The version of this WorkweekConfig.
        :type: int
        """

        self._version = version

    @property
    def created_at(self):
        """
        Gets the created_at of this WorkweekConfig.
        A read-only timestamp in RFC 3339 format; presented in UTC

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

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this WorkweekConfig.
        A read-only timestamp in RFC 3339 format; presented in UTC

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

        self._created_at = created_at

    @property
    def updated_at(self):
        """
        Gets the updated_at of this WorkweekConfig.
        A read-only timestamp in RFC 3339 format; presented in UTC

        :return: The updated_at of this WorkweekConfig.
        :rtype: str
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """
        Sets the updated_at of this WorkweekConfig.
        A read-only timestamp in RFC 3339 format; presented in UTC

        :param updated_at: The updated_at of this WorkweekConfig.
        :type: str
        """

        self._updated_at = updated_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
