# coding: utf-8

"""
    SignRequest API

    API for SignRequest.com

    OpenAPI spec version: v1
    Contact: <EMAIL>
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class Team(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'name': 'str',
        'subdomain': 'str',
        'url': 'str',
        'logo': 'str',
        'phone': 'str',
        'primary_color': 'str',
        'events_callback_url': 'str',
        'members': 'list[InlineTeamMember]',
        'delete_after': 'datetime',
        'sandbox': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'subdomain': 'subdomain',
        'url': 'url',
        'logo': 'logo',
        'phone': 'phone',
        'primary_color': 'primary_color',
        'events_callback_url': 'events_callback_url',
        'members': 'members',
        'delete_after': 'delete_after',
        'sandbox': 'sandbox'
    }

    def __init__(self, name=None, subdomain=None, url=None, logo=None, phone=None, primary_color=None, events_callback_url=None, members=None, delete_after=None, sandbox=None):  # noqa: E501
        """Team - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._subdomain = None
        self._url = None
        self._logo = None
        self._phone = None
        self._primary_color = None
        self._events_callback_url = None
        self._members = None
        self._delete_after = None
        self._sandbox = None
        self.discriminator = None

        self.name = name
        self.subdomain = subdomain
        if url is not None:
            self.url = url
        if logo is not None:
            self.logo = logo
        if phone is not None:
            self.phone = phone
        if primary_color is not None:
            self.primary_color = primary_color
        if events_callback_url is not None:
            self.events_callback_url = events_callback_url
        if members is not None:
            self.members = members
        if delete_after is not None:
            self.delete_after = delete_after
        if sandbox is not None:
            self.sandbox = sandbox

    @property
    def name(self):
        """Gets the name of this Team.  # noqa: E501


        :return: The name of this Team.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Team.


        :param name: The name of this Team.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if name is not None and len(name) > 100:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `100`")  # noqa: E501
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

    @property
    def subdomain(self):
        """Gets the subdomain of this Team.  # noqa: E501


        :return: The subdomain of this Team.  # noqa: E501
        :rtype: str
        """
        return self._subdomain

    @subdomain.setter
    def subdomain(self, subdomain):
        """Sets the subdomain of this Team.


        :param subdomain: The subdomain of this Team.  # noqa: E501
        :type: str
        """
        if subdomain is None:
            raise ValueError("Invalid value for `subdomain`, must not be `None`")  # noqa: E501
        if subdomain is not None and len(subdomain) > 100:
            raise ValueError("Invalid value for `subdomain`, length must be less than or equal to `100`")  # noqa: E501
        if subdomain is not None and len(subdomain) < 1:
            raise ValueError("Invalid value for `subdomain`, length must be greater than or equal to `1`")  # noqa: E501

        self._subdomain = subdomain

    @property
    def url(self):
        """Gets the url of this Team.  # noqa: E501


        :return: The url of this Team.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this Team.


        :param url: The url of this Team.  # noqa: E501
        :type: str
        """

        self._url = url

    @property
    def logo(self):
        """Gets the logo of this Team.  # noqa: E501


        :return: The logo of this Team.  # noqa: E501
        :rtype: str
        """
        return self._logo

    @logo.setter
    def logo(self, logo):
        """Sets the logo of this Team.


        :param logo: The logo of this Team.  # noqa: E501
        :type: str
        """

        self._logo = logo

    @property
    def phone(self):
        """Gets the phone of this Team.  # noqa: E501


        :return: The phone of this Team.  # noqa: E501
        :rtype: str
        """
        return self._phone

    @phone.setter
    def phone(self, phone):
        """Sets the phone of this Team.


        :param phone: The phone of this Team.  # noqa: E501
        :type: str
        """
        if phone is not None and len(phone) > 100:
            raise ValueError("Invalid value for `phone`, length must be less than or equal to `100`")  # noqa: E501

        self._phone = phone

    @property
    def primary_color(self):
        """Gets the primary_color of this Team.  # noqa: E501


        :return: The primary_color of this Team.  # noqa: E501
        :rtype: str
        """
        return self._primary_color

    @primary_color.setter
    def primary_color(self, primary_color):
        """Sets the primary_color of this Team.


        :param primary_color: The primary_color of this Team.  # noqa: E501
        :type: str
        """
        if primary_color is not None and len(primary_color) > 100:
            raise ValueError("Invalid value for `primary_color`, length must be less than or equal to `100`")  # noqa: E501
        if primary_color is not None and not re.search(r'^[#a-zA-Z0-9]+$', primary_color):  # noqa: E501
            raise ValueError(r"Invalid value for `primary_color`, must be a follow pattern or equal to `/^[#a-zA-Z0-9]+$/`")  # noqa: E501

        self._primary_color = primary_color

    @property
    def events_callback_url(self):
        """Gets the events_callback_url of this Team.  # noqa: E501


        :return: The events_callback_url of this Team.  # noqa: E501
        :rtype: str
        """
        return self._events_callback_url

    @events_callback_url.setter
    def events_callback_url(self, events_callback_url):
        """Sets the events_callback_url of this Team.


        :param events_callback_url: The events_callback_url of this Team.  # noqa: E501
        :type: str
        """
        if events_callback_url is not None and len(events_callback_url) > 2100:
            raise ValueError("Invalid value for `events_callback_url`, length must be less than or equal to `2100`")  # noqa: E501

        self._events_callback_url = events_callback_url

    @property
    def members(self):
        """Gets the members of this Team.  # noqa: E501


        :return: The members of this Team.  # noqa: E501
        :rtype: list[InlineTeamMember]
        """
        return self._members

    @members.setter
    def members(self, members):
        """Sets the members of this Team.


        :param members: The members of this Team.  # noqa: E501
        :type: list[InlineTeamMember]
        """

        self._members = members

    @property
    def delete_after(self):
        """Gets the delete_after of this Team.  # noqa: E501

        When filled this team will be deleted after this date  # noqa: E501

        :return: The delete_after of this Team.  # noqa: E501
        :rtype: datetime
        """
        return self._delete_after

    @delete_after.setter
    def delete_after(self, delete_after):
        """Sets the delete_after of this Team.

        When filled this team will be deleted after this date  # noqa: E501

        :param delete_after: The delete_after of this Team.  # noqa: E501
        :type: datetime
        """

        self._delete_after = delete_after

    @property
    def sandbox(self):
        """Gets the sandbox of this Team.  # noqa: E501

        Indicates whether team is in Sandbox mode  # noqa: E501

        :return: The sandbox of this Team.  # noqa: E501
        :rtype: bool
        """
        return self._sandbox

    @sandbox.setter
    def sandbox(self, sandbox):
        """Sets the sandbox of this Team.

        Indicates whether team is in Sandbox mode  # noqa: E501

        :param sandbox: The sandbox of this Team.  # noqa: E501
        :type: bool
        """

        self._sandbox = sandbox

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.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
        if issubclass(Team, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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"""
        if not isinstance(other, Team):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
