# coding: utf-8

"""
    UniCatDB API

    UniCatDB application API documentation, with examples and live testing.  This API is built in accordance with the **JSON API 1.0 standard**. For general information, see [the documentation](http://jsonapi.org/format/).  **Notes:** * JSON API standard requires use of the JSON API media type (application/vnd.api+json) for exchanging data. Clients must send all JSON API data with the headers `Content-Type: application/vnd.api+json` (POST, PATCH) and `Accept: application/vnd.api+json` (GET, DELETE). * [Relationships](http://jsonapi.org/format/#fetching-relationships) and their [inclusions](http://jsonapi.org/format/#fetching-includes) via the `include` query parameter, as specified by the standard, **are not implemented**, since there are no relationships present in the data model. * The standard does not prescribe any filtering strategies. This API implements two strategies which can be combined: **Basic filtering** based on the used [JSON API library](https://json-api-dotnet.github.io/#/filtering) and **Custom filtering** which allow for any possible query to the MongoDB server and can be extended and customize in the future. For more information about filtering, see the description of the `filter` down bellow. * **Non-standard PATCH behavior:** Sucessfull PATCH reuest always result in HTTP 200 response with the updated resource object, even if the server does not perform any additional modifications. HTTP 204 is never used in PATCH responses.   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from unicatdb.openapi_client.configuration import Configuration


class FindingSchemaResourceObject(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 = {
        'attributes': 'FindingSchema',
        'relationships': 'FindingSchemaResourceObjectRelationships',
        'type': 'str',
        'id': 'str'
    }

    attribute_map = {
        'attributes': 'attributes',
        'relationships': 'relationships',
        'type': 'type',
        'id': 'id'
    }

    def __init__(self, attributes=None, relationships=None, type=None, id=None, local_vars_configuration=None):  # noqa: E501
        """FindingSchemaResourceObject - 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._attributes = None
        self._relationships = None
        self._type = None
        self._id = None
        self.discriminator = None

        self.attributes = attributes
        if relationships is not None:
            self.relationships = relationships
        self.type = type
        if id is not None:
            self.id = id

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


        :return: The attributes of this FindingSchemaResourceObject.  # noqa: E501
        :rtype: FindingSchema
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """Sets the attributes of this FindingSchemaResourceObject.


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

        self._attributes = attributes

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


        :return: The relationships of this FindingSchemaResourceObject.  # noqa: E501
        :rtype: FindingSchemaResourceObjectRelationships
        """
        return self._relationships

    @relationships.setter
    def relationships(self, relationships):
        """Sets the relationships of this FindingSchemaResourceObject.


        :param relationships: The relationships of this FindingSchemaResourceObject.  # noqa: E501
        :type relationships: FindingSchemaResourceObjectRelationships
        """

        self._relationships = relationships

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


        :return: The type of this FindingSchemaResourceObject.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this FindingSchemaResourceObject.


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

        self._type = type

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


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

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


        :param id: The id of this FindingSchemaResourceObject.  # noqa: E501
        :type id: str
        """

        self._id = id

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

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