# coding: utf-8

"""
    Automation Actions V4

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

    The version of the OpenAPI document: v4
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.automation.actions.configuration import Configuration


class FieldTypeDefinition(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 = {
        "help_text": "str",
        "referenced_object_type": "str",
        "name": "str",
        "options": "list[Option]",
        "description": "str",
        "external_options_reference_type": "str",
        "label": "str",
        "type": "str",
        "field_type": "str",
        "options_url": "str",
        "external_options": "bool",
    }

    attribute_map = {
        "help_text": "helpText",
        "referenced_object_type": "referencedObjectType",
        "name": "name",
        "options": "options",
        "description": "description",
        "external_options_reference_type": "externalOptionsReferenceType",
        "label": "label",
        "type": "type",
        "field_type": "fieldType",
        "options_url": "optionsUrl",
        "external_options": "externalOptions",
    }

    def __init__(
        self,
        help_text=None,
        referenced_object_type=None,
        name=None,
        options=None,
        description=None,
        external_options_reference_type=None,
        label=None,
        type=None,
        field_type=None,
        options_url=None,
        external_options=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """FieldTypeDefinition - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._help_text = None
        self._referenced_object_type = None
        self._name = None
        self._options = None
        self._description = None
        self._external_options_reference_type = None
        self._label = None
        self._type = None
        self._field_type = None
        self._options_url = None
        self._external_options = None
        self.discriminator = None

        if help_text is not None:
            self.help_text = help_text
        if referenced_object_type is not None:
            self.referenced_object_type = referenced_object_type
        self.name = name
        self.options = options
        if description is not None:
            self.description = description
        if external_options_reference_type is not None:
            self.external_options_reference_type = external_options_reference_type
        if label is not None:
            self.label = label
        self.type = type
        if field_type is not None:
            self.field_type = field_type
        if options_url is not None:
            self.options_url = options_url
        self.external_options = external_options

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


        :return: The help_text of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._help_text

    @help_text.setter
    def help_text(self, help_text):
        """Sets the help_text of this FieldTypeDefinition.


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

        self._help_text = help_text

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


        :return: The referenced_object_type of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._referenced_object_type

    @referenced_object_type.setter
    def referenced_object_type(self, referenced_object_type):
        """Sets the referenced_object_type of this FieldTypeDefinition.


        :param referenced_object_type: The referenced_object_type of this FieldTypeDefinition.  # noqa: E501
        :type referenced_object_type: str
        """
        allowed_values = [
            "CONTACT",
            "COMPANY",
            "DEAL",
            "ENGAGEMENT",
            "TICKET",
            "OWNER",
            "PRODUCT",
            "LINE_ITEM",
            "BET_DELIVERABLE_SERVICE",
            "CONTENT",
            "CONVERSATION",
            "BET_ALERT",
            "PORTAL",
            "QUOTE",
            "FORM_SUBMISSION_INBOUNDDB",
            "QUOTA",
            "UNSUBSCRIBE",
            "COMMUNICATION",
            "FEEDBACK_SUBMISSION",
            "ATTRIBUTION",
            "SALESFORCE_SYNC_ERROR",
            "RESTORABLE_CRM_OBJECT",
            "HUB",
            "LANDING_PAGE",
            "PRODUCT_OR_FOLDER",
            "TASK",
            "FORM",
            "MARKETING_EMAIL",
            "AD_ACCOUNT",
            "AD_CAMPAIGN",
            "AD_GROUP",
            "AD",
            "KEYWORD",
            "CAMPAIGN",
            "SOCIAL_CHANNEL",
            "SOCIAL_POST",
            "SITE_PAGE",
            "BLOG_POST",
            "IMPORT",
            "EXPORT",
            "CTA",
            "TASK_TEMPLATE",
            "AUTOMATION_PLATFORM_FLOW",
            "OBJECT_LIST",
            "NOTE",
            "MEETING_EVENT",
            "CALL",
            "EMAIL",
            "PUBLISHING_TASK",
            "CONVERSATION_SESSION",
            "CONTACT_CREATE_ATTRIBUTION",
            "INVOICE",
            "MARKETING_EVENT",
            "CONVERSATION_INBOX",
            "CHATFLOW",
            "MEDIA_BRIDGE",
            "SEQUENCE",
            "SEQUENCE_STEP",
            "FORECAST",
            "SNIPPET",
            "TEMPLATE",
            "DEAL_CREATE_ATTRIBUTION",
            "QUOTE_TEMPLATE",
            "QUOTE_MODULE",
            "QUOTE_MODULE_FIELD",
            "QUOTE_FIELD",
            "SEQUENCE_ENROLLMENT",
            "SUBSCRIPTION",
            "ACCEPTANCE_TEST",
            "SOCIAL_BROADCAST",
            "DEAL_SPLIT",
            "DEAL_REGISTRATION",
            "GOAL_TARGET",
            "GOAL_TARGET_GROUP",
            "PORTAL_OBJECT_SYNC_MESSAGE",
            "FILE_MANAGER_FILE",
            "FILE_MANAGER_FOLDER",
            "SEQUENCE_STEP_ENROLLMENT",
            "APPROVAL",
            "APPROVAL_STEP",
            "CTA_VARIANT",
            "SALES_DOCUMENT",
            "DISCOUNT",
            "FEE",
            "TAX",
            "MARKETING_CALENDAR",
            "PERMISSIONS_TESTING",
            "PRIVACY_SCANNER_COOKIE",
            "DATA_SYNC_STATE",
            "WEB_INTERACTIVE",
            "PLAYBOOK",
            "FOLDER",
            "PLAYBOOK_QUESTION",
            "PLAYBOOK_SUBMISSION",
            "PLAYBOOK_SUBMISSION_ANSWER",
            "COMMERCE_PAYMENT",
            "GSC_PROPERTY",
            "SOX_PROTECTED_DUMMY_TYPE",
            "BLOG_LISTING_PAGE",
            "QUARANTINED_SUBMISSION",
            "PAYMENT_SCHEDULE",
            "PAYMENT_SCHEDULE_INSTALLMENT",
            "MARKETING_CAMPAIGN_UTM",
            "DISCOUNT_TEMPLATE",
            "DISCOUNT_CODE",
            "FEEDBACK_SURVEY",
            "CMS_URL",
            "SALES_TASK",
            "SALES_WORKLOAD",
            "USER",
            "POSTAL_MAIL",
            "SCHEMAS_BACKEND_TEST",
            "PAYMENT_LINK",
            "SUBMISSION_TAG",
            "CAMPAIGN_STEP",
            "SCHEDULING_PAGE",
            "SOX_PROTECTED_TEST_TYPE",
            "ORDER",
            "MARKETING_SMS",
            "PARTNER_ACCOUNT",
            "CAMPAIGN_TEMPLATE",
            "CAMPAIGN_TEMPLATE_STEP",
            "PLAYLIST",
            "CLIP",
            "CAMPAIGN_BUDGET_ITEM",
            "CAMPAIGN_SPEND_ITEM",
            "MIC",
            "CONTENT_AUDIT",
            "CONTENT_AUDIT_PAGE",
            "PLAYLIST_FOLDER",
            "LEAD",
            "ABANDONED_CART",
            "EXTERNAL_WEB_URL",
            "VIEW",
            "VIEW_BLOCK",
            "ROSTER",
            "CART",
            "AUTOMATION_PLATFORM_FLOW_ACTION",
            "SOCIAL_PROFILE",
            "PARTNER_CLIENT",
            "ROSTER_MEMBER",
            "MARKETING_EVENT_ATTENDANCE",
            "ALL_PAGES",
            "AI_FORECAST",
            "CRM_PIPELINES_DUMMY_TYPE",
            "KNOWLEDGE_ARTICLE",
            "PROPERTY_INFO",
            "DATA_PRIVACY_CONSENT",
            "GOAL_TEMPLATE",
            "SCORE_CONFIGURATION",
            "AUDIENCE",
            "PARTNER_CLIENT_REVENUE",
            "AUTOMATION_JOURNEY",
            "UNKNOWN",
        ]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and referenced_object_type not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `referenced_object_type` ({0}), must be one of {1}".format(referenced_object_type, allowed_values))  # noqa: E501

        self._referenced_object_type = referenced_object_type

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


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

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


        :param name: The name of this FieldTypeDefinition.  # noqa: E501
        :type name: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The options of this FieldTypeDefinition.  # noqa: E501
        :rtype: list[Option]
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this FieldTypeDefinition.


        :param options: The options of this FieldTypeDefinition.  # noqa: E501
        :type options: list[Option]
        """
        if self.local_vars_configuration.client_side_validation and options is None:  # noqa: E501
            raise ValueError("Invalid value for `options`, must not be `None`")  # noqa: E501

        self._options = options

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


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

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


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

        self._description = description

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


        :return: The external_options_reference_type of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._external_options_reference_type

    @external_options_reference_type.setter
    def external_options_reference_type(self, external_options_reference_type):
        """Sets the external_options_reference_type of this FieldTypeDefinition.


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

        self._external_options_reference_type = external_options_reference_type

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


        :return: The label of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._label

    @label.setter
    def label(self, label):
        """Sets the label of this FieldTypeDefinition.


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

        self._label = label

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


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

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


        :param type: The type of this FieldTypeDefinition.  # noqa: E501
        :type type: str
        """
        if self.local_vars_configuration.client_side_validation and type is None:  # noqa: E501
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["string", "number", "bool", "datetime", "enumeration", "date", "phone_number", "currency_number", "json", "object_coordinates"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and type not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `type` ({0}), must be one of {1}".format(type, allowed_values))  # noqa: E501

        self._type = type

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


        :return: The field_type of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._field_type

    @field_type.setter
    def field_type(self, field_type):
        """Sets the field_type of this FieldTypeDefinition.


        :param field_type: The field_type of this FieldTypeDefinition.  # noqa: E501
        :type field_type: str
        """
        allowed_values = [
            "booleancheckbox",
            "checkbox",
            "date",
            "file",
            "number",
            "phonenumber",
            "radio",
            "select",
            "text",
            "textarea",
            "calculation_equation",
            "calculation_rollup",
            "calculation_score",
            "calculation_read_time",
            "unknown",
            "html",
        ]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and field_type not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `field_type` ({0}), must be one of {1}".format(field_type, allowed_values))  # noqa: E501

        self._field_type = field_type

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


        :return: The options_url of this FieldTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._options_url

    @options_url.setter
    def options_url(self, options_url):
        """Sets the options_url of this FieldTypeDefinition.


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

        self._options_url = options_url

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


        :return: The external_options of this FieldTypeDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._external_options

    @external_options.setter
    def external_options(self, external_options):
        """Sets the external_options of this FieldTypeDefinition.


        :param external_options: The external_options of this FieldTypeDefinition.  # noqa: E501
        :type external_options: bool
        """
        if self.local_vars_configuration.client_side_validation and external_options is None:  # noqa: E501
            raise ValueError("Invalid value for `external_options`, must not be `None`")  # noqa: E501

        self._external_options = external_options

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(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, FieldTypeDefinition):
            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, FieldTypeDefinition):
            return True

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