# coding: utf-8

"""
    Memsource REST API

    Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis-qa-with-the-memsource-api-team/).    If you have any questions, please contact [Memsource Support](<mailto:support@memsource.com>).  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from memsource_cli.models.automated_project_settings_dto import AutomatedProjectSettingsDto  # noqa: F401,E501
from memsource_cli.models.name_dto import NameDto  # noqa: F401,E501


class ConnectorDto(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',
        'name': 'str',
        'type': 'str',
        'organization': 'NameDto',
        'created_by': 'NameDto',
        'created_at': 'datetime',
        'local_token': 'str',
        'automated_project_settings': 'list[AutomatedProjectSettingsDto]'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'type': 'type',
        'organization': 'organization',
        'created_by': 'createdBy',
        'created_at': 'createdAt',
        'local_token': 'localToken',
        'automated_project_settings': 'automatedProjectSettings'
    }

    def __init__(self, id=None, name=None, type=None, organization=None, created_by=None, created_at=None, local_token=None, automated_project_settings=None):  # noqa: E501
        """ConnectorDto - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._type = None
        self._organization = None
        self._created_by = None
        self._created_at = None
        self._local_token = None
        self._automated_project_settings = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if type is not None:
            self.type = type
        if organization is not None:
            self.organization = organization
        if created_by is not None:
            self.created_by = created_by
        if created_at is not None:
            self.created_at = created_at
        if local_token is not None:
            self.local_token = local_token
        if automated_project_settings is not None:
            self.automated_project_settings = automated_project_settings

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


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

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


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The type of this ConnectorDto.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ConnectorDto.


        :param type: The type of this ConnectorDto.  # noqa: E501
        :type: str
        """
        allowed_values = ["DROPBOX", "GOOGLE", "FTP", "WORDPRESS", "GITHUB", "SFTP", "DRUPAL", "BOX", "GIT", "ZENDESK", "ONEDRIVE", "GITLAB", "MARKETO", "HUBSPOT", "HELPSCOUT", "SALESFORCE", "BITBUCKET", "BITBUCKETSERVER", "SHAREPOINT", "AZURE", "SITECORE", "KENTICO", "MAGENTO", "CONTENTFULENTRYLEVEL", "CONTENTFUL", "CONTENTSTACK", "JOOMLA", "CONFLUENCE", "TYPO3", "AEM_PLUGIN"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The organization of this ConnectorDto.  # noqa: E501
        :rtype: NameDto
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this ConnectorDto.


        :param organization: The organization of this ConnectorDto.  # noqa: E501
        :type: NameDto
        """

        self._organization = organization

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


        :return: The created_by of this ConnectorDto.  # noqa: E501
        :rtype: NameDto
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this ConnectorDto.


        :param created_by: The created_by of this ConnectorDto.  # noqa: E501
        :type: NameDto
        """

        self._created_by = created_by

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


        :return: The created_at of this ConnectorDto.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this ConnectorDto.


        :param created_at: The created_at of this ConnectorDto.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The local_token of this ConnectorDto.  # noqa: E501
        :rtype: str
        """
        return self._local_token

    @local_token.setter
    def local_token(self, local_token):
        """Sets the local_token of this ConnectorDto.


        :param local_token: The local_token of this ConnectorDto.  # noqa: E501
        :type: str
        """

        self._local_token = local_token

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


        :return: The automated_project_settings of this ConnectorDto.  # noqa: E501
        :rtype: list[AutomatedProjectSettingsDto]
        """
        return self._automated_project_settings

    @automated_project_settings.setter
    def automated_project_settings(self, automated_project_settings):
        """Sets the automated_project_settings of this ConnectorDto.


        :param automated_project_settings: The automated_project_settings of this ConnectorDto.  # noqa: E501
        :type: list[AutomatedProjectSettingsDto]
        """

        self._automated_project_settings = automated_project_settings

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

        return self.__dict__ == other.__dict__

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