# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    The version of the OpenAPI document: 1.106
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BTParameterSpec6(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 = {
        'localized_name': 'str',
        'localizable_name': 'str',
        'additional_localized_strings': 'int',
        'strings_to_localize': 'list[str]',
        'parameter_id': 'str',
        'parameter_name': 'str',
        'icon_uri': 'str',
        'visibility_condition': 'BTParameterVisibilityCondition177',
        'ui_hint': 'str',
        'ui_hints': 'list[str]',
        'column_name': 'str',
        'default_value': 'BTMParameter1',
        'bt_type': 'str'
    }

    attribute_map = {
        'localized_name': 'localizedName',
        'localizable_name': 'localizableName',
        'additional_localized_strings': 'additionalLocalizedStrings',
        'strings_to_localize': 'stringsToLocalize',
        'parameter_id': 'parameterId',
        'parameter_name': 'parameterName',
        'icon_uri': 'iconUri',
        'visibility_condition': 'visibilityCondition',
        'ui_hint': 'uiHint',
        'ui_hints': 'uiHints',
        'column_name': 'columnName',
        'default_value': 'defaultValue',
        'bt_type': 'btType'
    }

    discriminator_value_class_map = {
        'BTParameterSpecEnum-171': 'BTParameterSpecEnum171',
        'BTParameterSpecDerived-736': 'BTParameterSpecDerived736',
        'BTParameterSpecBoolean-170': 'BTParameterSpecBoolean170',
        'BTParameterSpecAppearance-1740': 'BTParameterSpecAppearance1740',
        'BTParameterSpecQuery-174': 'BTParameterSpecQuery174',
        'BTParameterSpecFeatureList-703': 'BTParameterSpecFeatureList703',
        'BTParameterSpecString-175': 'BTParameterSpecString175',
        'BTParameterSpecDatabase-1071': 'BTParameterSpecDatabase1071',
        'BTParameterSpecQuantity-173': 'BTParameterSpecQuantity173',
        'BTParameterSpecReference-2789': 'BTParameterSpecReference2789',
        'BTParameterSpecMaterial-2700': 'BTParameterSpecMaterial2700',
        'BTParameterSpecArray-2600': 'BTParameterSpecArray2600',
        'BTParameterSpecForeignId-172': 'BTParameterSpecForeignId172',
        'BTParameterSpecNullableQuantity-715': 'BTParameterSpecNullableQuantity715',
        'BTParameterSpecLookupTablePath-761': 'BTParameterSpecLookupTablePath761'
    }

    def __init__(self, localized_name=None, localizable_name=None, additional_localized_strings=None, strings_to_localize=None, parameter_id=None, parameter_name=None, icon_uri=None, visibility_condition=None, ui_hint=None, ui_hints=None, column_name=None, default_value=None, bt_type=None):  # noqa: E501
        """BTParameterSpec6 - a model defined in OpenAPI"""  # noqa: E501

        self._localized_name = None
        self._localizable_name = None
        self._additional_localized_strings = None
        self._strings_to_localize = None
        self._parameter_id = None
        self._parameter_name = None
        self._icon_uri = None
        self._visibility_condition = None
        self._ui_hint = None
        self._ui_hints = None
        self._column_name = None
        self._default_value = None
        self._bt_type = None
        self.discriminator = 'bt_type'

        if localized_name is not None:
            self.localized_name = localized_name
        if localizable_name is not None:
            self.localizable_name = localizable_name
        if additional_localized_strings is not None:
            self.additional_localized_strings = additional_localized_strings
        if strings_to_localize is not None:
            self.strings_to_localize = strings_to_localize
        if parameter_id is not None:
            self.parameter_id = parameter_id
        if parameter_name is not None:
            self.parameter_name = parameter_name
        if icon_uri is not None:
            self.icon_uri = icon_uri
        if visibility_condition is not None:
            self.visibility_condition = visibility_condition
        if ui_hint is not None:
            self.ui_hint = ui_hint
        if ui_hints is not None:
            self.ui_hints = ui_hints
        if column_name is not None:
            self.column_name = column_name
        if default_value is not None:
            self.default_value = default_value
        if bt_type is not None:
            self.bt_type = bt_type

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


        :return: The localized_name of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._localized_name

    @localized_name.setter
    def localized_name(self, localized_name):
        """Sets the localized_name of this BTParameterSpec6.


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

        self._localized_name = localized_name

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


        :return: The localizable_name of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._localizable_name

    @localizable_name.setter
    def localizable_name(self, localizable_name):
        """Sets the localizable_name of this BTParameterSpec6.


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

        self._localizable_name = localizable_name

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


        :return: The additional_localized_strings of this BTParameterSpec6.  # noqa: E501
        :rtype: int
        """
        return self._additional_localized_strings

    @additional_localized_strings.setter
    def additional_localized_strings(self, additional_localized_strings):
        """Sets the additional_localized_strings of this BTParameterSpec6.


        :param additional_localized_strings: The additional_localized_strings of this BTParameterSpec6.  # noqa: E501
        :type: int
        """

        self._additional_localized_strings = additional_localized_strings

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


        :return: The strings_to_localize of this BTParameterSpec6.  # noqa: E501
        :rtype: list[str]
        """
        return self._strings_to_localize

    @strings_to_localize.setter
    def strings_to_localize(self, strings_to_localize):
        """Sets the strings_to_localize of this BTParameterSpec6.


        :param strings_to_localize: The strings_to_localize of this BTParameterSpec6.  # noqa: E501
        :type: list[str]
        """

        self._strings_to_localize = strings_to_localize

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


        :return: The parameter_id of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._parameter_id

    @parameter_id.setter
    def parameter_id(self, parameter_id):
        """Sets the parameter_id of this BTParameterSpec6.


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

        self._parameter_id = parameter_id

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


        :return: The parameter_name of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._parameter_name

    @parameter_name.setter
    def parameter_name(self, parameter_name):
        """Sets the parameter_name of this BTParameterSpec6.


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

        self._parameter_name = parameter_name

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


        :return: The icon_uri of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._icon_uri

    @icon_uri.setter
    def icon_uri(self, icon_uri):
        """Sets the icon_uri of this BTParameterSpec6.


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

        self._icon_uri = icon_uri

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


        :return: The visibility_condition of this BTParameterSpec6.  # noqa: E501
        :rtype: BTParameterVisibilityCondition177
        """
        return self._visibility_condition

    @visibility_condition.setter
    def visibility_condition(self, visibility_condition):
        """Sets the visibility_condition of this BTParameterSpec6.


        :param visibility_condition: The visibility_condition of this BTParameterSpec6.  # noqa: E501
        :type: BTParameterVisibilityCondition177
        """

        self._visibility_condition = visibility_condition

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


        :return: The ui_hint of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._ui_hint

    @ui_hint.setter
    def ui_hint(self, ui_hint):
        """Sets the ui_hint of this BTParameterSpec6.


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

        self._ui_hint = ui_hint

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


        :return: The ui_hints of this BTParameterSpec6.  # noqa: E501
        :rtype: list[str]
        """
        return self._ui_hints

    @ui_hints.setter
    def ui_hints(self, ui_hints):
        """Sets the ui_hints of this BTParameterSpec6.


        :param ui_hints: The ui_hints of this BTParameterSpec6.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["OPPOSITE_DIRECTION", "ALWAYS_HIDDEN", "SHOW_CREATE_SELECTION", "CONTROL_VISIBILITY", "NO_PREVIEW_PROVIDED", "REMEMBER_PREVIOUS_VALUE", "DISPLAY_SHORT", "ALLOW_FEATURE_SELECTION", "MATE_CONNECTOR_AXIS_TYPE", "PRIMARY_AXIS", "SHOW_EXPRESSION", "OPPOSITE_DIRECTION_CIRCULAR", "SHOW_LABEL", "HORIZONTAL_ENUM", "UNCONFIGURABLE", "MATCH_LAST_ARRAY_ITEM", "COLLAPSE_ARRAY_ITEMS", "INITIAL_FOCUS_ON_EDIT", "INITIAL_FOCUS", "DISPLAY_CURRENT_VALUE_ONLY", "READ_ONLY", "PREVENT_CREATING_NEW_MATE_CONNECTORS", "FIRST_IN_ROW", "ALLOW_QUERY_ORDER", "PREVENT_ARRAY_REORDER", "UNKNOWN"]  # noqa: E501
        if not set(ui_hints).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `ui_hints` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(ui_hints) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._ui_hints = ui_hints

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


        :return: The column_name of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._column_name

    @column_name.setter
    def column_name(self, column_name):
        """Sets the column_name of this BTParameterSpec6.


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

        self._column_name = column_name

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


        :return: The default_value of this BTParameterSpec6.  # noqa: E501
        :rtype: BTMParameter1
        """
        return self._default_value

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


        :param default_value: The default_value of this BTParameterSpec6.  # noqa: E501
        :type: BTMParameter1
        """

        self._default_value = default_value

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


        :return: The bt_type of this BTParameterSpec6.  # noqa: E501
        :rtype: str
        """
        return self._bt_type

    @bt_type.setter
    def bt_type(self, bt_type):
        """Sets the bt_type of this BTParameterSpec6.


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

        self._bt_type = bt_type

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_key = self.attribute_map[self.discriminator]
        discriminator_value = data[discriminator_key]
        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.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, BTParameterSpec6):
            return False

        return self.__dict__ == other.__dict__

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