# coding: utf-8

"""
    UbiOps

    Client Library to interact with the UbiOps API.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ubiops.configuration import Configuration


class LogsCreate(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 = {
        'filters': 'dict(str, str)',
        'date_range': 'int',
        'date': 'str',
        'id': 'str',
        'limit': 'int'
    }

    attribute_map = {
        'filters': 'filters',
        'date_range': 'date_range',
        'date': 'date',
        'id': 'id',
        'limit': 'limit'
    }

    def __init__(self, filters=None, date_range=None, date=None, id=None, limit=None, local_vars_configuration=None):  # noqa: E501
        """LogsCreate - 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._filters = None
        self._date_range = None
        self._date = None
        self._id = None
        self._limit = None
        self.discriminator = None

        self.filters = filters
        if date_range is not None:
            self.date_range = date_range
        if date is not None:
            self.date = date
        if id is not None:
            self.id = id
        if limit is not None:
            self.limit = limit

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


        :return: The filters of this LogsCreate.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._filters

    @filters.setter
    def filters(self, filters):
        """Sets the filters of this LogsCreate.


        :param filters: The filters of this LogsCreate.  # noqa: E501
        :type: dict(str, str)
        """
        if self.local_vars_configuration.client_side_validation and filters is None:  # noqa: E501
            raise ValueError("Invalid value for `filters`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                filters is not None and not isinstance(filters, dict)):
            raise ValueError("Parameter `filters` must be a dictionary")  # noqa: E501

        self._filters = filters

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


        :return: The date_range of this LogsCreate.  # noqa: E501
        :rtype: int
        """
        return self._date_range

    @date_range.setter
    def date_range(self, date_range):
        """Sets the date_range of this LogsCreate.


        :param date_range: The date_range of this LogsCreate.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                date_range is not None and not isinstance(date_range, int)):
            raise ValueError("Parameter `date_range` must be an integer")  # noqa: E501

        self._date_range = date_range

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


        :return: The date of this LogsCreate.  # noqa: E501
        :rtype: str
        """
        return self._date

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


        :param date: The date of this LogsCreate.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                date is not None and not isinstance(date, str)):
            raise ValueError("Parameter `date` must be a string")  # noqa: E501

        if (self.local_vars_configuration.client_side_validation and
                date is not None and len(date) < 1):
            raise ValueError("Invalid value for `date`, length must be greater than or equal to `1`")  # noqa: E501

        self._date = date

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


        :return: The id of this LogsCreate.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this LogsCreate.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                id is not None and not isinstance(id, str)):
            raise ValueError("Parameter `id` must be a string")  # noqa: E501

        if (self.local_vars_configuration.client_side_validation and
                id is not None and len(id) > 24):
            raise ValueError("Invalid value for `id`, length must be less than or equal to `24`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                id is not None and len(id) < 24):
            raise ValueError("Invalid value for `id`, length must be greater than or equal to `24`")  # noqa: E501

        self._id = id

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


        :return: The limit of this LogsCreate.  # noqa: E501
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """Sets the limit of this LogsCreate.


        :param limit: The limit of this LogsCreate.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                limit is not None and not isinstance(limit, int)):
            raise ValueError("Parameter `limit` must be an integer")  # noqa: E501

        self._limit = limit

    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, LogsCreate):
            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, LogsCreate):
            return True

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