fitsdk 0.1.0

A small crate which provides a simple API exposing the FIT SDK.
Documentation
use super::FieldType;


/// Certain `FieldType` values refer to predefined text strings in the SDK.
///
/// # Example
///
/// ```
/// let field_type = FieldType::BodyLocation;
/// let parsed_value = 27;
/// let predefined_text = match_predefined_field_value(field_type, parsed_value);
/// assert_eq!(predefined_text, Some("left_forearm_extensors"));
/// ```
pub fn match_predefined_field_value(f: FieldType, k: usize) -> Option<&'static str> {
    match f {
        FieldType::Activity => match k {
            0 => Some("manual"),
            1 => Some("auto_multi_sport"),
            _ => None,
        }
        FieldType::ActivityClass => match k {
            127 => Some("level"),
            100 => Some("level_max"),
            128 => Some("athlete"),
            _ => None,
        }
        FieldType::ActivityLevel => match k {
            0 => Some("low"),
            1 => Some("medium"),
            2 => Some("high"),
            _ => None,
        }
        FieldType::ActivitySubtype => match k {
            0 => Some("generic"),
            1 => Some("treadmill"),
            2 => Some("street"),
            3 => Some("trail"),
            4 => Some("track"),
            5 => Some("spin"),
            6 => Some("indoor_cycling"),
            7 => Some("road"),
            8 => Some("mountain"),
            9 => Some("downhill"),
            10 => Some("recumbent"),
            11 => Some("cyclocross"),
            12 => Some("hand_cycling"),
            13 => Some("track_cycling"),
            14 => Some("indoor_rowing"),
            15 => Some("elliptical"),
            16 => Some("stair_climbing"),
            17 => Some("lap_swimming"),
            18 => Some("open_water"),
            254 => Some("all"),
            _ => None,
        }
        FieldType::ActivityType => match k {
            0 => Some("generic"),
            1 => Some("running"),
            2 => Some("cycling"),
            3 => Some("transition"),
            4 => Some("fitness_equipment"),
            5 => Some("swimming"),
            6 => Some("walking"),
            8 => Some("sedentary"),
            254 => Some("all"),
            _ => None,
        }
        FieldType::AntNetwork => match k {
            0 => Some("public"),
            1 => Some("antplus"),
            2 => Some("antfs"),
            3 => Some("private"),
            _ => None,
        }
        FieldType::AttitudeStage => match k {
            0 => Some("failed"),
            1 => Some("aligning"),
            2 => Some("degraded"),
            3 => Some("valid"),
            _ => None,
        }
        FieldType::AttitudeValidity => match k {
            1 => Some("track_angle_heading_valid"),
            2 => Some("pitch_valid"),
            4 => Some("roll_valid"),
            8 => Some("lateral_body_accel_valid"),
            16 => Some("normal_body_accel_valid"),
            32 => Some("turn_rate_valid"),
            64 => Some("hw_fail"),
            128 => Some("mag_invalid"),
            256 => Some("no_gps"),
            512 => Some("gps_invalid"),
            1024 => Some("solution_coasting"),
            2048 => Some("true_track_angle"),
            4096 => Some("magnetic_heading"),
            _ => None,
        }
        FieldType::AutoActivityDetect => match k {
            0 => Some("none"),
            1 => Some("running"),
            2 => Some("cycling"),
            4 => Some("swimming"),
            8 => Some("walking"),
            32 => Some("elliptical"),
            1024 => Some("sedentary"),
            _ => None,
        }
        FieldType::AutoSyncFrequency => match k {
            0 => Some("never"),
            1 => Some("occasionally"),
            2 => Some("frequent"),
            3 => Some("once_a_day"),
            4 => Some("remote"),
            _ => None,
        }
        FieldType::BacklightMode => match k {
            0 => Some("off"),
            1 => Some("manual"),
            2 => Some("key_and_messages"),
            3 => Some("auto_brightness"),
            4 => Some("smart_notifications"),
            5 => Some("key_and_messages_night"),
            6 => Some("key_and_messages_and_smart_notifications"),
            _ => None,
        }
        FieldType::BacklightTimeout => match k {
            0 => Some("infinite"),
            _ => None,
        }
        FieldType::BatteryStatus => match k {
            1 => Some("new"),
            2 => Some("good"),
            3 => Some("ok"),
            4 => Some("low"),
            5 => Some("critical"),
            6 => Some("charging"),
            7 => Some("unknown"),
            _ => None,
        }
        FieldType::BodyLocation => match k {
            0 => Some("left_leg"),
            1 => Some("left_calf"),
            2 => Some("left_shin"),
            3 => Some("left_hamstring"),
            4 => Some("left_quad"),
            5 => Some("left_glute"),
            6 => Some("right_leg"),
            7 => Some("right_calf"),
            8 => Some("right_shin"),
            9 => Some("right_hamstring"),
            10 => Some("right_quad"),
            11 => Some("right_glute"),
            12 => Some("torso_back"),
            13 => Some("left_lower_back"),
            14 => Some("left_upper_back"),
            15 => Some("right_lower_back"),
            16 => Some("right_upper_back"),
            17 => Some("torso_front"),
            18 => Some("left_abdomen"),
            19 => Some("left_chest"),
            20 => Some("right_abdomen"),
            21 => Some("right_chest"),
            22 => Some("left_arm"),
            23 => Some("left_shoulder"),
            24 => Some("left_bicep"),
            25 => Some("left_tricep"),
            26 => Some("left_brachioradialis"),
            27 => Some("left_forearm_extensors"),
            28 => Some("right_arm"),
            29 => Some("right_shoulder"),
            30 => Some("right_bicep"),
            31 => Some("right_tricep"),
            32 => Some("right_brachioradialis"),
            33 => Some("right_forearm_extensors"),
            34 => Some("neck"),
            35 => Some("throat"),
            36 => Some("waist_mid_back"),
            37 => Some("waist_front"),
            38 => Some("waist_left"),
            39 => Some("waist_right"),
            _ => None,
        }
        FieldType::BpStatus => match k {
            0 => Some("no_error"),
            1 => Some("error_incomplete_data"),
            2 => Some("error_no_measurement"),
            3 => Some("error_data_out_of_range"),
            4 => Some("error_irregular_heart_rate"),
            _ => None,
        }
        FieldType::CameraEventType => match k {
            0 => Some("video_start"),
            1 => Some("video_split"),
            2 => Some("video_end"),
            3 => Some("photo_taken"),
            4 => Some("video_second_stream_start"),
            5 => Some("video_second_stream_split"),
            6 => Some("video_second_stream_end"),
            7 => Some("video_split_start"),
            8 => Some("video_second_stream_split_start"),
            11 => Some("video_pause"),
            12 => Some("video_second_stream_pause"),
            13 => Some("video_resume"),
            14 => Some("video_second_stream_resume"),
            _ => None,
        }
        FieldType::CameraOrientationType => match k {
            0 => Some("camera_orientation_0"),
            1 => Some("camera_orientation_90"),
            2 => Some("camera_orientation_180"),
            3 => Some("camera_orientation_270"),
            _ => None,
        }
        FieldType::ConnectivityCapabilities => match k {
            1 => Some("bluetooth"),
            2 => Some("bluetooth_le"),
            4 => Some("ant"),
            8 => Some("activity_upload"),
            16 => Some("course_download"),
            32 => Some("workout_download"),
            64 => Some("live_track"),
            128 => Some("weather_conditions"),
            256 => Some("weather_alerts"),
            512 => Some("gps_ephemeris_download"),
            1024 => Some("explicit_archive"),
            2048 => Some("setup_incomplete"),
            4096 => Some("continue_sync_after_software_update"),
            8192 => Some("connect_iq_app_download"),
            16384 => Some("golf_course_download"),
            32768 => Some("device_initiates_sync"),
            65536 => Some("connect_iq_watch_app_download"),
            131072 => Some("connect_iq_widget_download"),
            262144 => Some("connect_iq_watch_face_download"),
            524288 => Some("connect_iq_data_field_download"),
            1048576 => Some("connect_iq_app_managment"),
            2097152 => Some("swing_sensor"),
            4194304 => Some("swing_sensor_remote"),
            8388608 => Some("incident_detection"),
            16777216 => Some("audio_prompts"),
            33554432 => Some("wifi_verification"),
            67108864 => Some("true_up"),
            134217728 => Some("find_my_watch"),
            268435456 => Some("remote_manual_sync"),
            536870912 => Some("live_track_auto_start"),
            1073741824 => Some("live_track_messaging"),
            2147483648 => Some("instant_input"),
            _ => None,
        }
        FieldType::CourseCapabilities => match k {
            1 => Some("processed"),
            2 => Some("valid"),
            4 => Some("time"),
            8 => Some("distance"),
            16 => Some("position"),
            32 => Some("heart_rate"),
            64 => Some("power"),
            128 => Some("cadence"),
            256 => Some("training"),
            512 => Some("navigation"),
            1024 => Some("bikeway"),
            _ => None,
        }
        FieldType::CoursePoint => match k {
            0 => Some("generic"),
            1 => Some("summit"),
            2 => Some("valley"),
            3 => Some("water"),
            4 => Some("food"),
            5 => Some("danger"),
            6 => Some("left"),
            7 => Some("right"),
            8 => Some("straight"),
            9 => Some("first_aid"),
            10 => Some("fourth_category"),
            11 => Some("third_category"),
            12 => Some("second_category"),
            13 => Some("first_category"),
            14 => Some("hors_category"),
            15 => Some("sprint"),
            16 => Some("left_fork"),
            17 => Some("right_fork"),
            18 => Some("middle_fork"),
            19 => Some("slight_left"),
            20 => Some("sharp_left"),
            21 => Some("slight_right"),
            22 => Some("sharp_right"),
            23 => Some("u_turn"),
            24 => Some("segment_start"),
            25 => Some("segment_end"),
            _ => None,
        }
        FieldType::DateMode => match k {
            0 => Some("day_month"),
            1 => Some("month_day"),
            _ => None,
        }
        FieldType::DateTime => match k {
            268435456 => Some("min"),
            _ => None,
        }
        FieldType::DayOfWeek => match k {
            0 => Some("sunday"),
            1 => Some("monday"),
            2 => Some("tuesday"),
            3 => Some("wednesday"),
            4 => Some("thursday"),
            5 => Some("friday"),
            6 => Some("saturday"),
            _ => None,
        }
        FieldType::DeviceIndex => match k {
            0 => Some("creator"),
            _ => None,
        }
        FieldType::DisplayHeart => match k {
            0 => Some("bpm"),
            1 => Some("max"),
            2 => Some("reserve"),
            _ => None,
        }
        FieldType::DisplayMeasure => match k {
            0 => Some("metric"),
            1 => Some("statute"),
            2 => Some("nautical"),
            _ => None,
        }
        FieldType::DisplayOrientation => match k {
            0 => Some("auto"),
            1 => Some("portrait"),
            2 => Some("landscape"),
            3 => Some("portrait_flipped"),
            4 => Some("landscape_flipped"),
            _ => None,
        }
        FieldType::DisplayPosition => match k {
            0 => Some("degree"),
            1 => Some("degree_minute"),
            2 => Some("degree_minute_second"),
            3 => Some("austrian_grid"),
            4 => Some("british_grid"),
            5 => Some("dutch_grid"),
            6 => Some("hungarian_grid"),
            7 => Some("finnish_grid"),
            8 => Some("german_grid"),
            9 => Some("icelandic_grid"),
            10 => Some("indonesian_equatorial"),
            11 => Some("indonesian_irian"),
            12 => Some("indonesian_southern"),
            13 => Some("india_zone_0"),
            14 => Some("india_zone_IA"),
            15 => Some("india_zone_IB"),
            16 => Some("india_zone_IIA"),
            17 => Some("india_zone_IIB"),
            18 => Some("india_zone_IIIA"),
            19 => Some("india_zone_IIIB"),
            20 => Some("india_zone_IVA"),
            21 => Some("india_zone_IVB"),
            22 => Some("irish_transverse"),
            23 => Some("irish_grid"),
            24 => Some("loran"),
            25 => Some("maidenhead_grid"),
            26 => Some("mgrs_grid"),
            27 => Some("new_zealand_grid"),
            28 => Some("new_zealand_transverse"),
            29 => Some("qatar_grid"),
            30 => Some("modified_swedish_grid"),
            31 => Some("swedish_grid"),
            32 => Some("south_african_grid"),
            33 => Some("swiss_grid"),
            34 => Some("taiwan_grid"),
            35 => Some("united_states_grid"),
            36 => Some("utm_ups_grid"),
            37 => Some("west_malayan"),
            38 => Some("borneo_rso"),
            39 => Some("estonian_grid"),
            40 => Some("latvian_grid"),
            41 => Some("swedish_ref_99_grid"),
            _ => None,
        }
        FieldType::DisplayPower => match k {
            0 => Some("watts"),
            1 => Some("percent_ftp"),
            _ => None,
        }
        FieldType::DiveAlarmType => match k {
            0 => Some("depth"),
            1 => Some("time"),
            _ => None,
        }
        FieldType::DiveBacklightMode => match k {
            0 => Some("at_depth"),
            1 => Some("always_on"),
            _ => None,
        }
        FieldType::DiveGasStatus => match k {
            0 => Some("disabled"),
            1 => Some("enabled"),
            2 => Some("backup_only"),
            _ => None,
        }
        FieldType::Event => match k {
            0 => Some("timer"),
            3 => Some("workout"),
            4 => Some("workout_step"),
            5 => Some("power_down"),
            6 => Some("power_up"),
            7 => Some("off_course"),
            8 => Some("session"),
            9 => Some("lap"),
            10 => Some("course_point"),
            11 => Some("battery"),
            12 => Some("virtual_partner_pace"),
            13 => Some("hr_high_alert"),
            14 => Some("hr_low_alert"),
            15 => Some("speed_high_alert"),
            16 => Some("speed_low_alert"),
            17 => Some("cad_high_alert"),
            18 => Some("cad_low_alert"),
            19 => Some("power_high_alert"),
            20 => Some("power_low_alert"),
            21 => Some("recovery_hr"),
            22 => Some("battery_low"),
            23 => Some("time_duration_alert"),
            24 => Some("distance_duration_alert"),
            25 => Some("calorie_duration_alert"),
            26 => Some("activity"),
            27 => Some("fitness_equipment"),
            28 => Some("length"),
            32 => Some("user_marker"),
            33 => Some("sport_point"),
            36 => Some("calibration"),
            42 => Some("front_gear_change"),
            43 => Some("rear_gear_change"),
            44 => Some("rider_position_change"),
            45 => Some("elev_high_alert"),
            46 => Some("elev_low_alert"),
            47 => Some("comm_timeout"),
            _ => None,
        }
        FieldType::EventType => match k {
            0 => Some("start"),
            1 => Some("stop"),
            2 => Some("consecutive_depreciated"),
            3 => Some("marker"),
            4 => Some("stop_all"),
            5 => Some("begin_depreciated"),
            6 => Some("end_depreciated"),
            7 => Some("end_all_depreciated"),
            8 => Some("stop_disable"),
            9 => Some("stop_disable_all"),
            _ => None,
        }
        FieldType::ExdDataUnits => match k {
            0 => Some("no_units"),
            1 => Some("laps"),
            2 => Some("miles_per_hour"),
            3 => Some("kilometers_per_hour"),
            4 => Some("feet_per_hour"),
            5 => Some("meters_per_hour"),
            6 => Some("degrees_celsius"),
            7 => Some("degrees_farenheit"),
            8 => Some("zone"),
            9 => Some("gear"),
            10 => Some("rpm"),
            11 => Some("bpm"),
            12 => Some("degrees"),
            13 => Some("millimeters"),
            14 => Some("meters"),
            15 => Some("kilometers"),
            16 => Some("feet"),
            17 => Some("yards"),
            18 => Some("kilofeet"),
            19 => Some("miles"),
            20 => Some("time"),
            21 => Some("enum_turn_type"),
            22 => Some("percent"),
            23 => Some("watts"),
            24 => Some("watts_per_kilogram"),
            25 => Some("enum_battery_status"),
            26 => Some("enum_bike_light_beam_angle_mode"),
            27 => Some("enum_bike_light_battery_status"),
            28 => Some("enum_bike_light_network_config_type"),
            29 => Some("lights"),
            30 => Some("seconds"),
            31 => Some("minutes"),
            32 => Some("hours"),
            33 => Some("calories"),
            34 => Some("kilojoules"),
            35 => Some("milliseconds"),
            36 => Some("second_per_mile"),
            37 => Some("second_per_kilometer"),
            38 => Some("centimeter"),
            39 => Some("enum_course_point"),
            40 => Some("bradians"),
            41 => Some("enum_sport"),
            42 => Some("inches_hg"),
            43 => Some("mm_hg"),
            44 => Some("mbars"),
            45 => Some("hecto_pascals"),
            46 => Some("feet_per_min"),
            47 => Some("meters_per_min"),
            48 => Some("meters_per_sec"),
            49 => Some("eight_cardinal"),
            _ => None,
        }
        FieldType::ExdDescriptors => match k {
            0 => Some("bike_light_battery_status"),
            1 => Some("beam_angle_status"),
            2 => Some("batery_level"),
            3 => Some("light_network_mode"),
            4 => Some("number_lights_connected"),
            5 => Some("cadence"),
            6 => Some("distance"),
            7 => Some("estimated_time_of_arrival"),
            8 => Some("heading"),
            9 => Some("time"),
            10 => Some("battery_level"),
            11 => Some("trainer_resistance"),
            12 => Some("trainer_target_power"),
            13 => Some("time_seated"),
            14 => Some("time_standing"),
            15 => Some("elevation"),
            16 => Some("grade"),
            17 => Some("ascent"),
            18 => Some("descent"),
            19 => Some("vertical_speed"),
            20 => Some("di2_battery_level"),
            21 => Some("front_gear"),
            22 => Some("rear_gear"),
            23 => Some("gear_ratio"),
            24 => Some("heart_rate"),
            25 => Some("heart_rate_zone"),
            26 => Some("time_in_heart_rate_zone"),
            27 => Some("heart_rate_reserve"),
            28 => Some("calories"),
            29 => Some("gps_accuracy"),
            30 => Some("gps_signal_strength"),
            31 => Some("temperature"),
            32 => Some("time_of_day"),
            33 => Some("balance"),
            34 => Some("pedal_smoothness"),
            35 => Some("power"),
            36 => Some("functional_threshold_power"),
            37 => Some("intensity_factor"),
            38 => Some("work"),
            39 => Some("power_ratio"),
            40 => Some("normalized_power"),
            41 => Some("training_stress_Score"),
            42 => Some("time_on_zone"),
            43 => Some("speed"),
            44 => Some("laps"),
            45 => Some("reps"),
            46 => Some("workout_step"),
            47 => Some("course_distance"),
            48 => Some("navigation_distance"),
            49 => Some("course_estimated_time_of_arrival"),
            50 => Some("navigation_estimated_time_of_arrival"),
            51 => Some("course_time"),
            52 => Some("navigation_time"),
            53 => Some("course_heading"),
            54 => Some("navigation_heading"),
            55 => Some("power_zone"),
            56 => Some("torque_effectiveness"),
            57 => Some("timer_time"),
            58 => Some("power_weight_ratio"),
            59 => Some("left_platform_center_offset"),
            60 => Some("right_platform_center_offset"),
            61 => Some("left_power_phase_start_angle"),
            62 => Some("right_power_phase_start_angle"),
            63 => Some("left_power_phase_finish_angle"),
            64 => Some("right_power_phase_finish_angle"),
            65 => Some("gears"),
            66 => Some("pace"),
            67 => Some("training_effect"),
            68 => Some("vertical_oscillation"),
            69 => Some("vertical_ratio"),
            70 => Some("ground_contact_time"),
            71 => Some("left_ground_contact_time_balance"),
            72 => Some("right_ground_contact_time_balance"),
            73 => Some("stride_length"),
            74 => Some("running_cadence"),
            75 => Some("performance_condition"),
            76 => Some("course_type"),
            77 => Some("time_in_power_zone"),
            78 => Some("navigation_turn"),
            79 => Some("course_location"),
            80 => Some("navigation_location"),
            81 => Some("compass"),
            82 => Some("gear_combo"),
            83 => Some("muscle_oxygen"),
            84 => Some("icon"),
            85 => Some("compass_heading"),
            86 => Some("gps_heading"),
            87 => Some("gps_elevation"),
            88 => Some("anaerobic_training_effect"),
            89 => Some("course"),
            90 => Some("off_course"),
            91 => Some("glide_ratio"),
            92 => Some("vertical_distance"),
            93 => Some("vmg"),
            94 => Some("ambient_pressure"),
            95 => Some("pressure"),
            96 => Some("vam"),
            _ => None,
        }
        FieldType::ExdDisplayType => match k {
            0 => Some("numerical"),
            1 => Some("simple"),
            2 => Some("graph"),
            3 => Some("bar"),
            4 => Some("circle_graph"),
            5 => Some("virtual_partner"),
            6 => Some("balance"),
            7 => Some("string_list"),
            8 => Some("string"),
            9 => Some("simple_dynamic_icon"),
            10 => Some("gauge"),
            _ => None,
        }
        FieldType::ExdLayout => match k {
            0 => Some("full_screen"),
            1 => Some("half_vertical"),
            2 => Some("half_horizontal"),
            3 => Some("half_vertical_right_split"),
            4 => Some("half_horizontal_bottom_split"),
            5 => Some("full_quarter_split"),
            6 => Some("half_vertical_left_split"),
            7 => Some("half_horizontal_top_split"),
            _ => None,
        }
        FieldType::ExdQualifiers => match k {
            0 => Some("no_qualifier"),
            1 => Some("instantaneous"),
            2 => Some("average"),
            3 => Some("lap"),
            4 => Some("maximum"),
            5 => Some("maximum_average"),
            6 => Some("maximum_lap"),
            7 => Some("last_lap"),
            8 => Some("average_lap"),
            9 => Some("to_destination"),
            10 => Some("to_go"),
            11 => Some("to_next"),
            12 => Some("next_course_point"),
            13 => Some("total"),
            14 => Some("three_second_average"),
            15 => Some("ten_second_average"),
            16 => Some("thirty_second_average"),
            17 => Some("percent_maximum"),
            18 => Some("percent_maximum_average"),
            19 => Some("lap_percent_maximum"),
            20 => Some("elapsed"),
            21 => Some("sunrise"),
            22 => Some("sunset"),
            23 => Some("compared_to_virtual_partner"),
            24 => Some("maximum_24h"),
            25 => Some("minimum_24h"),
            26 => Some("minimum"),
            27 => Some("first"),
            28 => Some("second"),
            29 => Some("third"),
            30 => Some("shifter"),
            31 => Some("last_sport"),
            32 => Some("moving"),
            33 => Some("stopped"),
            34 => Some("estimated_total"),
            242 => Some("zone_9"),
            243 => Some("zone_8"),
            244 => Some("zone_7"),
            245 => Some("zone_6"),
            246 => Some("zone_5"),
            247 => Some("zone_4"),
            248 => Some("zone_3"),
            249 => Some("zone_2"),
            250 => Some("zone_1"),
            _ => None,
        }
        FieldType::ExerciseCategory => match k {
            0 => Some("bench_press"),
            1 => Some("calf_raise"),
            2 => Some("cardio"),
            3 => Some("carry"),
            4 => Some("chop"),
            5 => Some("core"),
            6 => Some("crunch"),
            7 => Some("curl"),
            8 => Some("deadlift"),
            9 => Some("flye"),
            10 => Some("hip_raise"),
            11 => Some("hip_stability"),
            12 => Some("hip_swing"),
            13 => Some("hyperextension"),
            14 => Some("lateral_raise"),
            15 => Some("leg_curl"),
            16 => Some("leg_raise"),
            17 => Some("lunge"),
            18 => Some("olympic_lift"),
            19 => Some("plank"),
            20 => Some("plyo"),
            21 => Some("pull_up"),
            22 => Some("push_up"),
            23 => Some("row"),
            24 => Some("shoulder_press"),
            25 => Some("shoulder_stability"),
            26 => Some("shrug"),
            27 => Some("sit_up"),
            28 => Some("squat"),
            29 => Some("total_body"),
            30 => Some("triceps_extension"),
            31 => Some("warm_up"),
            32 => Some("run"),
            65534 => Some("unknown"),
            _ => None,
        }
        FieldType::File => match k {
            1 => Some("device"),
            2 => Some("settings"),
            3 => Some("sport"),
            4 => Some("activity"),
            5 => Some("workout"),
            6 => Some("course"),
            7 => Some("schedules"),
            9 => Some("weight"),
            10 => Some("totals"),
            11 => Some("goals"),
            14 => Some("blood_pressure"),
            15 => Some("monitoring_a"),
            20 => Some("activity_summary"),
            28 => Some("monitoring_daily"),
            32 => Some("monitoring_b"),
            34 => Some("segment"),
            35 => Some("segment_list"),
            40 => Some("exd_configuration"),
            247 => Some("mfg_range_min"),
            254 => Some("mfg_range_max"),
            _ => None,
        }
        FieldType::FileFlags => match k {
            2 => Some("read"),
            4 => Some("write"),
            8 => Some("erase"),
            _ => None,
        }
        FieldType::FitBaseType => match k {
            0 => Some("enum"),
            1 => Some("sint8"),
            2 => Some("uint8"),
            131 => Some("sint16"),
            132 => Some("uint16"),
            133 => Some("sint32"),
            134 => Some("uint32"),
            7 => Some("string"),
            136 => Some("float32"),
            137 => Some("float64"),
            10 => Some("uint8z"),
            139 => Some("uint16z"),
            140 => Some("uint32z"),
            13 => Some("byte"),
            142 => Some("sint64"),
            143 => Some("uint64"),
            144 => Some("uint64z"),
            _ => None,
        }
        FieldType::FitBaseUnit => match k {
            0 => Some("other"),
            1 => Some("kilogram"),
            2 => Some("pound"),
            _ => None,
        }
        FieldType::Gender => match k {
            0 => Some("female"),
            1 => Some("male"),
            _ => None,
        }
        FieldType::Goal => match k {
            0 => Some("time"),
            1 => Some("distance"),
            2 => Some("calories"),
            3 => Some("frequency"),
            4 => Some("steps"),
            5 => Some("ascent"),
            6 => Some("active_minutes"),
            _ => None,
        }
        FieldType::GoalRecurrence => match k {
            0 => Some("off"),
            1 => Some("daily"),
            2 => Some("weekly"),
            3 => Some("monthly"),
            4 => Some("yearly"),
            5 => Some("custom"),
            _ => None,
        }
        FieldType::GoalSource => match k {
            0 => Some("auto"),
            1 => Some("community"),
            2 => Some("user"),
            _ => None,
        }
        FieldType::HrType => match k {
            0 => Some("normal"),
            1 => Some("irregular"),
            _ => None,
        }
        FieldType::HrZoneCalc => match k {
            0 => Some("custom"),
            1 => Some("percent_max_hr"),
            2 => Some("percent_hrr"),
            _ => None,
        }
        FieldType::Intensity => match k {
            0 => Some("active"),
            1 => Some("rest"),
            2 => Some("warmup"),
            3 => Some("cooldown"),
            _ => None,
        }
        FieldType::Language => match k {
            0 => Some("english"),
            1 => Some("french"),
            2 => Some("italian"),
            3 => Some("german"),
            4 => Some("spanish"),
            5 => Some("croatian"),
            6 => Some("czech"),
            7 => Some("danish"),
            8 => Some("dutch"),
            9 => Some("finnish"),
            10 => Some("greek"),
            11 => Some("hungarian"),
            12 => Some("norwegian"),
            13 => Some("polish"),
            14 => Some("portuguese"),
            15 => Some("slovakian"),
            16 => Some("slovenian"),
            17 => Some("swedish"),
            18 => Some("russian"),
            19 => Some("turkish"),
            20 => Some("latvian"),
            21 => Some("ukrainian"),
            22 => Some("arabic"),
            23 => Some("farsi"),
            24 => Some("bulgarian"),
            25 => Some("romanian"),
            26 => Some("chinese"),
            27 => Some("japanese"),
            28 => Some("korean"),
            29 => Some("taiwanese"),
            30 => Some("thai"),
            31 => Some("hebrew"),
            32 => Some("brazilian_portuguese"),
            33 => Some("indonesian"),
            34 => Some("malaysian"),
            35 => Some("vietnamese"),
            36 => Some("burmese"),
            37 => Some("mongolian"),
            254 => Some("custom"),
            _ => None,
        }
        FieldType::LapTrigger => match k {
            0 => Some("manual"),
            1 => Some("time"),
            2 => Some("distance"),
            3 => Some("position_start"),
            4 => Some("position_lap"),
            5 => Some("position_waypoint"),
            6 => Some("position_marked"),
            7 => Some("session_end"),
            8 => Some("fitness_equipment"),
            _ => None,
        }
        FieldType::LeftRightBalance => match k {
            127 => Some("mask"),
            128 => Some("right"),
            _ => None,
        }
        FieldType::LeftRightBalance100 => match k {
            16383 => Some("mask"),
            32768 => Some("right"),
            _ => None,
        }
        FieldType::LengthType => match k {
            0 => Some("idle"),
            1 => Some("active"),
            _ => None,
        }
        FieldType::LocalDateTime => match k {
            268435456 => Some("min"),
            _ => None,
        }
        FieldType::LocaltimeIntoDay => match k {
            _ => None,
        }
        FieldType::Manufacturer => match k {
            1 => Some("garmin"),
            2 => Some("garmin_fr405_antfs"),
            3 => Some("zephyr"),
            4 => Some("dayton"),
            5 => Some("idt"),
            6 => Some("srm"),
            7 => Some("quarq"),
            8 => Some("ibike"),
            9 => Some("saris"),
            10 => Some("spark_hk"),
            11 => Some("tanita"),
            12 => Some("echowell"),
            13 => Some("dynastream_oem"),
            14 => Some("nautilus"),
            15 => Some("dynastream"),
            16 => Some("timex"),
            17 => Some("metrigear"),
            18 => Some("xelic"),
            19 => Some("beurer"),
            20 => Some("cardiosport"),
            21 => Some("a_and_d"),
            22 => Some("hmm"),
            23 => Some("suunto"),
            24 => Some("thita_elektronik"),
            25 => Some("gpulse"),
            26 => Some("clean_mobile"),
            27 => Some("pedal_brain"),
            28 => Some("peaksware"),
            29 => Some("saxonar"),
            30 => Some("lemond_fitness"),
            31 => Some("dexcom"),
            32 => Some("wahoo_fitness"),
            33 => Some("octane_fitness"),
            34 => Some("archinoetics"),
            35 => Some("the_hurt_box"),
            36 => Some("citizen_systems"),
            37 => Some("magellan"),
            38 => Some("osynce"),
            39 => Some("holux"),
            40 => Some("concept2"),
            42 => Some("one_giant_leap"),
            43 => Some("ace_sensor"),
            44 => Some("brim_brothers"),
            45 => Some("xplova"),
            46 => Some("perception_digital"),
            47 => Some("bf1systems"),
            48 => Some("pioneer"),
            49 => Some("spantec"),
            50 => Some("metalogics"),
            51 => Some("4iiiis"),
            52 => Some("seiko_epson"),
            53 => Some("seiko_epson_oem"),
            54 => Some("ifor_powell"),
            55 => Some("maxwell_guider"),
            56 => Some("star_trac"),
            57 => Some("breakaway"),
            58 => Some("alatech_technology_ltd"),
            59 => Some("mio_technology_europe"),
            60 => Some("rotor"),
            61 => Some("geonaute"),
            62 => Some("id_bike"),
            63 => Some("specialized"),
            64 => Some("wtek"),
            65 => Some("physical_enterprises"),
            66 => Some("north_pole_engineering"),
            67 => Some("bkool"),
            68 => Some("cateye"),
            69 => Some("stages_cycling"),
            70 => Some("sigmasport"),
            71 => Some("tomtom"),
            72 => Some("peripedal"),
            73 => Some("wattbike"),
            76 => Some("moxy"),
            77 => Some("ciclosport"),
            78 => Some("powerbahn"),
            79 => Some("acorn_projects_aps"),
            80 => Some("lifebeam"),
            81 => Some("bontrager"),
            82 => Some("wellgo"),
            83 => Some("scosche"),
            84 => Some("magura"),
            85 => Some("woodway"),
            86 => Some("elite"),
            87 => Some("nielsen_kellerman"),
            88 => Some("dk_city"),
            89 => Some("tacx"),
            90 => Some("direction_technology"),
            91 => Some("magtonic"),
            92 => Some("1partcarbon"),
            93 => Some("inside_ride_technologies"),
            94 => Some("sound_of_motion"),
            95 => Some("stryd"),
            96 => Some("icg"),
            97 => Some("MiPulse"),
            98 => Some("bsx_athletics"),
            99 => Some("look"),
            100 => Some("campagnolo_srl"),
            101 => Some("body_bike_smart"),
            102 => Some("praxisworks"),
            103 => Some("limits_technology"),
            104 => Some("topaction_technology"),
            105 => Some("cosinuss"),
            106 => Some("fitcare"),
            107 => Some("magene"),
            108 => Some("giant_manufacturing_co"),
            109 => Some("tigrasport"),
            110 => Some("salutron"),
            111 => Some("technogym"),
            112 => Some("bryton_sensors"),
            113 => Some("latitude_limited"),
            114 => Some("soaring_technology"),
            115 => Some("igpsport"),
            116 => Some("thinkrider"),
            117 => Some("gopher_sport"),
            118 => Some("waterrower"),
            119 => Some("orangetheory"),
            120 => Some("inpeak"),
            121 => Some("kinetic"),
            122 => Some("johnson_health_tech"),
            123 => Some("polar_electro"),
            124 => Some("seesense"),
            125 => Some("nci_technology"),
            126 => Some("iqsquare"),
            127 => Some("leomo"),
            128 => Some("ifit_com"),
            255 => Some("development"),
            257 => Some("healthandlife"),
            258 => Some("lezyne"),
            259 => Some("scribe_labs"),
            260 => Some("zwift"),
            261 => Some("watteam"),
            262 => Some("recon"),
            263 => Some("favero_electronics"),
            264 => Some("dynovelo"),
            265 => Some("strava"),
            266 => Some("precor"),
            267 => Some("bryton"),
            268 => Some("sram"),
            269 => Some("navman"),
            270 => Some("cobi"),
            271 => Some("spivi"),
            272 => Some("mio_magellan"),
            273 => Some("evesports"),
            274 => Some("sensitivus_gauge"),
            275 => Some("podoon"),
            276 => Some("life_time_fitness"),
            277 => Some("falco_e_motors"),
            278 => Some("minoura"),
            279 => Some("cycliq"),
            280 => Some("luxottica"),
            281 => Some("trainer_road"),
            282 => Some("the_sufferfest"),
            283 => Some("fullspeedahead"),
            284 => Some("virtualtraining"),
            285 => Some("feedbacksports"),
            286 => Some("omata"),
            287 => Some("vdo"),
            288 => Some("magneticdays"),
            289 => Some("hammerhead"),
            290 => Some("kinetic_by_kurt"),
            291 => Some("shapelog"),
            292 => Some("dabuziduo"),
            293 => Some("jetblack"),
            294 => Some("coros"),
            295 => Some("virtugo"),
            296 => Some("velosense"),
            297 => Some("cycligentinc"),
            298 => Some("trailforks"),
            299 => Some("mahle_ebikemotion"),
            5759 => Some("actigraphcorp"),
            _ => None,
        }
        FieldType::MesgCount => match k {
            0 => Some("num_per_file"),
            1 => Some("max_per_file"),
            2 => Some("max_per_file_type"),
            _ => None,
        }
        FieldType::MesgNum => match k {
            0 => Some("file_id"),
            1 => Some("capabilities"),
            2 => Some("device_settings"),
            3 => Some("user_profile"),
            4 => Some("hrm_profile"),
            5 => Some("sdm_profile"),
            6 => Some("bike_profile"),
            7 => Some("zones_target"),
            8 => Some("hr_zone"),
            9 => Some("power_zone"),
            10 => Some("met_zone"),
            12 => Some("sport"),
            15 => Some("goal"),
            18 => Some("session"),
            19 => Some("lap"),
            20 => Some("record"),
            21 => Some("event"),
            23 => Some("device_info"),
            26 => Some("workout"),
            27 => Some("workout_step"),
            28 => Some("schedule"),
            30 => Some("weight_scale"),
            31 => Some("course"),
            32 => Some("course_point"),
            33 => Some("totals"),
            34 => Some("activity"),
            35 => Some("software"),
            37 => Some("file_capabilities"),
            38 => Some("mesg_capabilities"),
            39 => Some("field_capabilities"),
            49 => Some("file_creator"),
            51 => Some("blood_pressure"),
            53 => Some("speed_zone"),
            55 => Some("monitoring"),
            72 => Some("training_file"),
            78 => Some("hrv"),
            80 => Some("ant_rx"),
            81 => Some("ant_tx"),
            82 => Some("ant_channel_id"),
            101 => Some("length"),
            103 => Some("monitoring_info"),
            105 => Some("pad"),
            106 => Some("slave_device"),
            127 => Some("connectivity"),
            128 => Some("weather_conditions"),
            129 => Some("weather_alert"),
            131 => Some("cadence_zone"),
            132 => Some("hr"),
            142 => Some("segment_lap"),
            145 => Some("memo_glob"),
            148 => Some("segment_id"),
            149 => Some("segment_leaderboard_entry"),
            150 => Some("segment_point"),
            151 => Some("segment_file"),
            158 => Some("workout_session"),
            159 => Some("watchface_settings"),
            160 => Some("gps_metadata"),
            161 => Some("camera_event"),
            162 => Some("timestamp_correlation"),
            164 => Some("gyroscope_data"),
            165 => Some("accelerometer_data"),
            167 => Some("three_d_sensor_calibration"),
            169 => Some("video_frame"),
            174 => Some("obdii_data"),
            177 => Some("nmea_sentence"),
            178 => Some("aviation_attitude"),
            184 => Some("video"),
            185 => Some("video_title"),
            186 => Some("video_description"),
            187 => Some("video_clip"),
            188 => Some("ohr_settings"),
            200 => Some("exd_screen_configuration"),
            201 => Some("exd_data_field_configuration"),
            202 => Some("exd_data_concept_configuration"),
            206 => Some("field_description"),
            207 => Some("developer_data_id"),
            208 => Some("magnetometer_data"),
            209 => Some("barometer_data"),
            210 => Some("one_d_sensor_calibration"),
            225 => Some("set"),
            227 => Some("stress_level"),
            258 => Some("dive_settings"),
            259 => Some("dive_gas"),
            262 => Some("dive_alarm"),
            264 => Some("exercise_title"),
            268 => Some("dive_summary"),
            285 => Some("jump"),
            65280 => Some("mfg_range_min"),
            65534 => Some("mfg_range_max"),
            _ => None,
        }
        FieldType::MessageIndex => match k {
            32768 => Some("selected"),
            28672 => Some("reserved"),
            4095 => Some("mask"),
            _ => None,
        }
        FieldType::PwrZoneCalc => match k {
            0 => Some("custom"),
            1 => Some("percent_ftp"),
            _ => None,
        }
        FieldType::Schedule => match k {
            0 => Some("workout"),
            1 => Some("course"),
            _ => None,
        }
        FieldType::SegmentDeleteStatus => match k {
            0 => Some("do_not_delete"),
            1 => Some("delete_one"),
            2 => Some("delete_all"),
            _ => None,
        }
        FieldType::SegmentLapStatus => match k {
            0 => Some("end"),
            1 => Some("fail"),
            _ => None,
        }
        FieldType::SegmentLeaderboardType => match k {
            0 => Some("overall"),
            1 => Some("personal_best"),
            2 => Some("connections"),
            3 => Some("group"),
            4 => Some("challenger"),
            5 => Some("kom"),
            6 => Some("qom"),
            7 => Some("pr"),
            8 => Some("goal"),
            9 => Some("rival"),
            10 => Some("club_leader"),
            _ => None,
        }
        FieldType::SegmentSelectionType => match k {
            0 => Some("starred"),
            1 => Some("suggested"),
            _ => None,
        }
        FieldType::SensorType => match k {
            0 => Some("accelerometer"),
            1 => Some("gyroscope"),
            2 => Some("compass"),
            3 => Some("barometer"),
            _ => None,
        }
        FieldType::SessionTrigger => match k {
            0 => Some("activity_end"),
            1 => Some("manual"),
            2 => Some("auto_multi_sport"),
            3 => Some("fitness_equipment"),
            _ => None,
        }
        FieldType::SetType => match k {
            0 => Some("rest"),
            1 => Some("active"),
            _ => None,
        }
        FieldType::Side => match k {
            0 => Some("right"),
            1 => Some("left"),
            _ => None,
        }
        FieldType::SourceType => match k {
            0 => Some("ant"),
            1 => Some("antplus"),
            2 => Some("bluetooth"),
            3 => Some("bluetooth_low_energy"),
            4 => Some("wifi"),
            5 => Some("local"),
            _ => None,
        }
        FieldType::Sport => match k {
            0 => Some("generic"),
            1 => Some("running"),
            2 => Some("cycling"),
            3 => Some("transition"),
            4 => Some("fitness_equipment"),
            5 => Some("swimming"),
            6 => Some("basketball"),
            7 => Some("soccer"),
            8 => Some("tennis"),
            9 => Some("american_football"),
            10 => Some("training"),
            11 => Some("walking"),
            12 => Some("cross_country_skiing"),
            13 => Some("alpine_skiing"),
            14 => Some("snowboarding"),
            15 => Some("rowing"),
            16 => Some("mountaineering"),
            17 => Some("hiking"),
            18 => Some("multisport"),
            19 => Some("paddling"),
            20 => Some("flying"),
            21 => Some("e_biking"),
            22 => Some("motorcycling"),
            23 => Some("boating"),
            24 => Some("driving"),
            25 => Some("golf"),
            26 => Some("hang_gliding"),
            27 => Some("horseback_riding"),
            28 => Some("hunting"),
            29 => Some("fishing"),
            30 => Some("inline_skating"),
            31 => Some("rock_climbing"),
            32 => Some("sailing"),
            33 => Some("ice_skating"),
            34 => Some("sky_diving"),
            35 => Some("snowshoeing"),
            36 => Some("snowmobiling"),
            37 => Some("stand_up_paddleboarding"),
            38 => Some("surfing"),
            39 => Some("wakeboarding"),
            40 => Some("water_skiing"),
            41 => Some("kayaking"),
            42 => Some("rafting"),
            43 => Some("windsurfing"),
            44 => Some("kitesurfing"),
            45 => Some("tactical"),
            46 => Some("jumpmaster"),
            47 => Some("boxing"),
            48 => Some("floor_climbing"),
            254 => Some("all"),
            _ => None,
        }
        FieldType::SportBits0 => match k {
            1 => Some("generic"),
            2 => Some("running"),
            4 => Some("cycling"),
            8 => Some("transition"),
            16 => Some("fitness_equipment"),
            32 => Some("swimming"),
            64 => Some("basketball"),
            128 => Some("soccer"),
            _ => None,
        }
        FieldType::SportEvent => match k {
            0 => Some("uncategorized"),
            1 => Some("geocaching"),
            2 => Some("fitness"),
            3 => Some("recreation"),
            4 => Some("race"),
            5 => Some("special_event"),
            6 => Some("training"),
            7 => Some("transportation"),
            8 => Some("touring"),
            _ => None,
        }
        FieldType::StrokeType => match k {
            0 => Some("no_event"),
            1 => Some("other"),
            2 => Some("serve"),
            3 => Some("forehand"),
            4 => Some("backhand"),
            5 => Some("smash"),
            _ => None,
        }
        FieldType::SubSport => match k {
            0 => Some("generic"),
            1 => Some("treadmill"),
            2 => Some("street"),
            3 => Some("trail"),
            4 => Some("track"),
            5 => Some("spin"),
            6 => Some("indoor_cycling"),
            7 => Some("road"),
            8 => Some("mountain"),
            9 => Some("downhill"),
            10 => Some("recumbent"),
            11 => Some("cyclocross"),
            12 => Some("hand_cycling"),
            13 => Some("track_cycling"),
            14 => Some("indoor_rowing"),
            15 => Some("elliptical"),
            16 => Some("stair_climbing"),
            17 => Some("lap_swimming"),
            18 => Some("open_water"),
            19 => Some("flexibility_training"),
            20 => Some("strength_training"),
            21 => Some("warm_up"),
            22 => Some("match"),
            23 => Some("exercise"),
            24 => Some("challenge"),
            25 => Some("indoor_skiing"),
            26 => Some("cardio_training"),
            27 => Some("indoor_walking"),
            28 => Some("e_bike_fitness"),
            29 => Some("bmx"),
            30 => Some("casual_walking"),
            31 => Some("speed_walking"),
            32 => Some("bike_to_run_transition"),
            33 => Some("run_to_bike_transition"),
            34 => Some("swim_to_bike_transition"),
            35 => Some("atv"),
            36 => Some("motocross"),
            37 => Some("backcountry"),
            38 => Some("resort"),
            39 => Some("rc_drone"),
            40 => Some("wingsuit"),
            41 => Some("whitewater"),
            42 => Some("skate_skiing"),
            43 => Some("yoga"),
            44 => Some("pilates"),
            45 => Some("indoor_running"),
            46 => Some("gravel_cycling"),
            47 => Some("e_bike_mountain"),
            48 => Some("commuting"),
            49 => Some("mixed_surface"),
            50 => Some("navigate"),
            51 => Some("track_me"),
            52 => Some("map"),
            53 => Some("single_gas_diving"),
            54 => Some("multi_gas_diving"),
            55 => Some("gauge_diving"),
            56 => Some("apnea_diving"),
            57 => Some("apnea_hunting"),
            58 => Some("virtual_activity"),
            59 => Some("obstacle"),
            254 => Some("all"),
            _ => None,
        }
        FieldType::SwimStroke => match k {
            0 => Some("freestyle"),
            1 => Some("backstroke"),
            2 => Some("breaststroke"),
            3 => Some("butterfly"),
            4 => Some("drill"),
            5 => Some("mixed"),
            6 => Some("im"),
            _ => None,
        }
        FieldType::Switch => match k {
            0 => Some("off"),
            1 => Some("on"),
            2 => Some("auto"),
            _ => None,
        }
        FieldType::TimeMode => match k {
            0 => Some("hour12"),
            1 => Some("hour24"),
            2 => Some("military"),
            3 => Some("hour_12_with_seconds"),
            4 => Some("hour_24_with_seconds"),
            5 => Some("utc"),
            _ => None,
        }
        FieldType::TissueModelType => match k {
            0 => Some("zhl_16c"),
            _ => None,
        }
        FieldType::Tone => match k {
            0 => Some("off"),
            1 => Some("tone"),
            2 => Some("vibrate"),
            3 => Some("tone_and_vibrate"),
            _ => None,
        }
        FieldType::UserLocalId => match k {
            0 => Some("local_min"),
            15 => Some("local_max"),
            16 => Some("stationary_min"),
            255 => Some("stationary_max"),
            256 => Some("portable_min"),
            65534 => Some("portable_max"),
            _ => None,
        }
        FieldType::WatchfaceMode => match k {
            0 => Some("digital"),
            1 => Some("analog"),
            2 => Some("connect_iq"),
            3 => Some("disabled"),
            _ => None,
        }
        FieldType::WaterType => match k {
            0 => Some("fresh"),
            1 => Some("salt"),
            2 => Some("en13319"),
            3 => Some("custom"),
            _ => None,
        }
        FieldType::WeatherReport => match k {
            0 => Some("current"),
            1 => Some("hourly_forecast"),
            2 => Some("daily_forecast"),
            _ => None,
        }
        FieldType::WeatherSevereType => match k {
            0 => Some("unspecified"),
            1 => Some("tornado"),
            2 => Some("tsunami"),
            3 => Some("hurricane"),
            4 => Some("extreme_wind"),
            5 => Some("typhoon"),
            6 => Some("inland_hurricane"),
            7 => Some("hurricane_force_wind"),
            8 => Some("waterspout"),
            9 => Some("severe_thunderstorm"),
            10 => Some("wreckhouse_winds"),
            11 => Some("les_suetes_wind"),
            12 => Some("avalanche"),
            13 => Some("flash_flood"),
            14 => Some("tropical_storm"),
            15 => Some("inland_tropical_storm"),
            16 => Some("blizzard"),
            17 => Some("ice_storm"),
            18 => Some("freezing_rain"),
            19 => Some("debris_flow"),
            20 => Some("flash_freeze"),
            21 => Some("dust_storm"),
            22 => Some("high_wind"),
            23 => Some("winter_storm"),
            24 => Some("heavy_freezing_spray"),
            25 => Some("extreme_cold"),
            26 => Some("wind_chill"),
            27 => Some("cold_wave"),
            28 => Some("heavy_snow_alert"),
            29 => Some("lake_effect_blowing_snow"),
            30 => Some("snow_squall"),
            31 => Some("lake_effect_snow"),
            32 => Some("winter_weather"),
            33 => Some("sleet"),
            34 => Some("snowfall"),
            35 => Some("snow_and_blowing_snow"),
            36 => Some("blowing_snow"),
            37 => Some("snow_alert"),
            38 => Some("arctic_outflow"),
            39 => Some("freezing_drizzle"),
            40 => Some("storm"),
            41 => Some("storm_surge"),
            42 => Some("rainfall"),
            43 => Some("areal_flood"),
            44 => Some("coastal_flood"),
            45 => Some("lakeshore_flood"),
            46 => Some("excessive_heat"),
            47 => Some("heat"),
            48 => Some("weather"),
            49 => Some("high_heat_and_humidity"),
            50 => Some("humidex_and_health"),
            51 => Some("humidex"),
            52 => Some("gale"),
            53 => Some("freezing_spray"),
            54 => Some("special_marine"),
            55 => Some("squall"),
            56 => Some("strong_wind"),
            57 => Some("lake_wind"),
            58 => Some("marine_weather"),
            59 => Some("wind"),
            60 => Some("small_craft_hazardous_seas"),
            61 => Some("hazardous_seas"),
            62 => Some("small_craft"),
            63 => Some("small_craft_winds"),
            64 => Some("small_craft_rough_bar"),
            65 => Some("high_water_level"),
            66 => Some("ashfall"),
            67 => Some("freezing_fog"),
            68 => Some("dense_fog"),
            69 => Some("dense_smoke"),
            70 => Some("blowing_dust"),
            71 => Some("hard_freeze"),
            72 => Some("freeze"),
            73 => Some("frost"),
            74 => Some("fire_weather"),
            75 => Some("flood"),
            76 => Some("rip_tide"),
            77 => Some("high_surf"),
            78 => Some("smog"),
            79 => Some("air_quality"),
            80 => Some("brisk_wind"),
            81 => Some("air_stagnation"),
            82 => Some("low_water"),
            83 => Some("hydrological"),
            84 => Some("special_weather"),
            _ => None,
        }
        FieldType::WeatherSeverity => match k {
            0 => Some("unknown"),
            1 => Some("warning"),
            2 => Some("watch"),
            3 => Some("advisory"),
            4 => Some("statement"),
            _ => None,
        }
        FieldType::WeatherStatus => match k {
            0 => Some("clear"),
            1 => Some("partly_cloudy"),
            2 => Some("mostly_cloudy"),
            3 => Some("rain"),
            4 => Some("snow"),
            5 => Some("windy"),
            6 => Some("thunderstorms"),
            7 => Some("wintry_mix"),
            8 => Some("fog"),
            11 => Some("hazy"),
            12 => Some("hail"),
            13 => Some("scattered_showers"),
            14 => Some("scattered_thunderstorms"),
            15 => Some("unknown_precipitation"),
            16 => Some("light_rain"),
            17 => Some("heavy_rain"),
            18 => Some("light_snow"),
            19 => Some("heavy_snow"),
            20 => Some("light_rain_snow"),
            21 => Some("heavy_rain_snow"),
            22 => Some("cloudy"),
            _ => None,
        }
        FieldType::Weight => match k {
            65534 => Some("calculating"),
            _ => None,
        }
        FieldType::WktStepDuration => match k {
            0 => Some("time"),
            1 => Some("distance"),
            2 => Some("hr_less_than"),
            3 => Some("hr_greater_than"),
            4 => Some("calories"),
            5 => Some("open"),
            6 => Some("repeat_until_steps_cmplt"),
            7 => Some("repeat_until_time"),
            8 => Some("repeat_until_distance"),
            9 => Some("repeat_until_calories"),
            10 => Some("repeat_until_hr_less_than"),
            11 => Some("repeat_until_hr_greater_than"),
            12 => Some("repeat_until_power_less_than"),
            13 => Some("repeat_until_power_greater_than"),
            14 => Some("power_less_than"),
            15 => Some("power_greater_than"),
            16 => Some("training_peaks_tss"),
            17 => Some("repeat_until_power_last_lap_less_than"),
            18 => Some("repeat_until_max_power_last_lap_less_than"),
            19 => Some("power_3s_less_than"),
            20 => Some("power_10s_less_than"),
            21 => Some("power_30s_less_than"),
            22 => Some("power_3s_greater_than"),
            23 => Some("power_10s_greater_than"),
            24 => Some("power_30s_greater_than"),
            25 => Some("power_lap_less_than"),
            26 => Some("power_lap_greater_than"),
            27 => Some("repeat_until_training_peaks_tss"),
            28 => Some("repetition_time"),
            29 => Some("reps"),
            _ => None,
        }
        FieldType::WktStepTarget => match k {
            0 => Some("speed"),
            1 => Some("heart_rate"),
            2 => Some("open"),
            3 => Some("cadence"),
            4 => Some("power"),
            5 => Some("grade"),
            6 => Some("resistance"),
            7 => Some("power_3s"),
            8 => Some("power_10s"),
            9 => Some("power_30s"),
            10 => Some("power_lap"),
            11 => Some("swim_stroke"),
            12 => Some("speed_lap"),
            13 => Some("heart_rate_lap"),
            _ => None,
        }
        FieldType::WorkoutCapabilities => match k {
            1 => Some("interval"),
            2 => Some("custom"),
            4 => Some("fitness_equipment"),
            8 => Some("firstbeat"),
            16 => Some("new_leaf"),
            32 => Some("tcx"),
            128 => Some("speed"),
            256 => Some("heart_rate"),
            512 => Some("distance"),
            1024 => Some("cadence"),
            2048 => Some("power"),
            4096 => Some("grade"),
            8192 => Some("resistance"),
            16384 => Some("protected"),
            _ => None,
        }
        FieldType::WorkoutEquipment => match k {
            0 => Some("none"),
            1 => Some("swim_fins"),
            2 => Some("swim_kickboard"),
            3 => Some("swim_paddles"),
            4 => Some("swim_pull_buoy"),
            5 => Some("swim_snorkel"),
            _ => None,
        }
        FieldType::None => None,
        _ => None
    }
}