# 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 ScanSettingsCreate(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',
        'user': 'int',
        'product': 'int',
        'data': 'datetime',
        'addresses': 'str',
        'date': 'datetime',
        'frequency': 'str',
        'email': 'str',
        'protocol': 'str'
    }

    attribute_map = {
        'id': 'id',
        'user': 'user',
        'product': 'product',
        'data': 'data',
        'addresses': 'addresses',
        'date': 'date',
        'frequency': 'frequency',
        'email': 'email',
        'protocol': 'protocol'
    }

    def __init__(self, id=None, user=None, product=None, data=None, addresses=None, date=None, frequency=None, email=None, protocol=None):  # noqa: E501
        """ScanSettingsCreate - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._user = None
        self._product = None
        self._data = None
        self._addresses = None
        self._date = None
        self._frequency = None
        self._email = None
        self._protocol = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.user = user
        self.product = product
        if data is not None:
            self.data = data
        if addresses is not None:
            self.addresses = addresses
        if date is not None:
            self.date = date
        self.frequency = frequency
        self.email = email
        if protocol is not None:
            self.protocol = protocol

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


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

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


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

        self._id = id

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


        :return: The user of this ScanSettingsCreate.  # noqa: E501
        :rtype: int
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this ScanSettingsCreate.


        :param user: The user of this ScanSettingsCreate.  # noqa: E501
        :type: int
        """
        if user is None:
            raise ValueError("Invalid value for `user`, must not be `None`")  # noqa: E501

        self._user = user

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


        :return: The product of this ScanSettingsCreate.  # noqa: E501
        :rtype: int
        """
        return self._product

    @product.setter
    def product(self, product):
        """Sets the product of this ScanSettingsCreate.


        :param product: The product of this ScanSettingsCreate.  # noqa: E501
        :type: int
        """
        if product is None:
            raise ValueError("Invalid value for `product`, must not be `None`")  # noqa: E501

        self._product = product

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


        :return: The data of this ScanSettingsCreate.  # noqa: E501
        :rtype: datetime
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this ScanSettingsCreate.


        :param data: The data of this ScanSettingsCreate.  # noqa: E501
        :type: datetime
        """

        self._data = data

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


        :return: The addresses of this ScanSettingsCreate.  # noqa: E501
        :rtype: str
        """
        return self._addresses

    @addresses.setter
    def addresses(self, addresses):
        """Sets the addresses of this ScanSettingsCreate.


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

        self._addresses = addresses

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


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

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


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

        self._date = date

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


        :return: The frequency of this ScanSettingsCreate.  # noqa: E501
        :rtype: str
        """
        return self._frequency

    @frequency.setter
    def frequency(self, frequency):
        """Sets the frequency of this ScanSettingsCreate.


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

        self._frequency = frequency

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


        :return: The email of this ScanSettingsCreate.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this ScanSettingsCreate.


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

        self._email = email

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


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

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


        :param protocol: The protocol of this ScanSettingsCreate.  # 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

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

        return self.__dict__ == other.__dict__

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