# coding: utf-8

"""
    DLRN API

    DLRN API client

    OpenAPI spec version: 1.0.0

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems


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

    Do not edit the class manually.
    """
    def __init__(self, commit_hash=None, distro_hash=None, extended_hash=None,
                 success=None):
        """Params2 - 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 = {
            'commit_hash': 'str',
            'distro_hash': 'str',
            'extended_hash': 'str',
            'success': 'bool'
        }

        self.attribute_map = {
            'commit_hash': 'commit_hash',
            'distro_hash': 'distro_hash',
            'extended_hash': 'extended_hash',
            'success': 'success'
        }

        self._commit_hash = commit_hash
        self._distro_hash = distro_hash
        self._extended_hash = extended_hash
        self._success = success

    @property
    def commit_hash(self):
        """Gets the commit_hash of this Params2.

        commit_hash of the repo to fetch information for.

        :return: The commit_hash of this Params2.
        :rtype: str
        """
        return self._commit_hash

    @commit_hash.setter
    def commit_hash(self, commit_hash):
        """Sets the commit_hash of this Params2.

        commit_hash of the repo to fetch information for.

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

        self._commit_hash = commit_hash

    @property
    def distro_hash(self):
        """Gets the distro_hash of this Params2.

        distro_hash of the repo to fetch information for.

        :return: The distro_hash of this Params2.
        :rtype: str
        """
        return self._distro_hash

    @distro_hash.setter
    def distro_hash(self, distro_hash):
        """Sets the distro_hash of this Params2.

        distro_hash of the repo to fetch information for.

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

        self._distro_hash = distro_hash

    @property
    def extended_hash(self):
        """Gets the extended_hash of this Params2.

        extended_hash of tested repo

        :return: The extended_hash of this Params2.
        :rtype: str
        """
        return self._extended_hash

    @extended_hash.setter
    def extended_hash(self, extended_hash):
        """Sets the extended_hash of this Params2.

        extended_hash of tested repo

        :param extended_hash: The extended_hash of this Params2.
        :type: str
        """

        self._extended_hash = extended_hash

    @property
    def success(self):
        """Gets the success of this Params2.

        If set to a value, only return the CI reports with the specified vote.
        If not set, return all CI reports.

        :return: The success of this Params2.
        :rtype: bool
        """
        return self._success

    @success.setter
    def success(self, success):
        """Sets the success of this Params2.

        If set to a value, only return the CI reports with the specified vote.
        If not set, return all CI reports.

        :param success: The success of this Params2.
        :type: bool
        """

        self._success = success

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

        return self.__dict__ == other.__dict__

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