# 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 FieldDefinition(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 = {
        'auto_fill': 'bool',
        'calculated': 'bool',
        'category': 'str',
        'decimal_digits': 'int',
        'description': 'str',
        'details': 'str',
        'display_name': 'str',
        'enabled': 'bool',
        'field_id': 'str',
        'has_date': 'bool',
        'has_time': 'bool',
        'is_full_text_searchable': 'bool',
        'maximum_size': 'str',
        'name': 'str',
        'read_only': 'bool',
        'required': 'bool',
        'type': 'str',
        'type_localized': 'str',
        'validated': 'bool',
        'whole_digits': 'int'
    }

    attribute_map = {
        'auto_fill': 'autoFill',
        'calculated': 'calculated',
        'category': 'category',
        'decimal_digits': 'decimalDigits',
        'description': 'description',
        'details': 'details',
        'display_name': 'displayName',
        'enabled': 'enabled',
        'field_id': 'fieldId',
        'has_date': 'hasDate',
        'has_time': 'hasTime',
        'is_full_text_searchable': 'isFullTextSearchable',
        'maximum_size': 'maximumSize',
        'name': 'name',
        'read_only': 'readOnly',
        'required': 'required',
        'type': 'type',
        'type_localized': 'typeLocalized',
        'validated': 'validated',
        'whole_digits': 'wholeDigits'
    }

    def __init__(self, auto_fill=None, calculated=None, category=None, decimal_digits=None, description=None, details=None, display_name=None, enabled=None, field_id=None, has_date=None, has_time=None, is_full_text_searchable=None, maximum_size=None, name=None, read_only=None, required=None, type=None, type_localized=None, validated=None, whole_digits=None, local_vars_configuration=None):  # noqa: E501
        """FieldDefinition - 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._auto_fill = None
        self._calculated = None
        self._category = None
        self._decimal_digits = None
        self._description = None
        self._details = None
        self._display_name = None
        self._enabled = None
        self._field_id = None
        self._has_date = None
        self._has_time = None
        self._is_full_text_searchable = None
        self._maximum_size = None
        self._name = None
        self._read_only = None
        self._required = None
        self._type = None
        self._type_localized = None
        self._validated = None
        self._whole_digits = None
        self.discriminator = None

        if auto_fill is not None:
            self.auto_fill = auto_fill
        if calculated is not None:
            self.calculated = calculated
        if category is not None:
            self.category = category
        if decimal_digits is not None:
            self.decimal_digits = decimal_digits
        if description is not None:
            self.description = description
        if details is not None:
            self.details = details
        if display_name is not None:
            self.display_name = display_name
        if enabled is not None:
            self.enabled = enabled
        if field_id is not None:
            self.field_id = field_id
        if has_date is not None:
            self.has_date = has_date
        if has_time is not None:
            self.has_time = has_time
        if is_full_text_searchable is not None:
            self.is_full_text_searchable = is_full_text_searchable
        if maximum_size is not None:
            self.maximum_size = maximum_size
        if name is not None:
            self.name = name
        if read_only is not None:
            self.read_only = read_only
        if required is not None:
            self.required = required
        if type is not None:
            self.type = type
        if type_localized is not None:
            self.type_localized = type_localized
        if validated is not None:
            self.validated = validated
        if whole_digits is not None:
            self.whole_digits = whole_digits

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


        :return: The auto_fill of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._auto_fill

    @auto_fill.setter
    def auto_fill(self, auto_fill):
        """Sets the auto_fill of this FieldDefinition.


        :param auto_fill: The auto_fill of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._auto_fill = auto_fill

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


        :return: The calculated of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._calculated

    @calculated.setter
    def calculated(self, calculated):
        """Sets the calculated of this FieldDefinition.


        :param calculated: The calculated of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._calculated = calculated

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


        :return: The category of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this FieldDefinition.


        :param category: The category of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._category = category

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


        :return: The decimal_digits of this FieldDefinition.  # noqa: E501
        :rtype: int
        """
        return self._decimal_digits

    @decimal_digits.setter
    def decimal_digits(self, decimal_digits):
        """Sets the decimal_digits of this FieldDefinition.


        :param decimal_digits: The decimal_digits of this FieldDefinition.  # noqa: E501
        :type: int
        """

        self._decimal_digits = decimal_digits

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


        :return: The description of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this FieldDefinition.


        :param description: The description of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The details of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._details

    @details.setter
    def details(self, details):
        """Sets the details of this FieldDefinition.


        :param details: The details of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._details = details

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


        :return: The display_name of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this FieldDefinition.


        :param display_name: The display_name of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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


        :return: The enabled of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this FieldDefinition.


        :param enabled: The enabled of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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


        :return: The field_id of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._field_id

    @field_id.setter
    def field_id(self, field_id):
        """Sets the field_id of this FieldDefinition.


        :param field_id: The field_id of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._field_id = field_id

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


        :return: The has_date of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._has_date

    @has_date.setter
    def has_date(self, has_date):
        """Sets the has_date of this FieldDefinition.


        :param has_date: The has_date of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._has_date = has_date

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


        :return: The has_time of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._has_time

    @has_time.setter
    def has_time(self, has_time):
        """Sets the has_time of this FieldDefinition.


        :param has_time: The has_time of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._has_time = has_time

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


        :return: The is_full_text_searchable of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._is_full_text_searchable

    @is_full_text_searchable.setter
    def is_full_text_searchable(self, is_full_text_searchable):
        """Sets the is_full_text_searchable of this FieldDefinition.


        :param is_full_text_searchable: The is_full_text_searchable of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._is_full_text_searchable = is_full_text_searchable

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


        :return: The maximum_size of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._maximum_size

    @maximum_size.setter
    def maximum_size(self, maximum_size):
        """Sets the maximum_size of this FieldDefinition.


        :param maximum_size: The maximum_size of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._maximum_size = maximum_size

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


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

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


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

        self._name = name

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


        :return: The read_only of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this FieldDefinition.


        :param read_only: The read_only of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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


        :return: The required of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._required

    @required.setter
    def required(self, required):
        """Sets the required of this FieldDefinition.


        :param required: The required of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._required = required

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


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

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


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

        self._type = type

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


        :return: The type_localized of this FieldDefinition.  # noqa: E501
        :rtype: str
        """
        return self._type_localized

    @type_localized.setter
    def type_localized(self, type_localized):
        """Sets the type_localized of this FieldDefinition.


        :param type_localized: The type_localized of this FieldDefinition.  # noqa: E501
        :type: str
        """

        self._type_localized = type_localized

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


        :return: The validated of this FieldDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._validated

    @validated.setter
    def validated(self, validated):
        """Sets the validated of this FieldDefinition.


        :param validated: The validated of this FieldDefinition.  # noqa: E501
        :type: bool
        """

        self._validated = validated

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


        :return: The whole_digits of this FieldDefinition.  # noqa: E501
        :rtype: int
        """
        return self._whole_digits

    @whole_digits.setter
    def whole_digits(self, whole_digits):
        """Sets the whole_digits of this FieldDefinition.


        :param whole_digits: The whole_digits of this FieldDefinition.  # noqa: E501
        :type: int
        """

        self._whole_digits = whole_digits

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

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