# coding: utf-8

"""
    Airtable API

    OpenAPI spec for Airtable's REST API  # noqa: E501

    OpenAPI spec version: 2024-12-27
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class TableIdOrNameRecordIdBody(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'return_fields_by_field_id': 'bool',
        'typecast': 'bool',
        'fields': 'dict(str, object)'
    }

    attribute_map = {
        'return_fields_by_field_id': 'returnFieldsByFieldId',
        'typecast': 'typecast',
        'fields': 'fields'
    }

    def __init__(self, return_fields_by_field_id=False, typecast=False, fields=None):  # noqa: E501
        """TableIdOrNameRecordIdBody - a model defined in Swagger"""  # noqa: E501
        self._return_fields_by_field_id = None
        self._typecast = None
        self._fields = None
        self.discriminator = None
        if return_fields_by_field_id is not None:
            self.return_fields_by_field_id = return_fields_by_field_id
        if typecast is not None:
            self.typecast = typecast
        self.fields = fields

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

        An optional boolean value that lets you return field objects keyed by the field id. This defaults to false, which returns field objects where the key is the field name.  # noqa: E501

        :return: The return_fields_by_field_id of this TableIdOrNameRecordIdBody.  # noqa: E501
        :rtype: bool
        """
        return self._return_fields_by_field_id

    @return_fields_by_field_id.setter
    def return_fields_by_field_id(self, return_fields_by_field_id):
        """Sets the return_fields_by_field_id of this TableIdOrNameRecordIdBody.

        An optional boolean value that lets you return field objects keyed by the field id. This defaults to false, which returns field objects where the key is the field name.  # noqa: E501

        :param return_fields_by_field_id: The return_fields_by_field_id of this TableIdOrNameRecordIdBody.  # noqa: E501
        :type: bool
        """

        self._return_fields_by_field_id = return_fields_by_field_id

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

        The Airtable API will perform best-effort automatic data conversion from string values if the typecast parameter is passed in. Automatic conversion is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources.  # noqa: E501

        :return: The typecast of this TableIdOrNameRecordIdBody.  # noqa: E501
        :rtype: bool
        """
        return self._typecast

    @typecast.setter
    def typecast(self, typecast):
        """Sets the typecast of this TableIdOrNameRecordIdBody.

        The Airtable API will perform best-effort automatic data conversion from string values if the typecast parameter is passed in. Automatic conversion is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources.  # noqa: E501

        :param typecast: The typecast of this TableIdOrNameRecordIdBody.  # noqa: E501
        :type: bool
        """

        self._typecast = typecast

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

        Cell values keyed by field name or field id  # noqa: E501

        :return: The fields of this TableIdOrNameRecordIdBody.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._fields

    @fields.setter
    def fields(self, fields):
        """Sets the fields of this TableIdOrNameRecordIdBody.

        Cell values keyed by field name or field id  # noqa: E501

        :param fields: The fields of this TableIdOrNameRecordIdBody.  # noqa: E501
        :type: dict(str, object)
        """
        if fields is None:
            raise ValueError("Invalid value for `fields`, must not be `None`")  # noqa: E501

        self._fields = fields

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(TableIdOrNameRecordIdBody, dict):
            for key, value in self.items():
                result[key] = 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, TableIdOrNameRecordIdBody):
            return False

        return self.__dict__ == other.__dict__

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