# 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 Field(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 = {
    }

    attribute_map = {
    }

    discriminator_value_class_map = {
            'aiText'.lower(): '#/components/schemas/Field/oneOf/0',
            'multipleAttachments'.lower(): '#/components/schemas/Field/oneOf/1',
            'autoNumber'.lower(): '#/components/schemas/Field/oneOf/2',
            'barcode'.lower(): '#/components/schemas/Field/oneOf/3',
            'button'.lower(): '#/components/schemas/Field/oneOf/4',
            'checkbox'.lower(): '#/components/schemas/Field/oneOf/5',
            'singleCollaborator'.lower(): '#/components/schemas/Field/oneOf/6',
            'multipleCollaborators'.lower(): '#/components/schemas/Field/oneOf/7',
            'count'.lower(): '#/components/schemas/Field/oneOf/8',
            'createdBy'.lower(): '#/components/schemas/Field/oneOf/9',
            'createdTime'.lower(): '#/components/schemas/Field/oneOf/10',
            'currency'.lower(): '#/components/schemas/Field/oneOf/11',
            'date'.lower(): '#/components/schemas/Field/oneOf/12',
            'dateTime'.lower(): '#/components/schemas/Field/oneOf/13',
            'duration'.lower(): '#/components/schemas/Field/oneOf/14',
            'email'.lower(): '#/components/schemas/Field/oneOf/15',
            'formula'.lower(): '#/components/schemas/Field/oneOf/16',
            'lastModifiedBy'.lower(): '#/components/schemas/Field/oneOf/17',
            'lastModifiedTime'.lower(): '#/components/schemas/Field/oneOf/18',
            'multipleRecordLinks'.lower(): '#/components/schemas/Field/oneOf/19',
            'multilineText'.lower(): '#/components/schemas/Field/oneOf/20',
            'multipleLookupValues'.lower(): '#/components/schemas/Field/oneOf/21',
            'multipleSelects'.lower(): '#/components/schemas/Field/oneOf/22',
            'number'.lower(): '#/components/schemas/Field/oneOf/23',
            'percent'.lower(): '#/components/schemas/Field/oneOf/24',
            'phoneNumber'.lower(): '#/components/schemas/Field/oneOf/25',
            'rating'.lower(): '#/components/schemas/Field/oneOf/26',
            'richText'.lower(): '#/components/schemas/Field/oneOf/27',
            'rollup'.lower(): '#/components/schemas/Field/oneOf/28',
            'singleLineText'.lower(): '#/components/schemas/Field/oneOf/29',
            'singleSelect'.lower(): '#/components/schemas/Field/oneOf/30',
            'externalSyncSource'.lower(): '#/components/schemas/Field/oneOf/31',
            'url'.lower(): '#/components/schemas/Field/oneOf/32',
    }

    def __init__(self):  # noqa: E501
        """Field - a model defined in Swagger"""  # noqa: E501
        self.discriminator = 'type'

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_value = data[self.discriminator].lower()
        return self.discriminator_value_class_map.get(discriminator_value)

    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(Field, 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, Field):
            return False

        return self.__dict__ == other.__dict__

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