# coding: utf-8

"""
    Cloudsmith API

    The API to the Cloudsmith Service

    OpenAPI spec version: v1
    Contact: support@cloudsmith.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class VulnerabilityScanResults(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 = {
        'created_at': 'str',
        'has_vulnerabilities': 'bool',
        'identifier': 'str',
        'max_severity': 'str',
        'num_vulnerabilities': 'int',
        'package': 'object',
        'scan': 'object',
        'scan_id': 'int'
    }

    attribute_map = {
        'created_at': 'created_at',
        'has_vulnerabilities': 'has_vulnerabilities',
        'identifier': 'identifier',
        'max_severity': 'max_severity',
        'num_vulnerabilities': 'num_vulnerabilities',
        'package': 'package',
        'scan': 'scan',
        'scan_id': 'scan_id'
    }

    def __init__(self, created_at=None, has_vulnerabilities=None, identifier=None, max_severity=None, num_vulnerabilities=None, package=None, scan=None, scan_id=None):
        """
        VulnerabilityScanResults - a model defined in Swagger
        """

        self._created_at = None
        self._has_vulnerabilities = None
        self._identifier = None
        self._max_severity = None
        self._num_vulnerabilities = None
        self._package = None
        self._scan = None
        self._scan_id = None

        if created_at is not None:
          self.created_at = created_at
        if has_vulnerabilities is not None:
          self.has_vulnerabilities = has_vulnerabilities
        self.identifier = identifier
        if max_severity is not None:
          self.max_severity = max_severity
        if num_vulnerabilities is not None:
          self.num_vulnerabilities = num_vulnerabilities
        self.package = package
        self.scan = scan
        self.scan_id = scan_id

    @property
    def created_at(self):
        """
        Gets the created_at of this VulnerabilityScanResults.
        The time this scan result was stored.

        :return: The created_at of this VulnerabilityScanResults.
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this VulnerabilityScanResults.
        The time this scan result was stored.

        :param created_at: The created_at of this VulnerabilityScanResults.
        :type: str
        """

        self._created_at = created_at

    @property
    def has_vulnerabilities(self):
        """
        Gets the has_vulnerabilities of this VulnerabilityScanResults.
        Do the results contain any known vulnerabilities?

        :return: The has_vulnerabilities of this VulnerabilityScanResults.
        :rtype: bool
        """
        return self._has_vulnerabilities

    @has_vulnerabilities.setter
    def has_vulnerabilities(self, has_vulnerabilities):
        """
        Sets the has_vulnerabilities of this VulnerabilityScanResults.
        Do the results contain any known vulnerabilities?

        :param has_vulnerabilities: The has_vulnerabilities of this VulnerabilityScanResults.
        :type: bool
        """

        self._has_vulnerabilities = has_vulnerabilities

    @property
    def identifier(self):
        """
        Gets the identifier of this VulnerabilityScanResults.
        

        :return: The identifier of this VulnerabilityScanResults.
        :rtype: str
        """
        return self._identifier

    @identifier.setter
    def identifier(self, identifier):
        """
        Sets the identifier of this VulnerabilityScanResults.
        

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

        self._identifier = identifier

    @property
    def max_severity(self):
        """
        Gets the max_severity of this VulnerabilityScanResults.
        

        :return: The max_severity of this VulnerabilityScanResults.
        :rtype: str
        """
        return self._max_severity

    @max_severity.setter
    def max_severity(self, max_severity):
        """
        Sets the max_severity of this VulnerabilityScanResults.
        

        :param max_severity: The max_severity of this VulnerabilityScanResults.
        :type: str
        """

        self._max_severity = max_severity

    @property
    def num_vulnerabilities(self):
        """
        Gets the num_vulnerabilities of this VulnerabilityScanResults.
        

        :return: The num_vulnerabilities of this VulnerabilityScanResults.
        :rtype: int
        """
        return self._num_vulnerabilities

    @num_vulnerabilities.setter
    def num_vulnerabilities(self, num_vulnerabilities):
        """
        Sets the num_vulnerabilities of this VulnerabilityScanResults.
        

        :param num_vulnerabilities: The num_vulnerabilities of this VulnerabilityScanResults.
        :type: int
        """

        self._num_vulnerabilities = num_vulnerabilities

    @property
    def package(self):
        """
        Gets the package of this VulnerabilityScanResults.
        

        :return: The package of this VulnerabilityScanResults.
        :rtype: object
        """
        return self._package

    @package.setter
    def package(self, package):
        """
        Sets the package of this VulnerabilityScanResults.
        

        :param package: The package of this VulnerabilityScanResults.
        :type: object
        """
        if package is None:
            raise ValueError("Invalid value for `package`, must not be `None`")

        self._package = package

    @property
    def scan(self):
        """
        Gets the scan of this VulnerabilityScanResults.
        

        :return: The scan of this VulnerabilityScanResults.
        :rtype: object
        """
        return self._scan

    @scan.setter
    def scan(self, scan):
        """
        Sets the scan of this VulnerabilityScanResults.
        

        :param scan: The scan of this VulnerabilityScanResults.
        :type: object
        """
        if scan is None:
            raise ValueError("Invalid value for `scan`, must not be `None`")

        self._scan = scan

    @property
    def scan_id(self):
        """
        Gets the scan_id of this VulnerabilityScanResults.
        

        :return: The scan_id of this VulnerabilityScanResults.
        :rtype: int
        """
        return self._scan_id

    @scan_id.setter
    def scan_id(self, scan_id):
        """
        Sets the scan_id of this VulnerabilityScanResults.
        

        :param scan_id: The scan_id of this VulnerabilityScanResults.
        :type: int
        """
        if scan_id is None:
            raise ValueError("Invalid value for `scan_id`, must not be `None`")

        self._scan_id = scan_id

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

        return self.__dict__ == other.__dict__

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