# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class MetadataFieldType(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 = {
        'origin': 'str',
        'index': 'str',
        'full_text': 'bool',
        'float_restriction': 'MetadataFieldFloatType',
        'name': 'str',
        'constraint': 'MetadataFieldTypeConstraint',
        'data': 'list[KeyValuePairType]',
        'default_value': 'str',
        'inheritance': 'str',
        'system': 'str',
        'long_restriction': 'MetadataFieldLongType',
        'boost': 'float',
        'values': 'SimpleMetadataType',
        'sortable': 'bool',
        'integer_restriction': 'MetadataFieldIntegerType',
        'external_id': 'list[str]',
        'type': 'str',
        'string_restriction': 'MetadataFieldStringType',
        'schema': 'MetadataSchemaElementType'
    }

    attribute_map = {
        'origin': 'origin',
        'index': 'index',
        'full_text': 'fullText',
        'float_restriction': 'floatRestriction',
        'name': 'name',
        'constraint': 'constraint',
        'data': 'data',
        'default_value': 'defaultValue',
        'inheritance': 'inheritance',
        'system': 'system',
        'long_restriction': 'longRestriction',
        'boost': 'boost',
        'values': 'values',
        'sortable': 'sortable',
        'integer_restriction': 'integerRestriction',
        'external_id': 'externalId',
        'type': 'type',
        'string_restriction': 'stringRestriction',
        'schema': 'schema'
    }

    def __init__(self, origin=None, index=None, full_text=None, float_restriction=None, name=None, constraint=None, data=None, default_value=None, inheritance=None, system=None, long_restriction=None, boost=None, values=None, sortable=None, integer_restriction=None, external_id=None, type=None, string_restriction=None, schema=None):  # noqa: E501
        """MetadataFieldType - a model defined in OpenAPI"""  # noqa: E501

        self._origin = None
        self._index = None
        self._full_text = None
        self._float_restriction = None
        self._name = None
        self._constraint = None
        self._data = None
        self._default_value = None
        self._inheritance = None
        self._system = None
        self._long_restriction = None
        self._boost = None
        self._values = None
        self._sortable = None
        self._integer_restriction = None
        self._external_id = None
        self._type = None
        self._string_restriction = None
        self._schema = None
        self.discriminator = None

        if origin is not None:
            self.origin = origin
        if index is not None:
            self.index = index
        if full_text is not None:
            self.full_text = full_text
        if float_restriction is not None:
            self.float_restriction = float_restriction
        if name is not None:
            self.name = name
        if constraint is not None:
            self.constraint = constraint
        if data is not None:
            self.data = data
        if default_value is not None:
            self.default_value = default_value
        if inheritance is not None:
            self.inheritance = inheritance
        if system is not None:
            self.system = system
        if long_restriction is not None:
            self.long_restriction = long_restriction
        if boost is not None:
            self.boost = boost
        if values is not None:
            self.values = values
        if sortable is not None:
            self.sortable = sortable
        if integer_restriction is not None:
            self.integer_restriction = integer_restriction
        if external_id is not None:
            self.external_id = external_id
        if type is not None:
            self.type = type
        if string_restriction is not None:
            self.string_restriction = string_restriction
        if schema is not None:
            self.schema = schema

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


        :return: The origin of this MetadataFieldType.  # noqa: E501
        :rtype: str
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this MetadataFieldType.


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

        self._origin = origin

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


        :return: The index of this MetadataFieldType.  # noqa: E501
        :rtype: str
        """
        return self._index

    @index.setter
    def index(self, index):
        """Sets the index of this MetadataFieldType.


        :param index: The index of this MetadataFieldType.  # noqa: E501
        :type: str
        """
        allowed_values = ["noindex", "index", "extend"]  # noqa: E501
        if index not in allowed_values:
            raise ValueError(
                "Invalid value for `index` ({0}), must be one of {1}"  # noqa: E501
                .format(index, allowed_values)
            )

        self._index = index

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


        :return: The full_text of this MetadataFieldType.  # noqa: E501
        :rtype: bool
        """
        return self._full_text

    @full_text.setter
    def full_text(self, full_text):
        """Sets the full_text of this MetadataFieldType.


        :param full_text: The full_text of this MetadataFieldType.  # noqa: E501
        :type: bool
        """

        self._full_text = full_text

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


        :return: The float_restriction of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataFieldFloatType
        """
        return self._float_restriction

    @float_restriction.setter
    def float_restriction(self, float_restriction):
        """Sets the float_restriction of this MetadataFieldType.


        :param float_restriction: The float_restriction of this MetadataFieldType.  # noqa: E501
        :type: MetadataFieldFloatType
        """

        self._float_restriction = float_restriction

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


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

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


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

        self._name = name

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


        :return: The constraint of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataFieldTypeConstraint
        """
        return self._constraint

    @constraint.setter
    def constraint(self, constraint):
        """Sets the constraint of this MetadataFieldType.


        :param constraint: The constraint of this MetadataFieldType.  # noqa: E501
        :type: MetadataFieldTypeConstraint
        """

        self._constraint = constraint

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


        :return: The data of this MetadataFieldType.  # noqa: E501
        :rtype: list[KeyValuePairType]
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this MetadataFieldType.


        :param data: The data of this MetadataFieldType.  # noqa: E501
        :type: list[KeyValuePairType]
        """

        self._data = data

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


        :return: The default_value of this MetadataFieldType.  # noqa: E501
        :rtype: str
        """
        return self._default_value

    @default_value.setter
    def default_value(self, default_value):
        """Sets the default_value of this MetadataFieldType.


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

        self._default_value = default_value

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


        :return: The inheritance of this MetadataFieldType.  # noqa: E501
        :rtype: str
        """
        return self._inheritance

    @inheritance.setter
    def inheritance(self, inheritance):
        """Sets the inheritance of this MetadataFieldType.


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

        self._inheritance = inheritance

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


        :return: The system of this MetadataFieldType.  # noqa: E501
        :rtype: str
        """
        return self._system

    @system.setter
    def system(self, system):
        """Sets the system of this MetadataFieldType.


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

        self._system = system

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


        :return: The long_restriction of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataFieldLongType
        """
        return self._long_restriction

    @long_restriction.setter
    def long_restriction(self, long_restriction):
        """Sets the long_restriction of this MetadataFieldType.


        :param long_restriction: The long_restriction of this MetadataFieldType.  # noqa: E501
        :type: MetadataFieldLongType
        """

        self._long_restriction = long_restriction

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


        :return: The boost of this MetadataFieldType.  # noqa: E501
        :rtype: float
        """
        return self._boost

    @boost.setter
    def boost(self, boost):
        """Sets the boost of this MetadataFieldType.


        :param boost: The boost of this MetadataFieldType.  # noqa: E501
        :type: float
        """

        self._boost = boost

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


        :return: The values of this MetadataFieldType.  # noqa: E501
        :rtype: SimpleMetadataType
        """
        return self._values

    @values.setter
    def values(self, values):
        """Sets the values of this MetadataFieldType.


        :param values: The values of this MetadataFieldType.  # noqa: E501
        :type: SimpleMetadataType
        """

        self._values = values

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


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

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


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

        self._sortable = sortable

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


        :return: The integer_restriction of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataFieldIntegerType
        """
        return self._integer_restriction

    @integer_restriction.setter
    def integer_restriction(self, integer_restriction):
        """Sets the integer_restriction of this MetadataFieldType.


        :param integer_restriction: The integer_restriction of this MetadataFieldType.  # noqa: E501
        :type: MetadataFieldIntegerType
        """

        self._integer_restriction = integer_restriction

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


        :return: The external_id of this MetadataFieldType.  # noqa: E501
        :rtype: list[str]
        """
        return self._external_id

    @external_id.setter
    def external_id(self, external_id):
        """Sets the external_id of this MetadataFieldType.


        :param external_id: The external_id of this MetadataFieldType.  # noqa: E501
        :type: list[str]
        """

        self._external_id = external_id

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


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

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


        :param type: The type of this MetadataFieldType.  # noqa: E501
        :type: str
        """
        allowed_values = ["date", "date-noindex", "date-sortable", "float", "float-noindex", "float-sortable", "integer", "integer-noindex", "integer-sortable", "long", "long-noindex", "string", "string-sortable", "string-exact", "string-exact-sortable", "string-noindex", "boolean", "boolean-noindex", "timeCode", "timeCode-noindex"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The string_restriction of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataFieldStringType
        """
        return self._string_restriction

    @string_restriction.setter
    def string_restriction(self, string_restriction):
        """Sets the string_restriction of this MetadataFieldType.


        :param string_restriction: The string_restriction of this MetadataFieldType.  # noqa: E501
        :type: MetadataFieldStringType
        """

        self._string_restriction = string_restriction

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


        :return: The schema of this MetadataFieldType.  # noqa: E501
        :rtype: MetadataSchemaElementType
        """
        return self._schema

    @schema.setter
    def schema(self, schema):
        """Sets the schema of this MetadataFieldType.


        :param schema: The schema of this MetadataFieldType.  # noqa: E501
        :type: MetadataSchemaElementType
        """

        self._schema = schema

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

        return self.__dict__ == other.__dict__

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