# coding: utf-8

"""
    Mentortools Design API

    Mentortools service for getting and editing design data

    The version of the OpenAPI document: 0.1.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class AppColors(BaseModel):
    """
    AppColors
    """ # noqa: E501
    primary: StrictStr
    black: StrictStr
    danger: StrictStr
    danger_disabled: StrictStr = Field(alias="dangerDisabled")
    danger_transparent16: StrictStr = Field(alias="dangerTransparent16")
    warning: StrictStr
    warning_transparent16: StrictStr = Field(alias="warningTransparent16")
    first_place_leader_board: StrictStr = Field(alias="firstPlaceLeaderBoard")
    second_place_leader_board: StrictStr = Field(alias="secondPlaceLeaderBoard")
    third_place_leader_board: StrictStr = Field(alias="thirdPlaceLeaderBoard")
    white_leader_board_place_text: StrictStr = Field(alias="whiteLeaderBoardPlaceText")
    remove_button_background: StrictStr = Field(alias="removeButtonBackground")
    remove_button_icon: StrictStr = Field(alias="removeButtonIcon")
    app_background: StrictStr = Field(alias="appBackground")
    backdrop_text: StrictStr = Field(alias="backdropText")
    container: StrictStr
    container_shadow: StrictStr = Field(alias="containerShadow")
    container_transparent80: StrictStr = Field(alias="containerTransparent80")
    action: StrictStr
    action_transparent16: StrictStr = Field(alias="actionTransparent16")
    action_transparent8: StrictStr = Field(alias="actionTransparent8")
    action_button_text: StrictStr = Field(alias="actionButtonText")
    regular_text: StrictStr = Field(alias="regularText")
    regular_text_transparent16: StrictStr = Field(alias="regularTextTransparent16")
    regular_text_transparent8: StrictStr = Field(alias="regularTextTransparent8")
    regular_text_transparent4: StrictStr = Field(alias="regularTextTransparent4")
    placeholder_text: StrictStr = Field(alias="placeholderText")
    muted_text: StrictStr = Field(alias="mutedText")
    contrast: StrictStr
    contrast_transparent16: StrictStr = Field(alias="contrastTransparent16")
    menu_open_with_transparent6: StrictStr = Field(alias="menuOpenWithTransparent6")
    contrast_transparent8: StrictStr = Field(alias="contrastTransparent8")
    navigation_background: StrictStr = Field(alias="navigationBackground")
    navigation_text: StrictStr = Field(alias="navigationText")
    big_heading_text: StrictStr = Field(alias="bigHeadingText")
    regular_heading_text: StrictStr = Field(alias="regularHeadingText")
    medium_heading_text: StrictStr = Field(alias="mediumHeadingText")
    quiz_color_correct: StrictStr = Field(alias="quizColorCorrect")
    quiz_color_correct_transparent16: StrictStr = Field(alias="quizColorCorrectTransparent16")
    quiz_color_incorrect: StrictStr = Field(alias="quizColorIncorrect")
    quiz_color_incorrect_transparent16: StrictStr = Field(alias="quizColorIncorrectTransparent16")
    link_color: Optional[StrictStr] = Field(default='#007bff', alias="linkColor")
    __properties: ClassVar[List[str]] = ["primary", "black", "danger", "dangerDisabled", "dangerTransparent16", "warning", "warningTransparent16", "firstPlaceLeaderBoard", "secondPlaceLeaderBoard", "thirdPlaceLeaderBoard", "whiteLeaderBoardPlaceText", "removeButtonBackground", "removeButtonIcon", "appBackground", "backdropText", "container", "containerShadow", "containerTransparent80", "action", "actionTransparent16", "actionTransparent8", "actionButtonText", "regularText", "regularTextTransparent16", "regularTextTransparent8", "regularTextTransparent4", "placeholderText", "mutedText", "contrast", "contrastTransparent16", "menuOpenWithTransparent6", "contrastTransparent8", "navigationBackground", "navigationText", "bigHeadingText", "regularHeadingText", "mediumHeadingText", "quizColorCorrect", "quizColorCorrectTransparent16", "quizColorIncorrect", "quizColorIncorrectTransparent16", "linkColor"]

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.model_dump(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> Optional[Self]:
        """Create an instance of AppColors from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of AppColors from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "primary": obj.get("primary"),
            "black": obj.get("black"),
            "danger": obj.get("danger"),
            "dangerDisabled": obj.get("dangerDisabled"),
            "dangerTransparent16": obj.get("dangerTransparent16"),
            "warning": obj.get("warning"),
            "warningTransparent16": obj.get("warningTransparent16"),
            "firstPlaceLeaderBoard": obj.get("firstPlaceLeaderBoard"),
            "secondPlaceLeaderBoard": obj.get("secondPlaceLeaderBoard"),
            "thirdPlaceLeaderBoard": obj.get("thirdPlaceLeaderBoard"),
            "whiteLeaderBoardPlaceText": obj.get("whiteLeaderBoardPlaceText"),
            "removeButtonBackground": obj.get("removeButtonBackground"),
            "removeButtonIcon": obj.get("removeButtonIcon"),
            "appBackground": obj.get("appBackground"),
            "backdropText": obj.get("backdropText"),
            "container": obj.get("container"),
            "containerShadow": obj.get("containerShadow"),
            "containerTransparent80": obj.get("containerTransparent80"),
            "action": obj.get("action"),
            "actionTransparent16": obj.get("actionTransparent16"),
            "actionTransparent8": obj.get("actionTransparent8"),
            "actionButtonText": obj.get("actionButtonText"),
            "regularText": obj.get("regularText"),
            "regularTextTransparent16": obj.get("regularTextTransparent16"),
            "regularTextTransparent8": obj.get("regularTextTransparent8"),
            "regularTextTransparent4": obj.get("regularTextTransparent4"),
            "placeholderText": obj.get("placeholderText"),
            "mutedText": obj.get("mutedText"),
            "contrast": obj.get("contrast"),
            "contrastTransparent16": obj.get("contrastTransparent16"),
            "menuOpenWithTransparent6": obj.get("menuOpenWithTransparent6"),
            "contrastTransparent8": obj.get("contrastTransparent8"),
            "navigationBackground": obj.get("navigationBackground"),
            "navigationText": obj.get("navigationText"),
            "bigHeadingText": obj.get("bigHeadingText"),
            "regularHeadingText": obj.get("regularHeadingText"),
            "mediumHeadingText": obj.get("mediumHeadingText"),
            "quizColorCorrect": obj.get("quizColorCorrect"),
            "quizColorCorrectTransparent16": obj.get("quizColorCorrectTransparent16"),
            "quizColorIncorrect": obj.get("quizColorIncorrect"),
            "quizColorIncorrectTransparent16": obj.get("quizColorIncorrectTransparent16"),
            "linkColor": obj.get("linkColor") if obj.get("linkColor") is not None else '#007bff'
        })
        return _obj


