# 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 Field(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 = {
        'caption': 'str',
        'currency_culture': 'str',
        'currency_symbol': 'str',
        'decimal_digits': 'int',
        'default_sort_order_ascending': 'bool',
        'display_name': 'str',
        'field_name': 'str',
        'full_field_id': 'str',
        'has_default_sort_field': 'bool',
        'field_id': 'str',
        'is_binary': 'bool',
        'is_currency': 'bool',
        'is_date_time': 'bool',
        'is_filter_allowed': 'bool',
        'is_logical': 'bool',
        'is_number': 'bool',
        'is_short_date': 'bool',
        'is_short_time': 'bool',
        'is_visible': 'bool',
        'sortable': 'bool',
        'sort_order': 'str',
        'storage_name': 'str',
        'whole_digits': 'int'
    }

    attribute_map = {
        'caption': 'caption',
        'currency_culture': 'currencyCulture',
        'currency_symbol': 'currencySymbol',
        'decimal_digits': 'decimalDigits',
        'default_sort_order_ascending': 'defaultSortOrderAscending',
        'display_name': 'displayName',
        'field_name': 'fieldName',
        'full_field_id': 'fullFieldId',
        'has_default_sort_field': 'hasDefaultSortField',
        'field_id': 'fieldId',
        'is_binary': 'isBinary',
        'is_currency': 'isCurrency',
        'is_date_time': 'isDateTime',
        'is_filter_allowed': 'isFilterAllowed',
        'is_logical': 'isLogical',
        'is_number': 'isNumber',
        'is_short_date': 'isShortDate',
        'is_short_time': 'isShortTime',
        'is_visible': 'isVisible',
        'sortable': 'sortable',
        'sort_order': 'sortOrder',
        'storage_name': 'storageName',
        'whole_digits': 'wholeDigits'
    }

    def __init__(self, caption=None, currency_culture=None, currency_symbol=None, decimal_digits=None, default_sort_order_ascending=None, display_name=None, field_name=None, full_field_id=None, has_default_sort_field=None, field_id=None, is_binary=None, is_currency=None, is_date_time=None, is_filter_allowed=None, is_logical=None, is_number=None, is_short_date=None, is_short_time=None, is_visible=None, sortable=None, sort_order=None, storage_name=None, whole_digits=None, local_vars_configuration=None):  # noqa: E501
        """Field - 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._caption = None
        self._currency_culture = None
        self._currency_symbol = None
        self._decimal_digits = None
        self._default_sort_order_ascending = None
        self._display_name = None
        self._field_name = None
        self._full_field_id = None
        self._has_default_sort_field = None
        self._field_id = None
        self._is_binary = None
        self._is_currency = None
        self._is_date_time = None
        self._is_filter_allowed = None
        self._is_logical = None
        self._is_number = None
        self._is_short_date = None
        self._is_short_time = None
        self._is_visible = None
        self._sortable = None
        self._sort_order = None
        self._storage_name = None
        self._whole_digits = None
        self.discriminator = None

        if caption is not None:
            self.caption = caption
        if currency_culture is not None:
            self.currency_culture = currency_culture
        if currency_symbol is not None:
            self.currency_symbol = currency_symbol
        if decimal_digits is not None:
            self.decimal_digits = decimal_digits
        if default_sort_order_ascending is not None:
            self.default_sort_order_ascending = default_sort_order_ascending
        if display_name is not None:
            self.display_name = display_name
        if field_name is not None:
            self.field_name = field_name
        if full_field_id is not None:
            self.full_field_id = full_field_id
        if has_default_sort_field is not None:
            self.has_default_sort_field = has_default_sort_field
        if field_id is not None:
            self.field_id = field_id
        if is_binary is not None:
            self.is_binary = is_binary
        if is_currency is not None:
            self.is_currency = is_currency
        if is_date_time is not None:
            self.is_date_time = is_date_time
        if is_filter_allowed is not None:
            self.is_filter_allowed = is_filter_allowed
        if is_logical is not None:
            self.is_logical = is_logical
        if is_number is not None:
            self.is_number = is_number
        if is_short_date is not None:
            self.is_short_date = is_short_date
        if is_short_time is not None:
            self.is_short_time = is_short_time
        if is_visible is not None:
            self.is_visible = is_visible
        if sortable is not None:
            self.sortable = sortable
        if sort_order is not None:
            self.sort_order = sort_order
        if storage_name is not None:
            self.storage_name = storage_name
        if whole_digits is not None:
            self.whole_digits = whole_digits

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


        :return: The caption of this Field.  # noqa: E501
        :rtype: str
        """
        return self._caption

    @caption.setter
    def caption(self, caption):
        """Sets the caption of this Field.


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

        self._caption = caption

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


        :return: The currency_culture of this Field.  # noqa: E501
        :rtype: str
        """
        return self._currency_culture

    @currency_culture.setter
    def currency_culture(self, currency_culture):
        """Sets the currency_culture of this Field.


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

        self._currency_culture = currency_culture

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


        :return: The currency_symbol of this Field.  # noqa: E501
        :rtype: str
        """
        return self._currency_symbol

    @currency_symbol.setter
    def currency_symbol(self, currency_symbol):
        """Sets the currency_symbol of this Field.


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

        self._currency_symbol = currency_symbol

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


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

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


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

        self._decimal_digits = decimal_digits

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


        :return: The default_sort_order_ascending of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._default_sort_order_ascending

    @default_sort_order_ascending.setter
    def default_sort_order_ascending(self, default_sort_order_ascending):
        """Sets the default_sort_order_ascending of this Field.


        :param default_sort_order_ascending: The default_sort_order_ascending of this Field.  # noqa: E501
        :type: bool
        """

        self._default_sort_order_ascending = default_sort_order_ascending

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


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

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


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

        self._display_name = display_name

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


        :return: The field_name of this Field.  # noqa: E501
        :rtype: str
        """
        return self._field_name

    @field_name.setter
    def field_name(self, field_name):
        """Sets the field_name of this Field.


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

        self._field_name = field_name

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


        :return: The full_field_id of this Field.  # noqa: E501
        :rtype: str
        """
        return self._full_field_id

    @full_field_id.setter
    def full_field_id(self, full_field_id):
        """Sets the full_field_id of this Field.


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

        self._full_field_id = full_field_id

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


        :return: The has_default_sort_field of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._has_default_sort_field

    @has_default_sort_field.setter
    def has_default_sort_field(self, has_default_sort_field):
        """Sets the has_default_sort_field of this Field.


        :param has_default_sort_field: The has_default_sort_field of this Field.  # noqa: E501
        :type: bool
        """

        self._has_default_sort_field = has_default_sort_field

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


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

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


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

        self._field_id = field_id

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


        :return: The is_binary of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_binary

    @is_binary.setter
    def is_binary(self, is_binary):
        """Sets the is_binary of this Field.


        :param is_binary: The is_binary of this Field.  # noqa: E501
        :type: bool
        """

        self._is_binary = is_binary

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


        :return: The is_currency of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_currency

    @is_currency.setter
    def is_currency(self, is_currency):
        """Sets the is_currency of this Field.


        :param is_currency: The is_currency of this Field.  # noqa: E501
        :type: bool
        """

        self._is_currency = is_currency

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


        :return: The is_date_time of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_date_time

    @is_date_time.setter
    def is_date_time(self, is_date_time):
        """Sets the is_date_time of this Field.


        :param is_date_time: The is_date_time of this Field.  # noqa: E501
        :type: bool
        """

        self._is_date_time = is_date_time

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


        :return: The is_filter_allowed of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_filter_allowed

    @is_filter_allowed.setter
    def is_filter_allowed(self, is_filter_allowed):
        """Sets the is_filter_allowed of this Field.


        :param is_filter_allowed: The is_filter_allowed of this Field.  # noqa: E501
        :type: bool
        """

        self._is_filter_allowed = is_filter_allowed

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


        :return: The is_logical of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_logical

    @is_logical.setter
    def is_logical(self, is_logical):
        """Sets the is_logical of this Field.


        :param is_logical: The is_logical of this Field.  # noqa: E501
        :type: bool
        """

        self._is_logical = is_logical

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


        :return: The is_number of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_number

    @is_number.setter
    def is_number(self, is_number):
        """Sets the is_number of this Field.


        :param is_number: The is_number of this Field.  # noqa: E501
        :type: bool
        """

        self._is_number = is_number

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


        :return: The is_short_date of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_short_date

    @is_short_date.setter
    def is_short_date(self, is_short_date):
        """Sets the is_short_date of this Field.


        :param is_short_date: The is_short_date of this Field.  # noqa: E501
        :type: bool
        """

        self._is_short_date = is_short_date

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


        :return: The is_short_time of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_short_time

    @is_short_time.setter
    def is_short_time(self, is_short_time):
        """Sets the is_short_time of this Field.


        :param is_short_time: The is_short_time of this Field.  # noqa: E501
        :type: bool
        """

        self._is_short_time = is_short_time

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


        :return: The is_visible of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._is_visible

    @is_visible.setter
    def is_visible(self, is_visible):
        """Sets the is_visible of this Field.


        :param is_visible: The is_visible of this Field.  # noqa: E501
        :type: bool
        """

        self._is_visible = is_visible

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


        :return: The sortable of this Field.  # noqa: E501
        :rtype: bool
        """
        return self._sortable

    @sortable.setter
    def sortable(self, sortable):
        """Sets the sortable of this Field.


        :param sortable: The sortable of this Field.  # noqa: E501
        :type: bool
        """

        self._sortable = sortable

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


        :return: The sort_order of this Field.  # noqa: E501
        :rtype: str
        """
        return self._sort_order

    @sort_order.setter
    def sort_order(self, sort_order):
        """Sets the sort_order of this Field.


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

        self._sort_order = sort_order

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


        :return: The storage_name of this Field.  # noqa: E501
        :rtype: str
        """
        return self._storage_name

    @storage_name.setter
    def storage_name(self, storage_name):
        """Sets the storage_name of this Field.


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

        self._storage_name = storage_name

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


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

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


        :param whole_digits: The whole_digits of this Field.  # 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, Field):
            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, Field):
            return True

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