package Ġcom . ak m . lets cook . model . network . util Ċ Ċ import Ġcom . ak m . lets cook . model . network . Me als From Network Ċ import Ġcom . ak m . lets cook . model . network . Net Me al Ċ import Ġcom . ak m . lets cook . model . network . Net Me al Ingredient Ċ import Ġcom . squareup . mos hi . FromJson Ċ import Ġcom . squareup . mos hi . Json Qualifier Ċ import Ġcom . squareup . mos hi . ToJson Ċ Ċ @ Json Qualifier Ċ annotation Ġclass ĠE as ier Format Ċ Ċ class ĠMe als From Network Adapter Ġ{ ĊĠĠĠ Ġ@ E as ier Format ĊĠĠĠ Ġ@ FromJson ĊĠĠĠ Ġfun Ġnet Me als fromJson ( me als From Network : ĠMe als From Network ): ĠList < Net Me al > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnetwork Me als Ġ= Ġmutable ListOf < Net Me al >() ĊĠĠĠĠĠĠĠ Ġvar Ġnetwork Me al Ing redients : ĠMutable List < Net Me al Ingredient > ĊĊĠĠĠĠĠĠĠ Ġfor Ġ( meal From Network Ġin Ġme als From Network . me als ) Ġ{ ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients Ġ= Ġmutable ListOf () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 , Ġme al From Network . str Measure 1 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 2 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 2 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 2 , Ġme al From Network . str Measure 2 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 3 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 3 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 3 , Ġme al From Network . str Measure 3 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 4 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 4 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 4 , Ġme al From Network . str Measure 4 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 5 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 5 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 5 , Ġme al From Network . str Measure 5 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 6 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 6 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 6 , Ġme al From Network . str Measure 6 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 7 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 7 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 7 , Ġme al From Network . str Measure 7 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 8 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 8 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 8 , Ġme al From Network . str Measure 8 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 9 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 9 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 9 , Ġme al From Network . str Measure 9 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 0 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 0 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 0 , Ġme al From Network . str Measure 1 0 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 1 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 1 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 1 , Ġme al From Network . str Measure 1 1 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 2 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 2 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 2 , Ġme al From Network . str Measure 1 2 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 3 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 3 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 3 , Ġme al From Network . str Measure 1 3 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 4 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 4 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 4 , Ġme al From Network . str Measure 1 4 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 5 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 5 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 5 , Ġme al From Network . str Measure 1 5 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 6 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 6 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 6 , Ġme al From Network . str Measure 1 6 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 7 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 7 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 7 , Ġme al From Network . str Measure 1 7 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 8 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 8 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 8 , Ġme al From Network . str Measure 1 8 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 1 9 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 1 9 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 1 9 , Ġme al From Network . str Measure 1 9 )) ĊĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( meal From Network . str Ingredient 2 0 ?. isNotEmpty () Ġ== Ġtrue Ġ&& Ġme al From Network . str Measure 2 0 ?. isNotEmpty () Ġ== Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me al Ing redients . add ( Net Me al Ingredient ( meal From Network . str Ingredient 2 0 , Ġme al From Network . str Measure 2 0 )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Me als . add ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠNet Me al ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Ġ= Ġme al From Network . id Me al , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġme al From Network . str Me al , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthumbnail Url Ġ= Ġme al From Network . str Me al Thumb , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcategory Ġ= Ġme al From Network . str Category Ġ?: Ġ"", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinstructions Ġ= Ġme al From Network . str Instructions Ġ?: Ġ"", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġingredients Ġ= Ġnetwork Me al Ing redients . toList () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġnetwork Me als . toList () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ ToJson ĊĠĠĠ Ġfun Ġnet Me als ToJson (@ E as ier Format Ġnet Me als : ĠList < Net Me al >): ĠMe als From Network Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠUnsupportedOperationException () ĊĠĠĠ Ġ} Ċ Ċ }