# coding: utf-8

"""
    Forms

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

    The version of the OpenAPI document: v3
    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.marketing.forms.configuration import Configuration


class FormDisplayOptions(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 = {"render_raw_html": "bool", "css_class": "str", "theme": "str", "submit_button_text": "str", "style": "FormStyle"}

    attribute_map = {"render_raw_html": "renderRawHtml", "css_class": "cssClass", "theme": "theme", "submit_button_text": "submitButtonText", "style": "style"}

    def __init__(self, render_raw_html=None, css_class=None, theme=None, submit_button_text=None, style=None, local_vars_configuration=None):  # noqa: E501
        """FormDisplayOptions - 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._render_raw_html = None
        self._css_class = None
        self._theme = None
        self._submit_button_text = None
        self._style = None
        self.discriminator = None

        self.render_raw_html = render_raw_html
        if css_class is not None:
            self.css_class = css_class
        self.theme = theme
        self.submit_button_text = submit_button_text
        self.style = style

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

        Whether the form will render as raw HTML as opposed to inside an iFrame.  # noqa: E501

        :return: The render_raw_html of this FormDisplayOptions.  # noqa: E501
        :rtype: bool
        """
        return self._render_raw_html

    @render_raw_html.setter
    def render_raw_html(self, render_raw_html):
        """Sets the render_raw_html of this FormDisplayOptions.

        Whether the form will render as raw HTML as opposed to inside an iFrame.  # noqa: E501

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

        self._render_raw_html = render_raw_html

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

          # noqa: E501

        :return: The css_class of this FormDisplayOptions.  # noqa: E501
        :rtype: str
        """
        return self._css_class

    @css_class.setter
    def css_class(self, css_class):
        """Sets the css_class of this FormDisplayOptions.

          # noqa: E501

        :param css_class: The css_class of this FormDisplayOptions.  # noqa: E501
        :type css_class: str
        """

        self._css_class = css_class

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

        The theme used for styling the input fields. This will not apply if the form is added to a HubSpot CMS page.  # noqa: E501

        :return: The theme of this FormDisplayOptions.  # noqa: E501
        :rtype: str
        """
        return self._theme

    @theme.setter
    def theme(self, theme):
        """Sets the theme of this FormDisplayOptions.

        The theme used for styling the input fields. This will not apply if the form is added to a HubSpot CMS page.  # noqa: E501

        :param theme: The theme of this FormDisplayOptions.  # noqa: E501
        :type theme: str
        """
        if self.local_vars_configuration.client_side_validation and theme is None:  # noqa: E501
            raise ValueError("Invalid value for `theme`, must not be `None`")  # noqa: E501
        allowed_values = ["default_style", "canvas", "linear", "round", "sharp", "legacy"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and theme not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `theme` ({0}), must be one of {1}".format(theme, allowed_values))  # noqa: E501

        self._theme = theme

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

        The text displayed on the form submit button.  # noqa: E501

        :return: The submit_button_text of this FormDisplayOptions.  # noqa: E501
        :rtype: str
        """
        return self._submit_button_text

    @submit_button_text.setter
    def submit_button_text(self, submit_button_text):
        """Sets the submit_button_text of this FormDisplayOptions.

        The text displayed on the form submit button.  # noqa: E501

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

        self._submit_button_text = submit_button_text

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


        :return: The style of this FormDisplayOptions.  # noqa: E501
        :rtype: FormStyle
        """
        return self._style

    @style.setter
    def style(self, style):
        """Sets the style of this FormDisplayOptions.


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

        self._style = style

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

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