# 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 datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional, Union
from intervals_icu_client.models.activity_filter import ActivityFilter
from intervals_icu_client.models.coach_tick import CoachTick
from intervals_icu_client.models.settings import Settings
from intervals_icu_client.models.strava_gear import StravaGear
from typing import Optional, Set
from typing_extensions import Self

class AthleteUpdateDTO(BaseModel):
    """
    AthleteUpdateDTO
    """ # noqa: E501
    id: Optional[StrictStr] = None
    name: Optional[StrictStr] = None
    firstname: Optional[StrictStr] = None
    lastname: Optional[StrictStr] = None
    profile_medium: Optional[StrictStr] = None
    measurement_preference: Optional[StrictStr] = None
    weight_pref_lb: Optional[StrictBool] = None
    fahrenheit: Optional[StrictBool] = None
    wind_speed: Optional[StrictStr] = None
    rain: Optional[StrictStr] = None
    weight: Optional[Union[StrictFloat, StrictInt]] = None
    email: Optional[StrictStr] = None
    sex: Optional[StrictStr] = None
    city: Optional[StrictStr] = None
    state: Optional[StrictStr] = None
    country: Optional[StrictStr] = None
    bikes: Optional[List[StravaGear]] = None
    shoes: Optional[List[StravaGear]] = None
    timezone: Optional[StrictStr] = None
    locale: Optional[StrictStr] = None
    visibility: Optional[StrictStr] = None
    icu_last_seen: Optional[datetime] = None
    status: Optional[StrictStr] = None
    status_updated: Optional[datetime] = None
    icu_resting_hr: Optional[StrictInt] = None
    icu_weight: Optional[Union[StrictFloat, StrictInt]] = None
    icu_weight_sync: Optional[StrictStr] = None
    icu_activated: Optional[datetime] = None
    icu_queue_pos: Optional[StrictInt] = None
    icu_admin: Optional[StrictBool] = None
    icu_friend_invite_token: Optional[StrictStr] = None
    icu_permission: Optional[StrictStr] = None
    icu_effort_secs: Optional[List[StrictInt]] = None
    icu_coach: Optional[StrictBool] = None
    bio: Optional[StrictStr] = None
    website: Optional[StrictStr] = None
    icu_date_of_birth: Optional[StrictStr] = None
    icu_api_key: Optional[StrictStr] = None
    icu_type_settings: Optional[List[Settings]] = None
    icu_form_as_percent: Optional[StrictBool] = None
    icu_mmp_days: Optional[StrictInt] = None
    icu_wellness_prompt: Optional[StrictBool] = None
    wellness_last_prompt_date: Optional[StrictStr] = None
    icu_wellness_keys: Optional[List[StrictStr]] = None
    icu_track_menstrual_cycle: Optional[StrictBool] = None
    icu_menstrual_cycle_perm: Optional[StrictStr] = None
    activity_rpe_prompt: Optional[StrictBool] = None
    coach_ticks: Optional[List[CoachTick]] = None
    icu_garmin_health: Optional[StrictBool] = None
    icu_garmin_training: Optional[StrictBool] = None
    icu_garmin_sync_activities: Optional[StrictBool] = None
    garmin_sync_activity_types: Optional[List[StrictStr]] = None
    garmin_sync_after: Optional[datetime] = None
    icu_garmin_download_wellness: Optional[StrictBool] = None
    icu_garmin_upload_workouts: Optional[StrictBool] = None
    icu_garmin_outdoor_power_range: Optional[Union[StrictFloat, StrictInt]] = None
    icu_garmin_hr_range: Optional[Union[StrictFloat, StrictInt]] = None
    garmin_pace_range: Optional[Union[StrictFloat, StrictInt]] = None
    garmin_power_target: Optional[StrictStr] = None
    icu_garmin_last_upload: Optional[datetime] = None
    icu_garmin_upload_filters: Optional[List[ActivityFilter]] = None
    icu_garmin_wellness_keys: Optional[List[StrictStr]] = None
    open_step_duration: Optional[StrictInt] = None
    polar_scope: Optional[StrictStr] = None
    polar_sync_activities: Optional[StrictBool] = None
    polar_sync_activity_types: Optional[List[StrictStr]] = None
    polar_download_wellness: Optional[StrictBool] = None
    polar_wellness_keys: Optional[List[StrictStr]] = None
    suunto_scope: Optional[StrictStr] = None
    suunto_user_id: Optional[StrictStr] = None
    suunto_sync_activities: Optional[StrictBool] = None
    suunto_sync_activity_types: Optional[List[StrictStr]] = None
    suunto_upload_workouts: Optional[StrictBool] = None
    suunto_outdoor_power_range: Optional[Union[StrictFloat, StrictInt]] = None
    suunto_hr_range: Optional[Union[StrictFloat, StrictInt]] = None
    suunto_pace_range: Optional[Union[StrictFloat, StrictInt]] = None
    suunto_last_upload: Optional[datetime] = None
    suunto_upload_filters: Optional[List[ActivityFilter]] = None
    suunto_download_wellness: Optional[StrictBool] = None
    coros_user_id: Optional[StrictStr] = None
    coros_sync_activities: Optional[StrictBool] = None
    coros_upload_workouts: Optional[StrictBool] = None
    coros_download_wellness: Optional[StrictBool] = None
    coros_last_upload: Optional[datetime] = None
    concept2_user_id: Optional[StrictStr] = None
    concept2_sync_activities: Optional[StrictBool] = None
    zepp_user_id: Optional[StrictStr] = None
    zepp_sync_activities: Optional[StrictBool] = None
    zepp_upload_workouts: Optional[StrictBool] = None
    zepp_download_wellness: Optional[StrictBool] = None
    wahoo_user_id: Optional[StrictStr] = None
    wahoo_sync_activities: Optional[StrictBool] = None
    wahoo_upload_workouts: Optional[StrictBool] = None
    zwift_user_id: Optional[StrictStr] = None
    zwift_sync_activities: Optional[StrictBool] = None
    zwift_upload_workouts: Optional[StrictBool] = None
    dropbox_scope: Optional[StrictStr] = None
    oura_scope: Optional[StrictStr] = None
    oura_wellness_keys: Optional[List[StrictStr]] = None
    whoop_scope: Optional[StrictStr] = None
    whoop_wellness_keys: Optional[List[StrictStr]] = None
    google_scope: Optional[StrictStr] = None
    google_wellness_keys: Optional[List[StrictStr]] = None
    icu_email_verified: Optional[StrictBool] = None
    icu_email_disabled: Optional[StrictStr] = None
    icu_send_achievements: Optional[StrictBool] = None
    icu_send_newsletter: Optional[StrictBool] = None
    icu_send_private_chat: Optional[StrictBool] = None
    icu_send_private_msg: Optional[StrictBool] = None
    icu_send_follow_req: Optional[StrictBool] = None
    icu_send_group_chat: Optional[StrictBool] = None
    icu_send_group_msg: Optional[StrictBool] = None
    icu_send_activity_chat: Optional[StrictBool] = None
    icu_send_followed_activity_chat: Optional[StrictBool] = None
    icu_send_coached_activity_chat: Optional[StrictBool] = None
    icu_send_activity_msg: Optional[StrictBool] = None
    icu_send_coach_me_req: Optional[StrictBool] = None
    icu_send_gear_alerts: Optional[StrictBool] = None
    icu_send_plan_for_week: Optional[StrictBool] = None
    include_descr_in_plan_for_week: Optional[StrictBool] = None
    icu_send_followed_new_activity: Optional[StrictBool] = None
    icu_send_coached_new_activity: Optional[StrictBool] = None
    icu_send_coach_tick: Optional[StrictBool] = None
    strava_allowed: Optional[StrictBool] = None
    strava_id: Optional[StrictInt] = None
    scope: Optional[StrictStr] = None
    strava_sync_activities: Optional[StrictBool] = None
    strava_sync_activity_types: Optional[List[StrictStr]] = None
    strava_sync_other_activities: Optional[StrictBool] = None
    ignore_strava_gear: Optional[StrictBool] = None
    update_strava_name: Optional[StrictBool] = None
    add_weather_to_strava_descr: Optional[StrictBool] = None
    height: Optional[Union[StrictFloat, StrictInt]] = None
    height_units: Optional[StrictStr] = None
    plan: Optional[StrictStr] = None
    plan_expires: Optional[datetime] = None
    trial_end_date: Optional[datetime] = None
    sponsored_by_chat_id: Optional[StrictInt] = None
    has_password: Optional[StrictBool] = None
    beta_user: Optional[StrictBool] = None
    currency: Optional[StrictStr] = None
    training_plan_id: Optional[StrictInt] = None
    training_plan_start_date: Optional[StrictStr] = None
    recalc_hr_zones: Optional[StrictBool] = Field(default=None, alias="recalcHrZones")
    apply_to_all: Optional[StrictBool] = Field(default=None, alias="applyToAll")
    local_date: Optional[StrictStr] = Field(default=None, alias="localDate")
    password: Optional[StrictStr] = None
    strava_authorized: Optional[StrictBool] = None
    __properties: ClassVar[List[str]] = ["id", "name", "firstname", "lastname", "profile_medium", "measurement_preference", "weight_pref_lb", "fahrenheit", "wind_speed", "rain", "weight", "email", "sex", "city", "state", "country", "bikes", "shoes", "timezone", "locale", "visibility", "icu_last_seen", "status", "status_updated", "icu_resting_hr", "icu_weight", "icu_weight_sync", "icu_activated", "icu_queue_pos", "icu_admin", "icu_friend_invite_token", "icu_permission", "icu_effort_secs", "icu_coach", "bio", "website", "icu_date_of_birth", "icu_api_key", "icu_type_settings", "icu_form_as_percent", "icu_mmp_days", "icu_wellness_prompt", "wellness_last_prompt_date", "icu_wellness_keys", "icu_track_menstrual_cycle", "icu_menstrual_cycle_perm", "activity_rpe_prompt", "coach_ticks", "icu_garmin_health", "icu_garmin_training", "icu_garmin_sync_activities", "garmin_sync_activity_types", "garmin_sync_after", "icu_garmin_download_wellness", "icu_garmin_upload_workouts", "icu_garmin_outdoor_power_range", "icu_garmin_hr_range", "garmin_pace_range", "garmin_power_target", "icu_garmin_last_upload", "icu_garmin_upload_filters", "icu_garmin_wellness_keys", "open_step_duration", "polar_scope", "polar_sync_activities", "polar_sync_activity_types", "polar_download_wellness", "polar_wellness_keys", "suunto_scope", "suunto_user_id", "suunto_sync_activities", "suunto_sync_activity_types", "suunto_upload_workouts", "suunto_outdoor_power_range", "suunto_hr_range", "suunto_pace_range", "suunto_last_upload", "suunto_upload_filters", "suunto_download_wellness", "coros_user_id", "coros_sync_activities", "coros_upload_workouts", "coros_download_wellness", "coros_last_upload", "concept2_user_id", "concept2_sync_activities", "zepp_user_id", "zepp_sync_activities", "zepp_upload_workouts", "zepp_download_wellness", "wahoo_user_id", "wahoo_sync_activities", "wahoo_upload_workouts", "zwift_user_id", "zwift_sync_activities", "zwift_upload_workouts", "dropbox_scope", "oura_scope", "oura_wellness_keys", "whoop_scope", "whoop_wellness_keys", "google_scope", "google_wellness_keys", "icu_email_verified", "icu_email_disabled", "icu_send_achievements", "icu_send_newsletter", "icu_send_private_chat", "icu_send_private_msg", "icu_send_follow_req", "icu_send_group_chat", "icu_send_group_msg", "icu_send_activity_chat", "icu_send_followed_activity_chat", "icu_send_coached_activity_chat", "icu_send_activity_msg", "icu_send_coach_me_req", "icu_send_gear_alerts", "icu_send_plan_for_week", "include_descr_in_plan_for_week", "icu_send_followed_new_activity", "icu_send_coached_new_activity", "icu_send_coach_tick", "strava_allowed", "strava_id", "scope", "strava_sync_activities", "strava_sync_activity_types", "strava_sync_other_activities", "ignore_strava_gear", "update_strava_name", "add_weather_to_strava_descr", "height", "height_units", "plan", "plan_expires", "trial_end_date", "sponsored_by_chat_id", "has_password", "beta_user", "currency", "training_plan_id", "training_plan_start_date", "recalcHrZones", "applyToAll", "localDate", "password", "strava_authorized"]

    @field_validator('wind_speed')
    def wind_speed_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['MPS', 'KNOTS', 'KMH', 'MPH', 'BFT']):
            raise ValueError("must be one of enum values ('MPS', 'KNOTS', 'KMH', 'MPH', 'BFT')")
        return value

    @field_validator('rain')
    def rain_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['MM', 'INCHES']):
            raise ValueError("must be one of enum values ('MM', 'INCHES')")
        return value

    @field_validator('visibility')
    def visibility_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['PRIVATE', 'PUBLIC', 'HIDDEN']):
            raise ValueError("must be one of enum values ('PRIVATE', 'PUBLIC', 'HIDDEN')")
        return value

    @field_validator('status')
    def status_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['ACTIVE', 'DORMANT', 'ARCHIVED']):
            raise ValueError("must be one of enum values ('ACTIVE', 'DORMANT', 'ARCHIVED')")
        return value

    @field_validator('icu_weight_sync')
    def icu_weight_sync_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['NONE', 'STRAVA']):
            raise ValueError("must be one of enum values ('NONE', 'STRAVA')")
        return value

    @field_validator('icu_permission')
    def icu_permission_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['NONE', 'READ', 'WRITE']):
            raise ValueError("must be one of enum values ('NONE', 'READ', 'WRITE')")
        return value

    @field_validator('icu_menstrual_cycle_perm')
    def icu_menstrual_cycle_perm_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['NONE', 'READ', 'WRITE']):
            raise ValueError("must be one of enum values ('NONE', 'READ', 'WRITE')")
        return value

    @field_validator('garmin_sync_activity_types')
    def garmin_sync_activity_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other']):
                raise ValueError("each list item must be one of ('Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other')")
        return value

    @field_validator('garmin_power_target')
    def garmin_power_target_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['POWER_LAP', 'POWER', 'POWER_3S', 'POWER_10S', 'POWER_30S']):
            raise ValueError("must be one of enum values ('POWER_LAP', 'POWER', 'POWER_3S', 'POWER_10S', 'POWER_30S')")
        return value

    @field_validator('polar_sync_activity_types')
    def polar_sync_activity_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other']):
                raise ValueError("each list item must be one of ('Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other')")
        return value

    @field_validator('suunto_sync_activity_types')
    def suunto_sync_activity_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other']):
                raise ValueError("each list item must be one of ('Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other')")
        return value

    @field_validator('strava_sync_activity_types')
    def strava_sync_activity_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other']):
                raise ValueError("each list item must be one of ('Ride', 'Run', 'Swim', 'WeightTraining', 'Hike', 'Walk', 'AlpineSki', 'BackcountrySki', 'Badminton', 'Canoeing', 'Crossfit', 'EBikeRide', 'EMountainBikeRide', 'Elliptical', 'Golf', 'GravelRide', 'TrackRide', 'Handcycle', 'HighIntensityIntervalTraining', 'Hockey', 'IceSkate', 'InlineSkate', 'Kayaking', 'Kitesurf', 'MountainBikeRide', 'NordicSki', 'OpenWaterSwim', 'Padel', 'Pilates', 'Pickleball', 'Racquetball', 'Rugby', 'RockClimbing', 'RollerSki', 'Rowing', 'Sail', 'Skateboard', 'Snowboard', 'Snowshoe', 'Soccer', 'Squash', 'StairStepper', 'StandUpPaddling', 'Surfing', 'TableTennis', 'Tennis', 'TrailRun', 'Transition', 'Velomobile', 'VirtualRide', 'VirtualRow', 'VirtualRun', 'VirtualSki', 'WaterSport', 'Wheelchair', 'Windsurf', 'Workout', 'Yoga', 'Other')")
        return value

    @field_validator('height_units')
    def height_units_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['CM', 'FEET']):
            raise ValueError("must be one of enum values ('CM', 'FEET')")
        return value

    @field_validator('plan')
    def plan_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['FREE', 'PREMIUM', 'SUPPORTER', 'WHITELABEL']):
            raise ValueError("must be one of enum values ('FREE', 'PREMIUM', 'SUPPORTER', 'WHITELABEL')")
        return value

    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 AthleteUpdateDTO 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,
        )
        # override the default output from pydantic by calling `to_dict()` of each item in bikes (list)
        _items = []
        if self.bikes:
            for _item_bikes in self.bikes:
                if _item_bikes:
                    _items.append(_item_bikes.to_dict())
            _dict['bikes'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in shoes (list)
        _items = []
        if self.shoes:
            for _item_shoes in self.shoes:
                if _item_shoes:
                    _items.append(_item_shoes.to_dict())
            _dict['shoes'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in icu_type_settings (list)
        _items = []
        if self.icu_type_settings:
            for _item_icu_type_settings in self.icu_type_settings:
                if _item_icu_type_settings:
                    _items.append(_item_icu_type_settings.to_dict())
            _dict['icu_type_settings'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in coach_ticks (list)
        _items = []
        if self.coach_ticks:
            for _item_coach_ticks in self.coach_ticks:
                if _item_coach_ticks:
                    _items.append(_item_coach_ticks.to_dict())
            _dict['coach_ticks'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in icu_garmin_upload_filters (list)
        _items = []
        if self.icu_garmin_upload_filters:
            for _item_icu_garmin_upload_filters in self.icu_garmin_upload_filters:
                if _item_icu_garmin_upload_filters:
                    _items.append(_item_icu_garmin_upload_filters.to_dict())
            _dict['icu_garmin_upload_filters'] = _items
        # override the default output from pydantic by calling `to_dict()` of each item in suunto_upload_filters (list)
        _items = []
        if self.suunto_upload_filters:
            for _item_suunto_upload_filters in self.suunto_upload_filters:
                if _item_suunto_upload_filters:
                    _items.append(_item_suunto_upload_filters.to_dict())
            _dict['suunto_upload_filters'] = _items
        return _dict

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

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

        _obj = cls.model_validate({
            "id": obj.get("id"),
            "name": obj.get("name"),
            "firstname": obj.get("firstname"),
            "lastname": obj.get("lastname"),
            "profile_medium": obj.get("profile_medium"),
            "measurement_preference": obj.get("measurement_preference"),
            "weight_pref_lb": obj.get("weight_pref_lb"),
            "fahrenheit": obj.get("fahrenheit"),
            "wind_speed": obj.get("wind_speed"),
            "rain": obj.get("rain"),
            "weight": obj.get("weight"),
            "email": obj.get("email"),
            "sex": obj.get("sex"),
            "city": obj.get("city"),
            "state": obj.get("state"),
            "country": obj.get("country"),
            "bikes": [StravaGear.from_dict(_item) for _item in obj["bikes"]] if obj.get("bikes") is not None else None,
            "shoes": [StravaGear.from_dict(_item) for _item in obj["shoes"]] if obj.get("shoes") is not None else None,
            "timezone": obj.get("timezone"),
            "locale": obj.get("locale"),
            "visibility": obj.get("visibility"),
            "icu_last_seen": obj.get("icu_last_seen"),
            "status": obj.get("status"),
            "status_updated": obj.get("status_updated"),
            "icu_resting_hr": obj.get("icu_resting_hr"),
            "icu_weight": obj.get("icu_weight"),
            "icu_weight_sync": obj.get("icu_weight_sync"),
            "icu_activated": obj.get("icu_activated"),
            "icu_queue_pos": obj.get("icu_queue_pos"),
            "icu_admin": obj.get("icu_admin"),
            "icu_friend_invite_token": obj.get("icu_friend_invite_token"),
            "icu_permission": obj.get("icu_permission"),
            "icu_effort_secs": obj.get("icu_effort_secs"),
            "icu_coach": obj.get("icu_coach"),
            "bio": obj.get("bio"),
            "website": obj.get("website"),
            "icu_date_of_birth": obj.get("icu_date_of_birth"),
            "icu_api_key": obj.get("icu_api_key"),
            "icu_type_settings": [Settings.from_dict(_item) for _item in obj["icu_type_settings"]] if obj.get("icu_type_settings") is not None else None,
            "icu_form_as_percent": obj.get("icu_form_as_percent"),
            "icu_mmp_days": obj.get("icu_mmp_days"),
            "icu_wellness_prompt": obj.get("icu_wellness_prompt"),
            "wellness_last_prompt_date": obj.get("wellness_last_prompt_date"),
            "icu_wellness_keys": obj.get("icu_wellness_keys"),
            "icu_track_menstrual_cycle": obj.get("icu_track_menstrual_cycle"),
            "icu_menstrual_cycle_perm": obj.get("icu_menstrual_cycle_perm"),
            "activity_rpe_prompt": obj.get("activity_rpe_prompt"),
            "coach_ticks": [CoachTick.from_dict(_item) for _item in obj["coach_ticks"]] if obj.get("coach_ticks") is not None else None,
            "icu_garmin_health": obj.get("icu_garmin_health"),
            "icu_garmin_training": obj.get("icu_garmin_training"),
            "icu_garmin_sync_activities": obj.get("icu_garmin_sync_activities"),
            "garmin_sync_activity_types": obj.get("garmin_sync_activity_types"),
            "garmin_sync_after": obj.get("garmin_sync_after"),
            "icu_garmin_download_wellness": obj.get("icu_garmin_download_wellness"),
            "icu_garmin_upload_workouts": obj.get("icu_garmin_upload_workouts"),
            "icu_garmin_outdoor_power_range": obj.get("icu_garmin_outdoor_power_range"),
            "icu_garmin_hr_range": obj.get("icu_garmin_hr_range"),
            "garmin_pace_range": obj.get("garmin_pace_range"),
            "garmin_power_target": obj.get("garmin_power_target"),
            "icu_garmin_last_upload": obj.get("icu_garmin_last_upload"),
            "icu_garmin_upload_filters": [ActivityFilter.from_dict(_item) for _item in obj["icu_garmin_upload_filters"]] if obj.get("icu_garmin_upload_filters") is not None else None,
            "icu_garmin_wellness_keys": obj.get("icu_garmin_wellness_keys"),
            "open_step_duration": obj.get("open_step_duration"),
            "polar_scope": obj.get("polar_scope"),
            "polar_sync_activities": obj.get("polar_sync_activities"),
            "polar_sync_activity_types": obj.get("polar_sync_activity_types"),
            "polar_download_wellness": obj.get("polar_download_wellness"),
            "polar_wellness_keys": obj.get("polar_wellness_keys"),
            "suunto_scope": obj.get("suunto_scope"),
            "suunto_user_id": obj.get("suunto_user_id"),
            "suunto_sync_activities": obj.get("suunto_sync_activities"),
            "suunto_sync_activity_types": obj.get("suunto_sync_activity_types"),
            "suunto_upload_workouts": obj.get("suunto_upload_workouts"),
            "suunto_outdoor_power_range": obj.get("suunto_outdoor_power_range"),
            "suunto_hr_range": obj.get("suunto_hr_range"),
            "suunto_pace_range": obj.get("suunto_pace_range"),
            "suunto_last_upload": obj.get("suunto_last_upload"),
            "suunto_upload_filters": [ActivityFilter.from_dict(_item) for _item in obj["suunto_upload_filters"]] if obj.get("suunto_upload_filters") is not None else None,
            "suunto_download_wellness": obj.get("suunto_download_wellness"),
            "coros_user_id": obj.get("coros_user_id"),
            "coros_sync_activities": obj.get("coros_sync_activities"),
            "coros_upload_workouts": obj.get("coros_upload_workouts"),
            "coros_download_wellness": obj.get("coros_download_wellness"),
            "coros_last_upload": obj.get("coros_last_upload"),
            "concept2_user_id": obj.get("concept2_user_id"),
            "concept2_sync_activities": obj.get("concept2_sync_activities"),
            "zepp_user_id": obj.get("zepp_user_id"),
            "zepp_sync_activities": obj.get("zepp_sync_activities"),
            "zepp_upload_workouts": obj.get("zepp_upload_workouts"),
            "zepp_download_wellness": obj.get("zepp_download_wellness"),
            "wahoo_user_id": obj.get("wahoo_user_id"),
            "wahoo_sync_activities": obj.get("wahoo_sync_activities"),
            "wahoo_upload_workouts": obj.get("wahoo_upload_workouts"),
            "zwift_user_id": obj.get("zwift_user_id"),
            "zwift_sync_activities": obj.get("zwift_sync_activities"),
            "zwift_upload_workouts": obj.get("zwift_upload_workouts"),
            "dropbox_scope": obj.get("dropbox_scope"),
            "oura_scope": obj.get("oura_scope"),
            "oura_wellness_keys": obj.get("oura_wellness_keys"),
            "whoop_scope": obj.get("whoop_scope"),
            "whoop_wellness_keys": obj.get("whoop_wellness_keys"),
            "google_scope": obj.get("google_scope"),
            "google_wellness_keys": obj.get("google_wellness_keys"),
            "icu_email_verified": obj.get("icu_email_verified"),
            "icu_email_disabled": obj.get("icu_email_disabled"),
            "icu_send_achievements": obj.get("icu_send_achievements"),
            "icu_send_newsletter": obj.get("icu_send_newsletter"),
            "icu_send_private_chat": obj.get("icu_send_private_chat"),
            "icu_send_private_msg": obj.get("icu_send_private_msg"),
            "icu_send_follow_req": obj.get("icu_send_follow_req"),
            "icu_send_group_chat": obj.get("icu_send_group_chat"),
            "icu_send_group_msg": obj.get("icu_send_group_msg"),
            "icu_send_activity_chat": obj.get("icu_send_activity_chat"),
            "icu_send_followed_activity_chat": obj.get("icu_send_followed_activity_chat"),
            "icu_send_coached_activity_chat": obj.get("icu_send_coached_activity_chat"),
            "icu_send_activity_msg": obj.get("icu_send_activity_msg"),
            "icu_send_coach_me_req": obj.get("icu_send_coach_me_req"),
            "icu_send_gear_alerts": obj.get("icu_send_gear_alerts"),
            "icu_send_plan_for_week": obj.get("icu_send_plan_for_week"),
            "include_descr_in_plan_for_week": obj.get("include_descr_in_plan_for_week"),
            "icu_send_followed_new_activity": obj.get("icu_send_followed_new_activity"),
            "icu_send_coached_new_activity": obj.get("icu_send_coached_new_activity"),
            "icu_send_coach_tick": obj.get("icu_send_coach_tick"),
            "strava_allowed": obj.get("strava_allowed"),
            "strava_id": obj.get("strava_id"),
            "scope": obj.get("scope"),
            "strava_sync_activities": obj.get("strava_sync_activities"),
            "strava_sync_activity_types": obj.get("strava_sync_activity_types"),
            "strava_sync_other_activities": obj.get("strava_sync_other_activities"),
            "ignore_strava_gear": obj.get("ignore_strava_gear"),
            "update_strava_name": obj.get("update_strava_name"),
            "add_weather_to_strava_descr": obj.get("add_weather_to_strava_descr"),
            "height": obj.get("height"),
            "height_units": obj.get("height_units"),
            "plan": obj.get("plan"),
            "plan_expires": obj.get("plan_expires"),
            "trial_end_date": obj.get("trial_end_date"),
            "sponsored_by_chat_id": obj.get("sponsored_by_chat_id"),
            "has_password": obj.get("has_password"),
            "beta_user": obj.get("beta_user"),
            "currency": obj.get("currency"),
            "training_plan_id": obj.get("training_plan_id"),
            "training_plan_start_date": obj.get("training_plan_start_date"),
            "recalcHrZones": obj.get("recalcHrZones"),
            "applyToAll": obj.get("applyToAll"),
            "localDate": obj.get("localDate"),
            "password": obj.get("password"),
            "strava_authorized": obj.get("strava_authorized")
        })
        return _obj


