1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.health.connect.datatypes;
18 
19 import android.annotation.IntDef;
20 
21 import java.lang.annotation.Retention;
22 import java.lang.annotation.RetentionPolicy;
23 import java.util.Set;
24 
25 /** Where on the user's body a temperature measurement was taken from. */
26 public final class BodyTemperatureMeasurementLocation {
27     /** Body measurement location unknown */
28     public static final int MEASUREMENT_LOCATION_UNKNOWN = 0;
29     /** Armpit (axillary) body temperature measurement. */
30     public static final int MEASUREMENT_LOCATION_ARMPIT = 1;
31     /** Finger body temperature measurement. */
32     public static final int MEASUREMENT_LOCATION_FINGER = 2;
33     /** Forehead body temperature measurement. */
34     public static final int MEASUREMENT_LOCATION_FOREHEAD = 3;
35     /** Mouth body temperature measurement. */
36     public static final int MEASUREMENT_LOCATION_MOUTH = 4;
37     /** Rectum body temperature measurement. */
38     public static final int MEASUREMENT_LOCATION_RECTUM = 5;
39     /** Temporal artery temperature measurement. */
40     public static final int MEASUREMENT_LOCATION_TEMPORAL_ARTERY = 6;
41     /** Toe body temperature measurement. */
42     public static final int MEASUREMENT_LOCATION_TOE = 7;
43     /** Ear (tympanic) body temperature measurement. */
44     public static final int MEASUREMENT_LOCATION_EAR = 8;
45     /** Wrist body temperature measurement. */
46     public static final int MEASUREMENT_LOCATION_WRIST = 9;
47     /** Vaginal body temperature measurement. */
48     public static final int MEASUREMENT_LOCATION_VAGINA = 10;
49 
50     /**
51      * Valid set of values for this IntDef. Update this set when add new type or deprecate existing
52      * type.
53      *
54      * @hide
55      */
56     public static final Set<Integer> VALID_TYPES =
57             Set.of(
58                     MEASUREMENT_LOCATION_UNKNOWN,
59                     MEASUREMENT_LOCATION_ARMPIT,
60                     MEASUREMENT_LOCATION_FINGER,
61                     MEASUREMENT_LOCATION_FOREHEAD,
62                     MEASUREMENT_LOCATION_MOUTH,
63                     MEASUREMENT_LOCATION_RECTUM,
64                     MEASUREMENT_LOCATION_TEMPORAL_ARTERY,
65                     MEASUREMENT_LOCATION_TOE,
66                     MEASUREMENT_LOCATION_EAR,
67                     MEASUREMENT_LOCATION_WRIST,
68                     MEASUREMENT_LOCATION_VAGINA);
69 
BodyTemperatureMeasurementLocation()70     private BodyTemperatureMeasurementLocation() {}
71 
72     /** @hide */
73     @IntDef({
74         MEASUREMENT_LOCATION_UNKNOWN,
75         MEASUREMENT_LOCATION_ARMPIT,
76         MEASUREMENT_LOCATION_FINGER,
77         MEASUREMENT_LOCATION_FOREHEAD,
78         MEASUREMENT_LOCATION_MOUTH,
79         MEASUREMENT_LOCATION_RECTUM,
80         MEASUREMENT_LOCATION_TEMPORAL_ARTERY,
81         MEASUREMENT_LOCATION_TOE,
82         MEASUREMENT_LOCATION_EAR,
83         MEASUREMENT_LOCATION_WRIST,
84         MEASUREMENT_LOCATION_VAGINA
85     })
86     @Retention(RetentionPolicy.SOURCE)
87     public @interface BodyTemperatureMeasurementLocations {}
88 }
89