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 package android.health.connect.internal.datatypes;
17 
18 import static android.health.connect.Constants.DEFAULT_DOUBLE;
19 import static android.health.connect.Constants.DEFAULT_INT;
20 
21 import android.annotation.NonNull;
22 import android.health.connect.datatypes.Identifier;
23 import android.health.connect.datatypes.MealType;
24 import android.health.connect.datatypes.NutritionRecord;
25 import android.health.connect.datatypes.RecordTypeIdentifier;
26 import android.health.connect.datatypes.units.Energy;
27 import android.health.connect.datatypes.units.Mass;
28 import android.os.Parcel;
29 
30 /**
31  * @hide
32  * @see NutritionRecord
33  */
34 @Identifier(recordIdentifier = RecordTypeIdentifier.RECORD_TYPE_NUTRITION)
35 public final class NutritionRecordInternal extends IntervalRecordInternal<NutritionRecord> {
36     private double mUnsaturatedFat = DEFAULT_DOUBLE;
37     private double mPotassium = DEFAULT_DOUBLE;
38     private double mThiamin = DEFAULT_DOUBLE;
39     private int mMealType = DEFAULT_INT;
40     private double mTransFat = DEFAULT_DOUBLE;
41     private double mManganese = DEFAULT_DOUBLE;
42     private double mEnergyFromFat = DEFAULT_DOUBLE;
43     private double mCaffeine = DEFAULT_DOUBLE;
44     private double mDietaryFiber = DEFAULT_DOUBLE;
45     private double mSelenium = DEFAULT_DOUBLE;
46     private double mVitaminB6 = DEFAULT_DOUBLE;
47     private double mProtein = DEFAULT_DOUBLE;
48     private double mChloride = DEFAULT_DOUBLE;
49     private double mCholesterol = DEFAULT_DOUBLE;
50     private double mCopper = DEFAULT_DOUBLE;
51     private double mIodine = DEFAULT_DOUBLE;
52     private double mVitaminB12 = DEFAULT_DOUBLE;
53     private double mZinc = DEFAULT_DOUBLE;
54     private double mRiboflavin = DEFAULT_DOUBLE;
55     private double mEnergy = DEFAULT_DOUBLE;
56     private double mMolybdenum = DEFAULT_DOUBLE;
57     private double mPhosphorus = DEFAULT_DOUBLE;
58     private double mChromium = DEFAULT_DOUBLE;
59     private double mTotalFat = DEFAULT_DOUBLE;
60     private double mCalcium = DEFAULT_DOUBLE;
61     private double mVitaminC = DEFAULT_DOUBLE;
62     private double mVitaminE = DEFAULT_DOUBLE;
63     private double mBiotin = DEFAULT_DOUBLE;
64     private double mVitaminD = DEFAULT_DOUBLE;
65     private double mNiacin = DEFAULT_DOUBLE;
66     private double mMagnesium = DEFAULT_DOUBLE;
67     private double mTotalCarbohydrate = DEFAULT_DOUBLE;
68     private double mVitaminK = DEFAULT_DOUBLE;
69     private double mPolyunsaturatedFat = DEFAULT_DOUBLE;
70     private double mSaturatedFat = DEFAULT_DOUBLE;
71     private double mSodium = DEFAULT_DOUBLE;
72     private double mFolate = DEFAULT_DOUBLE;
73     private double mMonounsaturatedFat = DEFAULT_DOUBLE;
74     private double mPantothenicAcid = DEFAULT_DOUBLE;
75 
76     @SuppressWarnings("NullAway.Init") // TODO(b/317029272): fix this suppression
77     private String mMealName;
78 
79     private double mIron = DEFAULT_DOUBLE;
80     private double mVitaminA = DEFAULT_DOUBLE;
81     private double mFolicAcid = DEFAULT_DOUBLE;
82     private double mSugar = DEFAULT_DOUBLE;
83 
getUnsaturatedFat()84     public double getUnsaturatedFat() {
85         return mUnsaturatedFat;
86     }
87 
88     /** returns this object with the specified unsaturatedFat */
89     @NonNull
setUnsaturatedFat(double unsaturatedFat)90     public NutritionRecordInternal setUnsaturatedFat(double unsaturatedFat) {
91         this.mUnsaturatedFat = unsaturatedFat;
92         return this;
93     }
94 
getPotassium()95     public double getPotassium() {
96         return mPotassium;
97     }
98 
99     /** returns this object with the specified potassium */
100     @NonNull
setPotassium(double potassium)101     public NutritionRecordInternal setPotassium(double potassium) {
102         this.mPotassium = potassium;
103         return this;
104     }
105 
getThiamin()106     public double getThiamin() {
107         return mThiamin;
108     }
109 
110     /** returns this object with the specified thiamin */
111     @NonNull
setThiamin(double thiamin)112     public NutritionRecordInternal setThiamin(double thiamin) {
113         this.mThiamin = thiamin;
114         return this;
115     }
116 
117     @MealType.MealTypes
getMealType()118     public int getMealType() {
119         return mMealType;
120     }
121 
122     /** returns this object with the specified mealType */
123     @NonNull
setMealType(int mealType)124     public NutritionRecordInternal setMealType(int mealType) {
125         this.mMealType = mealType;
126         return this;
127     }
128 
getTransFat()129     public double getTransFat() {
130         return mTransFat;
131     }
132 
133     /** returns this object with the specified transFat */
134     @NonNull
setTransFat(double transFat)135     public NutritionRecordInternal setTransFat(double transFat) {
136         this.mTransFat = transFat;
137         return this;
138     }
139 
getManganese()140     public double getManganese() {
141         return mManganese;
142     }
143 
144     /** returns this object with the specified manganese */
145     @NonNull
setManganese(double manganese)146     public NutritionRecordInternal setManganese(double manganese) {
147         this.mManganese = manganese;
148         return this;
149     }
150 
getEnergyFromFat()151     public double getEnergyFromFat() {
152         return mEnergyFromFat;
153     }
154 
155     /** returns this object with the specified energyFromFat */
156     @NonNull
setEnergyFromFat(double energyFromFat)157     public NutritionRecordInternal setEnergyFromFat(double energyFromFat) {
158         this.mEnergyFromFat = energyFromFat;
159         return this;
160     }
161 
getCaffeine()162     public double getCaffeine() {
163         return mCaffeine;
164     }
165 
166     /** returns this object with the specified caffeine */
167     @NonNull
setCaffeine(double caffeine)168     public NutritionRecordInternal setCaffeine(double caffeine) {
169         this.mCaffeine = caffeine;
170         return this;
171     }
172 
getDietaryFiber()173     public double getDietaryFiber() {
174         return mDietaryFiber;
175     }
176 
177     /** returns this object with the specified dietaryFiber */
178     @NonNull
setDietaryFiber(double dietaryFiber)179     public NutritionRecordInternal setDietaryFiber(double dietaryFiber) {
180         this.mDietaryFiber = dietaryFiber;
181         return this;
182     }
183 
getSelenium()184     public double getSelenium() {
185         return mSelenium;
186     }
187 
188     /** returns this object with the specified selenium */
189     @NonNull
setSelenium(double selenium)190     public NutritionRecordInternal setSelenium(double selenium) {
191         this.mSelenium = selenium;
192         return this;
193     }
194 
getVitaminB6()195     public double getVitaminB6() {
196         return mVitaminB6;
197     }
198 
199     /** returns this object with the specified vitaminB6 */
200     @NonNull
setVitaminB6(double vitaminB6)201     public NutritionRecordInternal setVitaminB6(double vitaminB6) {
202         this.mVitaminB6 = vitaminB6;
203         return this;
204     }
205 
getProtein()206     public double getProtein() {
207         return mProtein;
208     }
209 
210     /** returns this object with the specified protein */
211     @NonNull
setProtein(double protein)212     public NutritionRecordInternal setProtein(double protein) {
213         this.mProtein = protein;
214         return this;
215     }
216 
getChloride()217     public double getChloride() {
218         return mChloride;
219     }
220 
221     /** returns this object with the specified chloride */
222     @NonNull
setChloride(double chloride)223     public NutritionRecordInternal setChloride(double chloride) {
224         this.mChloride = chloride;
225         return this;
226     }
227 
getCholesterol()228     public double getCholesterol() {
229         return mCholesterol;
230     }
231 
232     /** returns this object with the specified cholesterol */
233     @NonNull
setCholesterol(double cholesterol)234     public NutritionRecordInternal setCholesterol(double cholesterol) {
235         this.mCholesterol = cholesterol;
236         return this;
237     }
238 
getCopper()239     public double getCopper() {
240         return mCopper;
241     }
242 
243     /** returns this object with the specified copper */
244     @NonNull
setCopper(double copper)245     public NutritionRecordInternal setCopper(double copper) {
246         this.mCopper = copper;
247         return this;
248     }
249 
getIodine()250     public double getIodine() {
251         return mIodine;
252     }
253 
254     /** returns this object with the specified iodine */
255     @NonNull
setIodine(double iodine)256     public NutritionRecordInternal setIodine(double iodine) {
257         this.mIodine = iodine;
258         return this;
259     }
260 
getVitaminB12()261     public double getVitaminB12() {
262         return mVitaminB12;
263     }
264 
265     /** returns this object with the specified vitaminB12 */
266     @NonNull
setVitaminB12(double vitaminB12)267     public NutritionRecordInternal setVitaminB12(double vitaminB12) {
268         this.mVitaminB12 = vitaminB12;
269         return this;
270     }
271 
getZinc()272     public double getZinc() {
273         return mZinc;
274     }
275 
276     /** returns this object with the specified zinc */
277     @NonNull
setZinc(double zinc)278     public NutritionRecordInternal setZinc(double zinc) {
279         this.mZinc = zinc;
280         return this;
281     }
282 
getRiboflavin()283     public double getRiboflavin() {
284         return mRiboflavin;
285     }
286 
287     /** returns this object with the specified riboflavin */
288     @NonNull
setRiboflavin(double riboflavin)289     public NutritionRecordInternal setRiboflavin(double riboflavin) {
290         this.mRiboflavin = riboflavin;
291         return this;
292     }
293 
getEnergy()294     public double getEnergy() {
295         return mEnergy;
296     }
297 
298     /** returns this object with the specified energy */
299     @NonNull
setEnergy(double energy)300     public NutritionRecordInternal setEnergy(double energy) {
301         this.mEnergy = energy;
302         return this;
303     }
304 
getMolybdenum()305     public double getMolybdenum() {
306         return mMolybdenum;
307     }
308 
309     /** returns this object with the specified molybdenum */
310     @NonNull
setMolybdenum(double molybdenum)311     public NutritionRecordInternal setMolybdenum(double molybdenum) {
312         this.mMolybdenum = molybdenum;
313         return this;
314     }
315 
getPhosphorus()316     public double getPhosphorus() {
317         return mPhosphorus;
318     }
319 
320     /** returns this object with the specified phosphorus */
321     @NonNull
setPhosphorus(double phosphorus)322     public NutritionRecordInternal setPhosphorus(double phosphorus) {
323         this.mPhosphorus = phosphorus;
324         return this;
325     }
326 
getChromium()327     public double getChromium() {
328         return mChromium;
329     }
330 
331     /** returns this object with the specified chromium */
332     @NonNull
setChromium(double chromium)333     public NutritionRecordInternal setChromium(double chromium) {
334         this.mChromium = chromium;
335         return this;
336     }
337 
getTotalFat()338     public double getTotalFat() {
339         return mTotalFat;
340     }
341 
342     /** returns this object with the specified totalFat */
343     @NonNull
setTotalFat(double totalFat)344     public NutritionRecordInternal setTotalFat(double totalFat) {
345         this.mTotalFat = totalFat;
346         return this;
347     }
348 
getCalcium()349     public double getCalcium() {
350         return mCalcium;
351     }
352 
353     /** returns this object with the specified calcium */
354     @NonNull
setCalcium(double calcium)355     public NutritionRecordInternal setCalcium(double calcium) {
356         this.mCalcium = calcium;
357         return this;
358     }
359 
getVitaminC()360     public double getVitaminC() {
361         return mVitaminC;
362     }
363 
364     /** returns this object with the specified vitaminC */
365     @NonNull
setVitaminC(double vitaminC)366     public NutritionRecordInternal setVitaminC(double vitaminC) {
367         this.mVitaminC = vitaminC;
368         return this;
369     }
370 
getVitaminE()371     public double getVitaminE() {
372         return mVitaminE;
373     }
374 
375     /** returns this object with the specified vitaminE */
376     @NonNull
setVitaminE(double vitaminE)377     public NutritionRecordInternal setVitaminE(double vitaminE) {
378         this.mVitaminE = vitaminE;
379         return this;
380     }
381 
getBiotin()382     public double getBiotin() {
383         return mBiotin;
384     }
385 
386     /** returns this object with the specified biotin */
387     @NonNull
setBiotin(double biotin)388     public NutritionRecordInternal setBiotin(double biotin) {
389         this.mBiotin = biotin;
390         return this;
391     }
392 
getVitaminD()393     public double getVitaminD() {
394         return mVitaminD;
395     }
396 
397     /** returns this object with the specified vitaminD */
398     @NonNull
setVitaminD(double vitaminD)399     public NutritionRecordInternal setVitaminD(double vitaminD) {
400         this.mVitaminD = vitaminD;
401         return this;
402     }
403 
getNiacin()404     public double getNiacin() {
405         return mNiacin;
406     }
407 
408     /** returns this object with the specified niacin */
409     @NonNull
setNiacin(double niacin)410     public NutritionRecordInternal setNiacin(double niacin) {
411         this.mNiacin = niacin;
412         return this;
413     }
414 
getMagnesium()415     public double getMagnesium() {
416         return mMagnesium;
417     }
418 
419     /** returns this object with the specified magnesium */
420     @NonNull
setMagnesium(double magnesium)421     public NutritionRecordInternal setMagnesium(double magnesium) {
422         this.mMagnesium = magnesium;
423         return this;
424     }
425 
getTotalCarbohydrate()426     public double getTotalCarbohydrate() {
427         return mTotalCarbohydrate;
428     }
429 
430     /** returns this object with the specified totalCarbohydrate */
431     @NonNull
setTotalCarbohydrate(double totalCarbohydrate)432     public NutritionRecordInternal setTotalCarbohydrate(double totalCarbohydrate) {
433         this.mTotalCarbohydrate = totalCarbohydrate;
434         return this;
435     }
436 
getVitaminK()437     public double getVitaminK() {
438         return mVitaminK;
439     }
440 
441     /** returns this object with the specified vitaminK */
442     @NonNull
setVitaminK(double vitaminK)443     public NutritionRecordInternal setVitaminK(double vitaminK) {
444         this.mVitaminK = vitaminK;
445         return this;
446     }
447 
getPolyunsaturatedFat()448     public double getPolyunsaturatedFat() {
449         return mPolyunsaturatedFat;
450     }
451 
452     /** returns this object with the specified polyunsaturatedFat */
453     @NonNull
setPolyunsaturatedFat(double polyunsaturatedFat)454     public NutritionRecordInternal setPolyunsaturatedFat(double polyunsaturatedFat) {
455         this.mPolyunsaturatedFat = polyunsaturatedFat;
456         return this;
457     }
458 
getSaturatedFat()459     public double getSaturatedFat() {
460         return mSaturatedFat;
461     }
462 
463     /** returns this object with the specified saturatedFat */
464     @NonNull
setSaturatedFat(double saturatedFat)465     public NutritionRecordInternal setSaturatedFat(double saturatedFat) {
466         this.mSaturatedFat = saturatedFat;
467         return this;
468     }
469 
getSodium()470     public double getSodium() {
471         return mSodium;
472     }
473 
474     /** returns this object with the specified sodium */
475     @NonNull
setSodium(double sodium)476     public NutritionRecordInternal setSodium(double sodium) {
477         this.mSodium = sodium;
478         return this;
479     }
480 
getFolate()481     public double getFolate() {
482         return mFolate;
483     }
484 
485     /** returns this object with the specified folate */
486     @NonNull
setFolate(double folate)487     public NutritionRecordInternal setFolate(double folate) {
488         this.mFolate = folate;
489         return this;
490     }
491 
getMonounsaturatedFat()492     public double getMonounsaturatedFat() {
493         return mMonounsaturatedFat;
494     }
495 
496     /** returns this object with the specified monounsaturatedFat */
497     @NonNull
setMonounsaturatedFat(double monounsaturatedFat)498     public NutritionRecordInternal setMonounsaturatedFat(double monounsaturatedFat) {
499         this.mMonounsaturatedFat = monounsaturatedFat;
500         return this;
501     }
502 
getPantothenicAcid()503     public double getPantothenicAcid() {
504         return mPantothenicAcid;
505     }
506 
507     /** returns this object with the specified pantothenicAcid */
508     @NonNull
setPantothenicAcid(double pantothenicAcid)509     public NutritionRecordInternal setPantothenicAcid(double pantothenicAcid) {
510         this.mPantothenicAcid = pantothenicAcid;
511         return this;
512     }
513 
getMealName()514     public String getMealName() {
515         return mMealName;
516     }
517 
518     /** returns this object with the specified name */
519     @NonNull
setMealName(String mealName)520     public NutritionRecordInternal setMealName(String mealName) {
521         this.mMealName = mealName;
522         return this;
523     }
524 
getIron()525     public double getIron() {
526         return mIron;
527     }
528 
529     /** returns this object with the specified iron */
530     @NonNull
setIron(double iron)531     public NutritionRecordInternal setIron(double iron) {
532         this.mIron = iron;
533         return this;
534     }
535 
getVitaminA()536     public double getVitaminA() {
537         return mVitaminA;
538     }
539 
540     /** returns this object with the specified vitaminA */
541     @NonNull
setVitaminA(double vitaminA)542     public NutritionRecordInternal setVitaminA(double vitaminA) {
543         this.mVitaminA = vitaminA;
544         return this;
545     }
546 
getFolicAcid()547     public double getFolicAcid() {
548         return mFolicAcid;
549     }
550 
551     /** returns this object with the specified folicAcid */
552     @NonNull
setFolicAcid(double folicAcid)553     public NutritionRecordInternal setFolicAcid(double folicAcid) {
554         this.mFolicAcid = folicAcid;
555         return this;
556     }
557 
getSugar()558     public double getSugar() {
559         return mSugar;
560     }
561 
562     /** returns this object with the specified sugar */
563     @NonNull
setSugar(double sugar)564     public NutritionRecordInternal setSugar(double sugar) {
565         this.mSugar = sugar;
566         return this;
567     }
568 
569     @NonNull
570     @Override
toExternalRecord()571     public NutritionRecord toExternalRecord() {
572         return new NutritionRecord.Builder(buildMetaData(), getStartTime(), getEndTime())
573                 .setUnsaturatedFat(Mass.fromGrams(getUnsaturatedFat()))
574                 .setPotassium(Mass.fromGrams(getPotassium()))
575                 .setThiamin(Mass.fromGrams(getThiamin()))
576                 .setMealType(getMealType())
577                 .setTransFat(Mass.fromGrams(getTransFat()))
578                 .setManganese(Mass.fromGrams(getManganese()))
579                 .setEnergyFromFat(Energy.fromCalories(getEnergyFromFat()))
580                 .setCaffeine(Mass.fromGrams(getCaffeine()))
581                 .setDietaryFiber(Mass.fromGrams(getDietaryFiber()))
582                 .setSelenium(Mass.fromGrams(getSelenium()))
583                 .setVitaminB6(Mass.fromGrams(getVitaminB6()))
584                 .setProtein(Mass.fromGrams(getProtein()))
585                 .setChloride(Mass.fromGrams(getChloride()))
586                 .setCholesterol(Mass.fromGrams(getCholesterol()))
587                 .setCopper(Mass.fromGrams(getCopper()))
588                 .setIodine(Mass.fromGrams(getIodine()))
589                 .setVitaminB12(Mass.fromGrams(getVitaminB12()))
590                 .setZinc(Mass.fromGrams(getZinc()))
591                 .setRiboflavin(Mass.fromGrams(getRiboflavin()))
592                 .setEnergy(Energy.fromCalories(getEnergy()))
593                 .setMolybdenum(Mass.fromGrams(getMolybdenum()))
594                 .setPhosphorus(Mass.fromGrams(getPhosphorus()))
595                 .setChromium(Mass.fromGrams(getChromium()))
596                 .setTotalFat(Mass.fromGrams(getTotalFat()))
597                 .setCalcium(Mass.fromGrams(getCalcium()))
598                 .setVitaminC(Mass.fromGrams(getVitaminC()))
599                 .setVitaminE(Mass.fromGrams(getVitaminE()))
600                 .setBiotin(Mass.fromGrams(getBiotin()))
601                 .setVitaminD(Mass.fromGrams(getVitaminD()))
602                 .setNiacin(Mass.fromGrams(getNiacin()))
603                 .setMagnesium(Mass.fromGrams(getMagnesium()))
604                 .setTotalCarbohydrate(Mass.fromGrams(getTotalCarbohydrate()))
605                 .setVitaminK(Mass.fromGrams(getVitaminK()))
606                 .setPolyunsaturatedFat(Mass.fromGrams(getPolyunsaturatedFat()))
607                 .setSaturatedFat(Mass.fromGrams(getSaturatedFat()))
608                 .setSodium(Mass.fromGrams(getSodium()))
609                 .setFolate(Mass.fromGrams(getFolate()))
610                 .setMonounsaturatedFat(Mass.fromGrams(getMonounsaturatedFat()))
611                 .setPantothenicAcid(Mass.fromGrams(getPantothenicAcid()))
612                 .setMealName(getMealName())
613                 .setIron(Mass.fromGrams(getIron()))
614                 .setVitaminA(Mass.fromGrams(getVitaminA()))
615                 .setFolicAcid(Mass.fromGrams(getFolicAcid()))
616                 .setSugar(Mass.fromGrams(getSugar()))
617                 .setStartZoneOffset(getStartZoneOffset())
618                 .setEndZoneOffset(getEndZoneOffset())
619                 .buildWithoutValidation();
620     }
621 
622     @Override
populateIntervalRecordFrom(@onNull Parcel parcel)623     void populateIntervalRecordFrom(@NonNull Parcel parcel) {
624         mUnsaturatedFat = parcel.readDouble();
625         mPotassium = parcel.readDouble();
626         mThiamin = parcel.readDouble();
627         mMealType = parcel.readInt();
628         mTransFat = parcel.readDouble();
629         mManganese = parcel.readDouble();
630         mEnergyFromFat = parcel.readDouble();
631         mCaffeine = parcel.readDouble();
632         mDietaryFiber = parcel.readDouble();
633         mSelenium = parcel.readDouble();
634         mVitaminB6 = parcel.readDouble();
635         mProtein = parcel.readDouble();
636         mChloride = parcel.readDouble();
637         mCholesterol = parcel.readDouble();
638         mCopper = parcel.readDouble();
639         mIodine = parcel.readDouble();
640         mVitaminB12 = parcel.readDouble();
641         mZinc = parcel.readDouble();
642         mRiboflavin = parcel.readDouble();
643         mEnergy = parcel.readDouble();
644         mMolybdenum = parcel.readDouble();
645         mPhosphorus = parcel.readDouble();
646         mChromium = parcel.readDouble();
647         mTotalFat = parcel.readDouble();
648         mCalcium = parcel.readDouble();
649         mVitaminC = parcel.readDouble();
650         mVitaminE = parcel.readDouble();
651         mBiotin = parcel.readDouble();
652         mVitaminD = parcel.readDouble();
653         mNiacin = parcel.readDouble();
654         mMagnesium = parcel.readDouble();
655         mTotalCarbohydrate = parcel.readDouble();
656         mVitaminK = parcel.readDouble();
657         mPolyunsaturatedFat = parcel.readDouble();
658         mSaturatedFat = parcel.readDouble();
659         mSodium = parcel.readDouble();
660         mFolate = parcel.readDouble();
661         mMonounsaturatedFat = parcel.readDouble();
662         mPantothenicAcid = parcel.readDouble();
663         mMealName = parcel.readString();
664         mIron = parcel.readDouble();
665         mVitaminA = parcel.readDouble();
666         mFolicAcid = parcel.readDouble();
667         mSugar = parcel.readDouble();
668     }
669 
670     @Override
populateIntervalRecordTo(@onNull Parcel parcel)671     void populateIntervalRecordTo(@NonNull Parcel parcel) {
672         parcel.writeDouble(mUnsaturatedFat);
673         parcel.writeDouble(mPotassium);
674         parcel.writeDouble(mThiamin);
675         parcel.writeInt(mMealType);
676         parcel.writeDouble(mTransFat);
677         parcel.writeDouble(mManganese);
678         parcel.writeDouble(mEnergyFromFat);
679         parcel.writeDouble(mCaffeine);
680         parcel.writeDouble(mDietaryFiber);
681         parcel.writeDouble(mSelenium);
682         parcel.writeDouble(mVitaminB6);
683         parcel.writeDouble(mProtein);
684         parcel.writeDouble(mChloride);
685         parcel.writeDouble(mCholesterol);
686         parcel.writeDouble(mCopper);
687         parcel.writeDouble(mIodine);
688         parcel.writeDouble(mVitaminB12);
689         parcel.writeDouble(mZinc);
690         parcel.writeDouble(mRiboflavin);
691         parcel.writeDouble(mEnergy);
692         parcel.writeDouble(mMolybdenum);
693         parcel.writeDouble(mPhosphorus);
694         parcel.writeDouble(mChromium);
695         parcel.writeDouble(mTotalFat);
696         parcel.writeDouble(mCalcium);
697         parcel.writeDouble(mVitaminC);
698         parcel.writeDouble(mVitaminE);
699         parcel.writeDouble(mBiotin);
700         parcel.writeDouble(mVitaminD);
701         parcel.writeDouble(mNiacin);
702         parcel.writeDouble(mMagnesium);
703         parcel.writeDouble(mTotalCarbohydrate);
704         parcel.writeDouble(mVitaminK);
705         parcel.writeDouble(mPolyunsaturatedFat);
706         parcel.writeDouble(mSaturatedFat);
707         parcel.writeDouble(mSodium);
708         parcel.writeDouble(mFolate);
709         parcel.writeDouble(mMonounsaturatedFat);
710         parcel.writeDouble(mPantothenicAcid);
711         parcel.writeString(mMealName);
712         parcel.writeDouble(mIron);
713         parcel.writeDouble(mVitaminA);
714         parcel.writeDouble(mFolicAcid);
715         parcel.writeDouble(mSugar);
716     }
717 }
718