# coding: utf-8

"""
    Zarban API

    API for Zarban services.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from zarban.service.openapi_client.configuration import Configuration


class File(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',
        'time': 'str',
        'where': 'str',
        'ilk': 'str',
        'what': 'str',
        'data': 'str',
        'raw': 'Log'
    }

    attribute_map = {
        'id': 'id',
        'time': 'time',
        'where': 'where',
        'ilk': 'ilk',
        'what': 'what',
        'data': 'data',
        'raw': 'raw'
    }

    def __init__(self, id=None, time=None, where=None, ilk=None, what=None, data=None, raw=None, local_vars_configuration=None):  # noqa: E501
        """File - 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._id = None
        self._time = None
        self._where = None
        self._ilk = None
        self._what = None
        self._data = None
        self._raw = None
        self.discriminator = None

        self.id = id
        self.time = time
        self.where = where
        if ilk is not None:
            self.ilk = ilk
        self.what = what
        self.data = data
        self.raw = raw

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

        The file's ID  # noqa: E501

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

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

        The file's ID  # noqa: E501

        :param id: The id of this File.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        The time the file was created  # noqa: E501

        :return: The time of this File.  # noqa: E501
        :rtype: str
        """
        return self._time

    @time.setter
    def time(self, time):
        """Sets the time of this File.

        The time the file was created  # noqa: E501

        :param time: The time of this File.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and time is None:  # noqa: E501
            raise ValueError("Invalid value for `time`, must not be `None`")  # noqa: E501

        self._time = time

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

        The file's location or source  # noqa: E501

        :return: The where of this File.  # noqa: E501
        :rtype: str
        """
        return self._where

    @where.setter
    def where(self, where):
        """Sets the where of this File.

        The file's location or source  # noqa: E501

        :param where: The where of this File.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and where is None:  # noqa: E501
            raise ValueError("Invalid value for `where`, must not be `None`")  # noqa: E501

        self._where = where

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

        The file's ilk  # noqa: E501

        :return: The ilk of this File.  # noqa: E501
        :rtype: str
        """
        return self._ilk

    @ilk.setter
    def ilk(self, ilk):
        """Sets the ilk of this File.

        The file's ilk  # noqa: E501

        :param ilk: The ilk of this File.  # noqa: E501
        :type: str
        """

        self._ilk = ilk

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

        The file's description or purpose  # noqa: E501

        :return: The what of this File.  # noqa: E501
        :rtype: str
        """
        return self._what

    @what.setter
    def what(self, what):
        """Sets the what of this File.

        The file's description or purpose  # noqa: E501

        :param what: The what of this File.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and what is None:  # noqa: E501
            raise ValueError("Invalid value for `what`, must not be `None`")  # noqa: E501

        self._what = what

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

        The file's data  # noqa: E501

        :return: The data of this File.  # noqa: E501
        :rtype: str
        """
        return self._data

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

        The file's data  # noqa: E501

        :param data: The data of this File.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and data is None:  # noqa: E501
            raise ValueError("Invalid value for `data`, must not be `None`")  # noqa: E501

        self._data = data

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


        :return: The raw of this File.  # noqa: E501
        :rtype: Log
        """
        return self._raw

    @raw.setter
    def raw(self, raw):
        """Sets the raw of this File.


        :param raw: The raw of this File.  # noqa: E501
        :type: Log
        """
        if self.local_vars_configuration.client_side_validation and raw is None:  # noqa: E501
            raise ValueError("Invalid value for `raw`, must not be `None`")  # noqa: E501

        self._raw = raw

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

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