# coding: utf-8

"""
    Algorithmia Management APIs

    APIs for managing actions on the Algorithmia platform  # noqa: E501

    The version of the OpenAPI document: 1.0.1
    Contact: support@algorithmia.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from algorithmia_api_client.configuration import Configuration


class ScmConnectionStatus(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'scm_connection_status': 'str',
        'repository_public_deploy_key': 'str',
        'repository_webhook_secret': 'str',
        'repository_webhook_url': 'str'
    }

    attribute_map = {
        'scm_connection_status': 'scm_connection_status',
        'repository_public_deploy_key': 'repository_public_deploy_key',
        'repository_webhook_secret': 'repository_webhook_secret',
        'repository_webhook_url': 'repository_webhook_url'
    }

    def __init__(self, scm_connection_status=None, repository_public_deploy_key=None, repository_webhook_secret=None, repository_webhook_url=None, local_vars_configuration=None):  # noqa: E501
        """ScmConnectionStatus - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._scm_connection_status = None
        self._repository_public_deploy_key = None
        self._repository_webhook_secret = None
        self._repository_webhook_url = None
        self.discriminator = None

        if scm_connection_status is not None:
            self.scm_connection_status = scm_connection_status
        if repository_public_deploy_key is not None:
            self.repository_public_deploy_key = repository_public_deploy_key
        if repository_webhook_secret is not None:
            self.repository_webhook_secret = repository_webhook_secret
        if repository_webhook_url is not None:
            self.repository_webhook_url = repository_webhook_url

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


        :return: The scm_connection_status of this ScmConnectionStatus.  # noqa: E501
        :rtype: str
        """
        return self._scm_connection_status

    @scm_connection_status.setter
    def scm_connection_status(self, scm_connection_status):
        """Sets the scm_connection_status of this ScmConnectionStatus.


        :param scm_connection_status: The scm_connection_status of this ScmConnectionStatus.  # noqa: E501
        :type: str
        """
        allowed_values = ["active", "deploy_key_error", "provider_internal_error"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and scm_connection_status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `scm_connection_status` ({0}), must be one of {1}"  # noqa: E501
                .format(scm_connection_status, allowed_values)
            )

        self._scm_connection_status = scm_connection_status

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


        :return: The repository_public_deploy_key of this ScmConnectionStatus.  # noqa: E501
        :rtype: str
        """
        return self._repository_public_deploy_key

    @repository_public_deploy_key.setter
    def repository_public_deploy_key(self, repository_public_deploy_key):
        """Sets the repository_public_deploy_key of this ScmConnectionStatus.


        :param repository_public_deploy_key: The repository_public_deploy_key of this ScmConnectionStatus.  # noqa: E501
        :type: str
        """

        self._repository_public_deploy_key = repository_public_deploy_key

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


        :return: The repository_webhook_secret of this ScmConnectionStatus.  # noqa: E501
        :rtype: str
        """
        return self._repository_webhook_secret

    @repository_webhook_secret.setter
    def repository_webhook_secret(self, repository_webhook_secret):
        """Sets the repository_webhook_secret of this ScmConnectionStatus.


        :param repository_webhook_secret: The repository_webhook_secret of this ScmConnectionStatus.  # noqa: E501
        :type: str
        """

        self._repository_webhook_secret = repository_webhook_secret

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


        :return: The repository_webhook_url of this ScmConnectionStatus.  # noqa: E501
        :rtype: str
        """
        return self._repository_webhook_url

    @repository_webhook_url.setter
    def repository_webhook_url(self, repository_webhook_url):
        """Sets the repository_webhook_url of this ScmConnectionStatus.


        :param repository_webhook_url: The repository_webhook_url of this ScmConnectionStatus.  # noqa: E501
        :type: str
        """

        self._repository_webhook_url = repository_webhook_url

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

        for attr, _ in six.iteritems(self.openapi_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 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, ScmConnectionStatus):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
