# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pycherwell.configuration import Configuration


class SchemaResponse(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 = {
        'bus_ob_id': 'str',
        'field_definitions': 'list[FieldDefinition]',
        'first_rec_id_field': 'str',
        'grid_definitions': 'list[GridDefinition]',
        'name': 'str',
        'rec_id_fields': 'str',
        'relationships': 'list[Relationship]',
        'state_field_id': 'str',
        'states': 'str',
        'error_code': 'str',
        'error_message': 'str',
        'has_error': 'bool'
    }

    attribute_map = {
        'bus_ob_id': 'busObId',
        'field_definitions': 'fieldDefinitions',
        'first_rec_id_field': 'firstRecIdField',
        'grid_definitions': 'gridDefinitions',
        'name': 'name',
        'rec_id_fields': 'recIdFields',
        'relationships': 'relationships',
        'state_field_id': 'stateFieldId',
        'states': 'states',
        'error_code': 'errorCode',
        'error_message': 'errorMessage',
        'has_error': 'hasError'
    }

    def __init__(self, bus_ob_id=None, field_definitions=None, first_rec_id_field=None, grid_definitions=None, name=None, rec_id_fields=None, relationships=None, state_field_id=None, states=None, error_code=None, error_message=None, has_error=None, local_vars_configuration=None):  # noqa: E501
        """SchemaResponse - 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._bus_ob_id = None
        self._field_definitions = None
        self._first_rec_id_field = None
        self._grid_definitions = None
        self._name = None
        self._rec_id_fields = None
        self._relationships = None
        self._state_field_id = None
        self._states = None
        self._error_code = None
        self._error_message = None
        self._has_error = None
        self.discriminator = None

        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if field_definitions is not None:
            self.field_definitions = field_definitions
        if first_rec_id_field is not None:
            self.first_rec_id_field = first_rec_id_field
        if grid_definitions is not None:
            self.grid_definitions = grid_definitions
        if name is not None:
            self.name = name
        if rec_id_fields is not None:
            self.rec_id_fields = rec_id_fields
        if relationships is not None:
            self.relationships = relationships
        if state_field_id is not None:
            self.state_field_id = state_field_id
        if states is not None:
            self.states = states
        if error_code is not None:
            self.error_code = error_code
        if error_message is not None:
            self.error_message = error_message
        if has_error is not None:
            self.has_error = has_error

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


        :return: The bus_ob_id of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_id

    @bus_ob_id.setter
    def bus_ob_id(self, bus_ob_id):
        """Sets the bus_ob_id of this SchemaResponse.


        :param bus_ob_id: The bus_ob_id of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._bus_ob_id = bus_ob_id

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


        :return: The field_definitions of this SchemaResponse.  # noqa: E501
        :rtype: list[FieldDefinition]
        """
        return self._field_definitions

    @field_definitions.setter
    def field_definitions(self, field_definitions):
        """Sets the field_definitions of this SchemaResponse.


        :param field_definitions: The field_definitions of this SchemaResponse.  # noqa: E501
        :type: list[FieldDefinition]
        """

        self._field_definitions = field_definitions

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


        :return: The first_rec_id_field of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._first_rec_id_field

    @first_rec_id_field.setter
    def first_rec_id_field(self, first_rec_id_field):
        """Sets the first_rec_id_field of this SchemaResponse.


        :param first_rec_id_field: The first_rec_id_field of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._first_rec_id_field = first_rec_id_field

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


        :return: The grid_definitions of this SchemaResponse.  # noqa: E501
        :rtype: list[GridDefinition]
        """
        return self._grid_definitions

    @grid_definitions.setter
    def grid_definitions(self, grid_definitions):
        """Sets the grid_definitions of this SchemaResponse.


        :param grid_definitions: The grid_definitions of this SchemaResponse.  # noqa: E501
        :type: list[GridDefinition]
        """

        self._grid_definitions = grid_definitions

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


        :return: The name of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this SchemaResponse.


        :param name: The name of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The rec_id_fields of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._rec_id_fields

    @rec_id_fields.setter
    def rec_id_fields(self, rec_id_fields):
        """Sets the rec_id_fields of this SchemaResponse.


        :param rec_id_fields: The rec_id_fields of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._rec_id_fields = rec_id_fields

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


        :return: The relationships of this SchemaResponse.  # noqa: E501
        :rtype: list[Relationship]
        """
        return self._relationships

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


        :param relationships: The relationships of this SchemaResponse.  # noqa: E501
        :type: list[Relationship]
        """

        self._relationships = relationships

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


        :return: The state_field_id of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._state_field_id

    @state_field_id.setter
    def state_field_id(self, state_field_id):
        """Sets the state_field_id of this SchemaResponse.


        :param state_field_id: The state_field_id of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._state_field_id = state_field_id

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


        :return: The states of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._states

    @states.setter
    def states(self, states):
        """Sets the states of this SchemaResponse.


        :param states: The states of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._states = states

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


        :return: The error_code of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this SchemaResponse.


        :param error_code: The error_code of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._error_code = error_code

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


        :return: The error_message of this SchemaResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this SchemaResponse.


        :param error_message: The error_message of this SchemaResponse.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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


        :return: The has_error of this SchemaResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_error

    @has_error.setter
    def has_error(self, has_error):
        """Sets the has_error of this SchemaResponse.


        :param has_error: The has_error of this SchemaResponse.  # noqa: E501
        :type: bool
        """

        self._has_error = has_error

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

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