# coding: utf-8

"""
    teralytic

    The Teralytic API allows clients to manage their organization, view their fields and and probes, and query sensor readings and analytics.  For sandbox testing you may use the api key: `swagger.teralytic.io`   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from teralytic.models.string_array import StringArray  # noqa: F401,E501


class Application(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 = {
        'id': 'str',
        'organization_id': 'str',
        'name': 'str',
        'client_id': 'str',
        'client_secret': 'str',
        'scope': 'StringArray'
    }

    attribute_map = {
        'id': 'id',
        'organization_id': 'organization_id',
        'name': 'name',
        'client_id': 'client_id',
        'client_secret': 'client_secret',
        'scope': 'scope'
    }

    def __init__(self, id=None, organization_id=None, name=None, client_id=None, client_secret=None, scope=None):  # noqa: E501
        """Application - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._organization_id = None
        self._name = None
        self._client_id = None
        self._client_secret = None
        self._scope = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if organization_id is not None:
            self.organization_id = organization_id
        if name is not None:
            self.name = name
        if client_id is not None:
            self.client_id = client_id
        if client_secret is not None:
            self.client_secret = client_secret
        if scope is not None:
            self.scope = scope

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


        :return: The id of this Application.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Application.


        :param id: The id of this Application.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The organization this application belongs to  # noqa: E501

        :return: The organization_id of this Application.  # noqa: E501
        :rtype: str
        """
        return self._organization_id

    @organization_id.setter
    def organization_id(self, organization_id):
        """Sets the organization_id of this Application.

        The organization this application belongs to  # noqa: E501

        :param organization_id: The organization_id of this Application.  # noqa: E501
        :type: str
        """

        self._organization_id = organization_id

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

        The application name  # noqa: E501

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

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

        The application name  # noqa: E501

        :param name: The name of this Application.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The client id  # noqa: E501

        :return: The client_id of this Application.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this Application.

        The client id  # noqa: E501

        :param client_id: The client_id of this Application.  # noqa: E501
        :type: str
        """

        self._client_id = client_id

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

        The client secret  # noqa: E501

        :return: The client_secret of this Application.  # noqa: E501
        :rtype: str
        """
        return self._client_secret

    @client_secret.setter
    def client_secret(self, client_secret):
        """Sets the client_secret of this Application.

        The client secret  # noqa: E501

        :param client_secret: The client_secret of this Application.  # noqa: E501
        :type: str
        """

        self._client_secret = client_secret

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


        :return: The scope of this Application.  # noqa: E501
        :rtype: StringArray
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this Application.


        :param scope: The scope of this Application.  # noqa: E501
        :type: StringArray
        """

        self._scope = scope

    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(Application, 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, Application):
            return False

        return self.__dict__ == other.__dict__

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