# coding: utf-8

"""
    Intervals.icu API

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

    The version of the OpenAPI document: v1.0.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, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class Display(BaseModel):
    """
    Display
    """ # noqa: E501
    color_scheme: Optional[StrictStr] = Field(default=None, alias="colorScheme")
    low_intensity: Optional[StrictInt] = Field(default=None, alias="lowIntensity")
    high_intensity: Optional[StrictInt] = Field(default=None, alias="highIntensity")
    low_load: Optional[StrictInt] = Field(default=None, alias="lowLoad")
    high_load: Optional[StrictInt] = Field(default=None, alias="highLoad")
    use_paired_workout_color: Optional[StrictBool] = Field(default=None, alias="usePairedWorkoutColor")
    ignore_workout_colors: Optional[StrictBool] = Field(default=None, alias="ignoreWorkoutColors")
    show_average_hr: Optional[StrictBool] = Field(default=None, alias="showAverageHR")
    show_normalized_watts: Optional[StrictBool] = Field(default=None, alias="showNormalizedWatts")
    show_load: Optional[StrictBool] = Field(default=None, alias="showLoad")
    show_work: Optional[StrictBool] = Field(default=None, alias="showWork")
    show_work_above_ftp: Optional[StrictBool] = Field(default=None, alias="showWorkAboveFTP")
    show_weight_lifted: Optional[StrictBool] = Field(default=None, alias="showWeightLifted")
    show_average_power: Optional[StrictBool] = Field(default=None, alias="showAveragePower")
    show_rpe: Optional[StrictBool] = Field(default=None, alias="showRPE")
    show_feel: Optional[StrictBool] = Field(default=None, alias="showFeel")
    show_pace: Optional[StrictBool] = Field(default=None, alias="showPace")
    show_gap: Optional[StrictBool] = Field(default=None, alias="showGAP")
    show_intensity: Optional[StrictBool] = Field(default=None, alias="showIntensity")
    show_name: Optional[StrictBool] = Field(default=None, alias="showName")
    show_intervals: Optional[StrictBool] = Field(default=None, alias="showIntervals")
    show_skyline_chart: Optional[StrictBool] = Field(default=None, alias="showSkylineChart")
    show_paired_workout_chart: Optional[StrictBool] = Field(default=None, alias="showPairedWorkoutChart")
    show_description: Optional[StrictBool] = Field(default=None, alias="showDescription")
    show_start_time: Optional[StrictBool] = Field(default=None, alias="showStartTime")
    precise_distance: Optional[StrictBool] = Field(default=None, alias="preciseDistance")
    shrink_warmup: Optional[StrictBool] = Field(default=None, alias="shrinkWarmup")
    shrink_cooldown: Optional[StrictBool] = Field(default=None, alias="shrinkCooldown")
    shrink_commute: Optional[StrictBool] = Field(default=None, alias="shrinkCommute")
    color: Optional[StrictStr] = None
    color2: Optional[StrictStr] = None
    __properties: ClassVar[List[str]] = ["colorScheme", "lowIntensity", "highIntensity", "lowLoad", "highLoad", "usePairedWorkoutColor", "ignoreWorkoutColors", "showAverageHR", "showNormalizedWatts", "showLoad", "showWork", "showWorkAboveFTP", "showWeightLifted", "showAveragePower", "showRPE", "showFeel", "showPace", "showGAP", "showIntensity", "showName", "showIntervals", "showSkylineChart", "showPairedWorkoutChart", "showDescription", "showStartTime", "preciseDistance", "shrinkWarmup", "shrinkCooldown", "shrinkCommute", "color", "color2"]

    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 Display 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 Display from a dict"""
        if obj is None:
            return None

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

        _obj = cls.model_validate({
            "colorScheme": obj.get("colorScheme"),
            "lowIntensity": obj.get("lowIntensity"),
            "highIntensity": obj.get("highIntensity"),
            "lowLoad": obj.get("lowLoad"),
            "highLoad": obj.get("highLoad"),
            "usePairedWorkoutColor": obj.get("usePairedWorkoutColor"),
            "ignoreWorkoutColors": obj.get("ignoreWorkoutColors"),
            "showAverageHR": obj.get("showAverageHR"),
            "showNormalizedWatts": obj.get("showNormalizedWatts"),
            "showLoad": obj.get("showLoad"),
            "showWork": obj.get("showWork"),
            "showWorkAboveFTP": obj.get("showWorkAboveFTP"),
            "showWeightLifted": obj.get("showWeightLifted"),
            "showAveragePower": obj.get("showAveragePower"),
            "showRPE": obj.get("showRPE"),
            "showFeel": obj.get("showFeel"),
            "showPace": obj.get("showPace"),
            "showGAP": obj.get("showGAP"),
            "showIntensity": obj.get("showIntensity"),
            "showName": obj.get("showName"),
            "showIntervals": obj.get("showIntervals"),
            "showSkylineChart": obj.get("showSkylineChart"),
            "showPairedWorkoutChart": obj.get("showPairedWorkoutChart"),
            "showDescription": obj.get("showDescription"),
            "showStartTime": obj.get("showStartTime"),
            "preciseDistance": obj.get("preciseDistance"),
            "shrinkWarmup": obj.get("shrinkWarmup"),
            "shrinkCooldown": obj.get("shrinkCooldown"),
            "shrinkCommute": obj.get("shrinkCommute"),
            "color": obj.get("color"),
            "color2": obj.get("color2")
        })
        return _obj


