# coding: utf-8

"""
    Smooch

    The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).

    OpenAPI spec version: 2.8
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Client(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, active=None, last_seen=None, platform=None, push_notification_token=None, app_version=None, display_name=None, info=None):
        """
        Client - 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',
            'active': 'bool',
            'last_seen': 'str',
            'platform': 'str',
            'push_notification_token': 'str',
            'app_version': 'str',
            'display_name': 'str',
            'info': 'ClientInfo'
        }

        self.attribute_map = {
            'id': 'id',
            'active': 'active',
            'last_seen': 'lastSeen',
            'platform': 'platform',
            'push_notification_token': 'pushNotificationToken',
            'app_version': 'appVersion',
            'display_name': 'displayName',
            'info': 'info'
        }

        self._id = None
        self._active = None
        self._last_seen = None
        self._platform = None
        self._push_notification_token = None
        self._app_version = None
        self._display_name = None
        self._info = None

        # TODO: let required properties as mandatory parameter in the constructor.
        #       - to check if required property is not None (e.g. by calling setter)
        #       - ApiClient.__deserialize_model has to be adapted as well
        if id is not None:
          self.id = id
        if active is not None:
          self.active = active
        if last_seen is not None:
          self.last_seen = last_seen
        if platform is not None:
          self.platform = platform
        if push_notification_token is not None:
          self.push_notification_token = push_notification_token
        if app_version is not None:
          self.app_version = app_version
        if display_name is not None:
          self.display_name = display_name
        if info is not None:
          self.info = info

    @property
    def id(self):
        """
        Gets the id of this Client.
        An identifier for the client. Must be globally unique.

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this Client.
        An identifier for the client. Must be globally unique.

        :param id: The id of this Client.
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")

        self._id = id

    @property
    def active(self):
        """
        Gets the active of this Client.
        Flag indicating if the client is active.

        :return: The active of this Client.
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """
        Sets the active of this Client.
        Flag indicating if the client is active.

        :param active: The active of this Client.
        :type: bool
        """

        self._active = active

    @property
    def last_seen(self):
        """
        Gets the last_seen of this Client.
        The date time the client was last seen.

        :return: The last_seen of this Client.
        :rtype: str
        """
        return self._last_seen

    @last_seen.setter
    def last_seen(self, last_seen):
        """
        Sets the last_seen of this Client.
        The date time the client was last seen.

        :param last_seen: The last_seen of this Client.
        :type: str
        """

        self._last_seen = last_seen

    @property
    def platform(self):
        """
        Gets the platform of this Client.
        The client's platform.

        :return: The platform of this Client.
        :rtype: str
        """
        return self._platform

    @platform.setter
    def platform(self, platform):
        """
        Sets the platform of this Client.
        The client's platform.

        :param platform: The platform of this Client.
        :type: str
        """
        if platform is None:
            raise ValueError("Invalid value for `platform`, must not be `None`")

        self._platform = platform

    @property
    def push_notification_token(self):
        """
        Gets the push_notification_token of this Client.
        The GCM or APN token to be used for sending push notifications to the device. Applies to only *android* and *ios* clients. 

        :return: The push_notification_token of this Client.
        :rtype: str
        """
        return self._push_notification_token

    @push_notification_token.setter
    def push_notification_token(self, push_notification_token):
        """
        Sets the push_notification_token of this Client.
        The GCM or APN token to be used for sending push notifications to the device. Applies to only *android* and *ios* clients. 

        :param push_notification_token: The push_notification_token of this Client.
        :type: str
        """

        self._push_notification_token = push_notification_token

    @property
    def app_version(self):
        """
        Gets the app_version of this Client.
        A reserved string field for reporting the app version running on the device.

        :return: The app_version of this Client.
        :rtype: str
        """
        return self._app_version

    @app_version.setter
    def app_version(self, app_version):
        """
        Sets the app_version of this Client.
        A reserved string field for reporting the app version running on the device.

        :param app_version: The app_version of this Client.
        :type: str
        """

        self._app_version = app_version

    @property
    def display_name(self):
        """
        Gets the display_name of this Client.
        The client's display name.

        :return: The display_name of this Client.
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """
        Sets the display_name of this Client.
        The client's display name.

        :param display_name: The display_name of this Client.
        :type: str
        """

        self._display_name = display_name

    @property
    def info(self):
        """
        Gets the info of this Client.

        :return: The info of this Client.
        :rtype: ClientInfo
        """
        return self._info

    @info.setter
    def info(self, info):
        """
        Sets the info of this Client.

        :param info: The info of this Client.
        :type: ClientInfo
        """

        self._info = info

    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
        """
        if not isinstance(other, Client):
            return False

        return self.__dict__ == other.__dict__

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