# coding: utf-8

"""
    Defect Dojo API

    To use the API you need be authorized.  # noqa: E501

    The version of the OpenAPI document: v2
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class Scan(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 = {
        'id': 'int',
        'date': 'datetime',
        'protocol': 'str',
        'status': 'str',
        'baseline': 'bool',
        'scan_settings': 'int'
    }

    attribute_map = {
        'id': 'id',
        'date': 'date',
        'protocol': 'protocol',
        'status': 'status',
        'baseline': 'baseline',
        'scan_settings': 'scan_settings'
    }

    def __init__(self, id=None, date=None, protocol=None, status=None, baseline=None, scan_settings=None):  # noqa: E501
        """Scan - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._date = None
        self._protocol = None
        self._status = None
        self._baseline = None
        self._scan_settings = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if date is not None:
            self.date = date
        if protocol is not None:
            self.protocol = protocol
        if status is not None:
            self.status = status
        if baseline is not None:
            self.baseline = baseline
        if scan_settings is not None:
            self.scan_settings = scan_settings

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


        :return: The id of this Scan.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this Scan.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The date of this Scan.  # noqa: E501
        :rtype: datetime
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this Scan.


        :param date: The date of this Scan.  # noqa: E501
        :type: datetime
        """

        self._date = date

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


        :return: The protocol of this Scan.  # noqa: E501
        :rtype: str
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """Sets the protocol of this Scan.


        :param protocol: The protocol of this Scan.  # noqa: E501
        :type: str
        """
        if protocol is not None and len(protocol) > 10:
            raise ValueError("Invalid value for `protocol`, length must be less than or equal to `10`")  # noqa: E501
        if protocol is not None and len(protocol) < 1:
            raise ValueError("Invalid value for `protocol`, length must be greater than or equal to `1`")  # noqa: E501

        self._protocol = protocol

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


        :return: The status of this Scan.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Scan.


        :param status: The status of this Scan.  # noqa: E501
        :type: str
        """
        if status is not None and len(status) < 1:
            raise ValueError("Invalid value for `status`, length must be greater than or equal to `1`")  # noqa: E501

        self._status = status

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


        :return: The baseline of this Scan.  # noqa: E501
        :rtype: bool
        """
        return self._baseline

    @baseline.setter
    def baseline(self, baseline):
        """Sets the baseline of this Scan.


        :param baseline: The baseline of this Scan.  # noqa: E501
        :type: bool
        """

        self._baseline = baseline

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


        :return: The scan_settings of this Scan.  # noqa: E501
        :rtype: int
        """
        return self._scan_settings

    @scan_settings.setter
    def scan_settings(self, scan_settings):
        """Sets the scan_settings of this Scan.


        :param scan_settings: The scan_settings of this Scan.  # noqa: E501
        :type: int
        """

        self._scan_settings = scan_settings

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

        return self.__dict__ == other.__dict__

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