/*
 * Copyright 2015 Open mHealth
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.openmhealth.shim.withings.domain;


/**
 * A body measure type included in responses from the Withings body measure endpoint, specifically in a 'meastype'
 * property.
 *
 * @author Chris Schaefbauer
 * @author Emerson Farrugia
 * @see {@link org.openmhealth.shim.withings.mapper.WithingsBodyMeasureDataPointMapper}
 * @see <a href="http://oauth.withings.com/api/doc#api-Measure-get_measure">Body Measures API documentation</a>
 */
public enum WithingsBodyMeasureType {

    BODY_WEIGHT(1),
    BODY_HEIGHT(4),
    // FAT_FREE_MASS(5), // TODO confirm what this means
    // FAT_RATIO(6), // TODO confirm what this means
    // FAT_MASS_WEIGHT(8), // TODO confirm what this means
    DIASTOLIC_BLOOD_PRESSURE(9),
    SYSTOLIC_BLOOD_PRESSURE(10),
    HEART_RATE(11),
    OXYGEN_SATURATION(54);

    private int magicNumber;

    WithingsBodyMeasureType(int magicNumber) {
        this.magicNumber = magicNumber;
    }

    /**
     * @return the magic number used to refer to this body measure type in responses
     */
    public int getMagicNumber() {
        return magicNumber;
    }
}

@@ -1117,177 +1117,8 @@
 4),%0A
-    // FAT_FREE_MASS(5), // TODO confirm what this means%0A    // FAT_RATIO(6), // TODO confirm what this means%0A    // FAT_MASS_WEIGHT(8), // TODO confirm what this means%0A
     
@@ -1146,16 +1146,16 @@
 URE(9),%0A
+
     SYST
@@ -1195,24 +1195,24 @@
 T_RATE(11),%0A
-
     OXYGEN_S
@@ -1224,16 +1224,42 @@
 TION(54)
+,%0A    BODY_TEMPERATURE(71)
 ;%0A%0A    p

Add Withings body temperature measure type