# 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 Prompt(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 = {
        'allow_values_only': 'bool',
        'bus_ob_id': 'str',
        'collection_store_entire_row': 'str',
        'collection_value_field': 'str',
        'constraint_xml': 'str',
        'contents': 'str',
        'default': 'str',
        'field_id': 'str',
        'is_date_range': 'bool',
        'list_display_option': 'str',
        'list_return_field_id': 'str',
        'multi_line': 'bool',
        'prompt_id': 'str',
        'prompt_type': 'str',
        'prompt_type_name': 'str',
        'required': 'bool',
        'text': 'str',
        'value': 'object',
        'values': 'list[str]'
    }

    attribute_map = {
        'allow_values_only': 'allowValuesOnly',
        'bus_ob_id': 'busObId',
        'collection_store_entire_row': 'collectionStoreEntireRow',
        'collection_value_field': 'collectionValueField',
        'constraint_xml': 'constraintXml',
        'contents': 'contents',
        'default': 'default',
        'field_id': 'fieldId',
        'is_date_range': 'isDateRange',
        'list_display_option': 'listDisplayOption',
        'list_return_field_id': 'listReturnFieldId',
        'multi_line': 'multiLine',
        'prompt_id': 'promptId',
        'prompt_type': 'promptType',
        'prompt_type_name': 'promptTypeName',
        'required': 'required',
        'text': 'text',
        'value': 'value',
        'values': 'values'
    }

    def __init__(self, allow_values_only=None, bus_ob_id=None, collection_store_entire_row=None, collection_value_field=None, constraint_xml=None, contents=None, default=None, field_id=None, is_date_range=None, list_display_option=None, list_return_field_id=None, multi_line=None, prompt_id=None, prompt_type=None, prompt_type_name=None, required=None, text=None, value=None, values=None, local_vars_configuration=None):  # noqa: E501
        """Prompt - 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._allow_values_only = None
        self._bus_ob_id = None
        self._collection_store_entire_row = None
        self._collection_value_field = None
        self._constraint_xml = None
        self._contents = None
        self._default = None
        self._field_id = None
        self._is_date_range = None
        self._list_display_option = None
        self._list_return_field_id = None
        self._multi_line = None
        self._prompt_id = None
        self._prompt_type = None
        self._prompt_type_name = None
        self._required = None
        self._text = None
        self._value = None
        self._values = None
        self.discriminator = None

        if allow_values_only is not None:
            self.allow_values_only = allow_values_only
        if bus_ob_id is not None:
            self.bus_ob_id = bus_ob_id
        if collection_store_entire_row is not None:
            self.collection_store_entire_row = collection_store_entire_row
        if collection_value_field is not None:
            self.collection_value_field = collection_value_field
        if constraint_xml is not None:
            self.constraint_xml = constraint_xml
        if contents is not None:
            self.contents = contents
        if default is not None:
            self.default = default
        if field_id is not None:
            self.field_id = field_id
        if is_date_range is not None:
            self.is_date_range = is_date_range
        if list_display_option is not None:
            self.list_display_option = list_display_option
        if list_return_field_id is not None:
            self.list_return_field_id = list_return_field_id
        if multi_line is not None:
            self.multi_line = multi_line
        if prompt_id is not None:
            self.prompt_id = prompt_id
        if prompt_type is not None:
            self.prompt_type = prompt_type
        if prompt_type_name is not None:
            self.prompt_type_name = prompt_type_name
        if required is not None:
            self.required = required
        if text is not None:
            self.text = text
        if value is not None:
            self.value = value
        if values is not None:
            self.values = values

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


        :return: The allow_values_only of this Prompt.  # noqa: E501
        :rtype: bool
        """
        return self._allow_values_only

    @allow_values_only.setter
    def allow_values_only(self, allow_values_only):
        """Sets the allow_values_only of this Prompt.


        :param allow_values_only: The allow_values_only of this Prompt.  # noqa: E501
        :type: bool
        """

        self._allow_values_only = allow_values_only

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


        :return: The bus_ob_id of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._bus_ob_id

    @bus_ob_id.setter
    def bus_ob_id(self, bus_ob_id):
        """Sets the bus_ob_id of this Prompt.


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

        self._bus_ob_id = bus_ob_id

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


        :return: The collection_store_entire_row of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._collection_store_entire_row

    @collection_store_entire_row.setter
    def collection_store_entire_row(self, collection_store_entire_row):
        """Sets the collection_store_entire_row of this Prompt.


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

        self._collection_store_entire_row = collection_store_entire_row

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


        :return: The collection_value_field of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._collection_value_field

    @collection_value_field.setter
    def collection_value_field(self, collection_value_field):
        """Sets the collection_value_field of this Prompt.


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

        self._collection_value_field = collection_value_field

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


        :return: The constraint_xml of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._constraint_xml

    @constraint_xml.setter
    def constraint_xml(self, constraint_xml):
        """Sets the constraint_xml of this Prompt.


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

        self._constraint_xml = constraint_xml

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


        :return: The contents of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._contents

    @contents.setter
    def contents(self, contents):
        """Sets the contents of this Prompt.


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

        self._contents = contents

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


        :return: The default of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this Prompt.


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

        self._default = default

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


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

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


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

        self._field_id = field_id

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


        :return: The is_date_range of this Prompt.  # noqa: E501
        :rtype: bool
        """
        return self._is_date_range

    @is_date_range.setter
    def is_date_range(self, is_date_range):
        """Sets the is_date_range of this Prompt.


        :param is_date_range: The is_date_range of this Prompt.  # noqa: E501
        :type: bool
        """

        self._is_date_range = is_date_range

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


        :return: The list_display_option of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._list_display_option

    @list_display_option.setter
    def list_display_option(self, list_display_option):
        """Sets the list_display_option of this Prompt.


        :param list_display_option: The list_display_option of this Prompt.  # noqa: E501
        :type: str
        """
        allowed_values = ["Auto", "Text", "Combo", "GridList", "SimpleList", "PromptSimpleGrid"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and list_display_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `list_display_option` ({0}), must be one of {1}"  # noqa: E501
                .format(list_display_option, allowed_values)
            )

        self._list_display_option = list_display_option

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


        :return: The list_return_field_id of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._list_return_field_id

    @list_return_field_id.setter
    def list_return_field_id(self, list_return_field_id):
        """Sets the list_return_field_id of this Prompt.


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

        self._list_return_field_id = list_return_field_id

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


        :return: The multi_line of this Prompt.  # noqa: E501
        :rtype: bool
        """
        return self._multi_line

    @multi_line.setter
    def multi_line(self, multi_line):
        """Sets the multi_line of this Prompt.


        :param multi_line: The multi_line of this Prompt.  # noqa: E501
        :type: bool
        """

        self._multi_line = multi_line

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


        :return: The prompt_id of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._prompt_id

    @prompt_id.setter
    def prompt_id(self, prompt_id):
        """Sets the prompt_id of this Prompt.


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

        self._prompt_id = prompt_id

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


        :return: The prompt_type of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._prompt_type

    @prompt_type.setter
    def prompt_type(self, prompt_type):
        """Sets the prompt_type of this Prompt.


        :param prompt_type: The prompt_type of this Prompt.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Text", "Number", "DateTime", "Logical", "Binary", "DateOnly", "TimeOnly", "Json", "JsonArray", "Xml", "XmlCollection", "TimeValue"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and prompt_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `prompt_type` ({0}), must be one of {1}"  # noqa: E501
                .format(prompt_type, allowed_values)
            )

        self._prompt_type = prompt_type

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


        :return: The prompt_type_name of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._prompt_type_name

    @prompt_type_name.setter
    def prompt_type_name(self, prompt_type_name):
        """Sets the prompt_type_name of this Prompt.


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

        self._prompt_type_name = prompt_type_name

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


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

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


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

        self._required = required

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


        :return: The text of this Prompt.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this Prompt.


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

        self._text = text

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


        :return: The value of this Prompt.  # noqa: E501
        :rtype: object
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this Prompt.


        :param value: The value of this Prompt.  # noqa: E501
        :type: object
        """

        self._value = value

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


        :return: The values of this Prompt.  # noqa: E501
        :rtype: list[str]
        """
        return self._values

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


        :param values: The values of this Prompt.  # noqa: E501
        :type: list[str]
        """

        self._values = values

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

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