# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from teamdbapi.configuration import Configuration


class StringWithFontStyle(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'text': 'str',
        'color_font': 'str',
        'back_color': 'str',
        'bold': 'str',
        'italic': 'str',
        'underline': 'str'
    }

    attribute_map = {
        'text': 'Text',
        'color_font': 'ColorFont',
        'back_color': 'BackColor',
        'bold': 'Bold',
        'italic': 'Italic',
        'underline': 'Underline'
    }

    def __init__(self, text=None, color_font=None, back_color=None, bold=None, italic=None, underline=None, _configuration=None):  # noqa: E501
        """StringWithFontStyle - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._text = None
        self._color_font = None
        self._back_color = None
        self._bold = None
        self._italic = None
        self._underline = None
        self.discriminator = None

        if text is not None:
            self.text = text
        if color_font is not None:
            self.color_font = color_font
        if back_color is not None:
            self.back_color = back_color
        if bold is not None:
            self.bold = bold
        if italic is not None:
            self.italic = italic
        if underline is not None:
            self.underline = underline

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

        The text  # noqa: E501

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

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

        The text  # noqa: E501

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

        self._text = text

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

        The font color. You must enter a ARGB hex value : #FF12EE33  # noqa: E501

        :return: The color_font of this StringWithFontStyle.  # noqa: E501
        :rtype: str
        """
        return self._color_font

    @color_font.setter
    def color_font(self, color_font):
        """Sets the color_font of this StringWithFontStyle.

        The font color. You must enter a ARGB hex value : #FF12EE33  # noqa: E501

        :param color_font: The color_font of this StringWithFontStyle.  # noqa: E501
        :type: str
        """

        self._color_font = color_font

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

        The background color. You must enter a ARGB hex value : #FF12EE33  # noqa: E501

        :return: The back_color of this StringWithFontStyle.  # noqa: E501
        :rtype: str
        """
        return self._back_color

    @back_color.setter
    def back_color(self, back_color):
        """Sets the back_color of this StringWithFontStyle.

        The background color. You must enter a ARGB hex value : #FF12EE33  # noqa: E501

        :param back_color: The back_color of this StringWithFontStyle.  # noqa: E501
        :type: str
        """

        self._back_color = back_color

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

        Specify whether the font style is bold  # noqa: E501

        :return: The bold of this StringWithFontStyle.  # noqa: E501
        :rtype: str
        """
        return self._bold

    @bold.setter
    def bold(self, bold):
        """Sets the bold of this StringWithFontStyle.

        Specify whether the font style is bold  # noqa: E501

        :param bold: The bold of this StringWithFontStyle.  # noqa: E501
        :type: str
        """
        allowed_values = ["Regular", "Bold", "Italic", "Underline", "Strikeout"]  # noqa: E501
        if (self._configuration.client_side_validation and
                bold not in allowed_values):
            raise ValueError(
                "Invalid value for `bold` ({0}), must be one of {1}"  # noqa: E501
                .format(bold, allowed_values)
            )

        self._bold = bold

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

        Specify whether the font style is italic  # noqa: E501

        :return: The italic of this StringWithFontStyle.  # noqa: E501
        :rtype: str
        """
        return self._italic

    @italic.setter
    def italic(self, italic):
        """Sets the italic of this StringWithFontStyle.

        Specify whether the font style is italic  # noqa: E501

        :param italic: The italic of this StringWithFontStyle.  # noqa: E501
        :type: str
        """
        allowed_values = ["Regular", "Bold", "Italic", "Underline", "Strikeout"]  # noqa: E501
        if (self._configuration.client_side_validation and
                italic not in allowed_values):
            raise ValueError(
                "Invalid value for `italic` ({0}), must be one of {1}"  # noqa: E501
                .format(italic, allowed_values)
            )

        self._italic = italic

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

        Specify whether the font style is underline  # noqa: E501

        :return: The underline of this StringWithFontStyle.  # noqa: E501
        :rtype: str
        """
        return self._underline

    @underline.setter
    def underline(self, underline):
        """Sets the underline of this StringWithFontStyle.

        Specify whether the font style is underline  # noqa: E501

        :param underline: The underline of this StringWithFontStyle.  # noqa: E501
        :type: str
        """
        allowed_values = ["Regular", "Bold", "Italic", "Underline", "Strikeout"]  # noqa: E501
        if (self._configuration.client_side_validation and
                underline not in allowed_values):
            raise ValueError(
                "Invalid value for `underline` ({0}), must be one of {1}"  # noqa: E501
                .format(underline, allowed_values)
            )

        self._underline = underline

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(StringWithFontStyle, dict):
            for key, value in self.items():
                result[key] = 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, StringWithFontStyle):
            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, StringWithFontStyle):
            return True

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