1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2021 Make.org
4  *
5  * This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Affero General Public License as
7  *  published by the Free Software Foundation, either version 3 of the
8  *  License, or (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Affero General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Affero General Public License
16  *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  *
18  */
19 
20 package org.make.core.demographics
21 
22 import org.make.core.StringValue
23 import org.make.core.technical.{Multilingual, MultilingualUtils}
24 import org.make.core.reference.Language
25 import org.make.core.question.QuestionId
26 
27 import cats.data.NonEmptyList
28 import enumeratum.{CirceEnum, Enum, EnumEntry}
29 import io.circe.generic.semiauto.deriveCodec
30 import io.circe.{Codec, Decoder, Encoder}
31 
32 import java.time.ZonedDateTime
33 
34 final case class DemographicsCardId(value: String) extends StringValue
35 
36 object DemographicsCardId {
37   implicit val codec: Codec[DemographicsCardId] =
38     Codec.from(Decoder[String].map(DemographicsCardId.apply), Encoder[String].contramap(_.value))
39 }
40 
41 final case class DemographicsCard(
42   id: DemographicsCardId,
43   name: String,
44   questionId: QuestionId,
45   layout: DemographicsCard.Layout,
46   dataType: String,
47   languages: NonEmptyList[Language],
48   titles: Multilingual[String],
49   parameters: NonEmptyList[LabelsValue],
50   createdAt: ZonedDateTime,
51   updatedAt: ZonedDateTime
52 ) {
53 
54   MultilingualUtils.hasRequiredTranslations(languages.toList.toSet, (titles -> "title") :: parameters.map {
55     case LabelsValue(key, value) => key -> s"Translations for parameter $value"
56   }.toList)
57 }
58 
59 object DemographicsCard {
60 
61   sealed abstract class Layout extends EnumEntry
62 
63   object Layout extends Enum[Layout] with CirceEnum[Layout] {
64     case object Select extends Layout
65     case object OneColumnRadio extends Layout
66     case object ThreeColumnsRadio extends Layout
67 
68     override val values: IndexedSeq[Layout] = findValues
69     final val swaggerAllowableValues = "Select,OneColumnRadio,ThreeColumnsRadio"
70   }
71 
72   val SKIPPED = "SKIPPED"
73 }
74 
75 final case class LabelsValue(label: Multilingual[String], value: String)
76 
77 object LabelsValue {
78   implicit val codec: Codec[LabelsValue] = deriveCodec
79 }
80 
81 final case class LabelValue(label: String, value: String)
82 
83 object LabelValue {
84   implicit val codec: Codec[LabelValue] = deriveCodec
85 }
Line Stmt Id Pos Tree Symbol Tests Code
38 5385 1312 - 1405 Apply io.circe.Codec.from org.make.api.technical.tracking.trackingapitest io.circe.Codec.from[org.make.core.demographics.DemographicsCardId](io.circe.Decoder.apply[String](circe.this.Decoder.decodeString).map[org.make.core.demographics.DemographicsCardId](((value: String) => DemographicsCardId.apply(value))), io.circe.Encoder.apply[String](circe.this.Encoder.encodeString).contramap[org.make.core.demographics.DemographicsCardId](((x$1: org.make.core.demographics.DemographicsCardId) => x$1.value)))
38 1996 1323 - 1368 Apply io.circe.Decoder.map org.make.api.technical.tracking.trackingapitest io.circe.Decoder.apply[String](circe.this.Decoder.decodeString).map[org.make.core.demographics.DemographicsCardId](((value: String) => DemographicsCardId.apply(value)))
38 4146 1396 - 1403 Select org.make.core.demographics.DemographicsCardId.value x$1.value
38 569 1330 - 1330 Select io.circe.Decoder.decodeString org.make.api.technical.tracking.trackingapitest circe.this.Decoder.decodeString
38 3900 1343 - 1367 Apply org.make.core.demographics.DemographicsCardId.apply org.make.api.technical.tracking.trackingapitest DemographicsCardId.apply(value)
38 2234 1370 - 1404 Apply io.circe.Encoder.contramap org.make.api.technical.tracking.trackingapitest io.circe.Encoder.apply[String](circe.this.Encoder.encodeString).contramap[org.make.core.demographics.DemographicsCardId](((x$1: org.make.core.demographics.DemographicsCardId) => x$1.value))
38 1005 1377 - 1377 Select io.circe.Encoder.encodeString org.make.api.technical.tracking.trackingapitest circe.this.Encoder.encodeString
54 506 1739 - 1936 Apply org.make.core.technical.MultilingualUtils.hasRequiredTranslations org.make.api.technical.tracking.trackingapitest,org.make.api.demographics.demographicscardservicetest org.make.core.technical.MultilingualUtils.hasRequiredTranslations(DemographicsCard.this.languages.toList.toSet[org.make.core.reference.Language], { final <synthetic> <artifact> val rassoc$1: (org.make.core.technical.Multilingual[String], String) = scala.Predef.ArrowAssoc[org.make.core.technical.Multilingual[String]](DemographicsCard.this.titles).->[String]("title"); DemographicsCard.this.parameters.map[(org.make.core.technical.Multilingual[String], String)](((x0$1: org.make.core.demographics.LabelsValue) => x0$1 match { case (label: org.make.core.technical.Multilingual[String], value: String): org.make.core.demographics.LabelsValue((key @ _), (value @ _)) => scala.Predef.ArrowAssoc[org.make.core.technical.Multilingual[String]](key).->[String](("Translations for parameter ".+(value): String)) })).toList.::[(org.make.core.technical.Multilingual[String], String)](rassoc$1) })
54 3637 1781 - 1803 TypeApply scala.collection.IterableOnceOps.toSet org.make.api.technical.tracking.trackingapitest,org.make.api.demographics.demographicscardservicetest DemographicsCard.this.languages.toList.toSet[org.make.core.reference.Language]
54 2515 1825 - 1935 Apply scala.collection.immutable.List.:: org.make.api.technical.tracking.trackingapitest,org.make.api.demographics.demographicscardservicetest DemographicsCard.this.parameters.map[(org.make.core.technical.Multilingual[String], String)](((x0$1: org.make.core.demographics.LabelsValue) => x0$1 match { case (label: org.make.core.technical.Multilingual[String], value: String): org.make.core.demographics.LabelsValue((key @ _), (value @ _)) => scala.Predef.ArrowAssoc[org.make.core.technical.Multilingual[String]](key).->[String](("Translations for parameter ".+(value): String)) })).toList.::[(org.make.core.technical.Multilingual[String], String)](rassoc$1)
69 3910 2309 - 2350 Literal <nosymbol> "Select,OneColumnRadio,ThreeColumnsRadio"
72 1876 2372 - 2381 Literal <nosymbol> org.make.api.technical.tracking.trackingapitest "SKIPPED"
78 947 2523 - 2534 ApplyToImplicitArgs io.circe.generic.semiauto.deriveCodec io.circe.generic.semiauto.deriveCodec[org.make.core.demographics.LabelsValue]({ val inst$macro$12: io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelsValue] = { final class anon$lazy$macro$11 extends AnyRef with Serializable { def <init>(): anon$lazy$macro$11 = { anon$lazy$macro$11.super.<init>(); () }; <stable> <accessor> lazy val inst$macro$1: io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelsValue] = codec.this.DerivedAsObjectCodec.deriveCodec[org.make.core.demographics.LabelsValue, shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.core.demographics.LabelsValue, (Symbol @@ String("label")) :: (Symbol @@ String("value")) :: shapeless.HNil, org.make.core.technical.Multilingual[String] :: String :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.core.demographics.LabelsValue, (Symbol @@ String("label")) :: (Symbol @@ String("value")) :: shapeless.HNil](::.apply[Symbol @@ String("label"), (Symbol @@ String("value")) :: shapeless.HNil.type](scala.Symbol.apply("label").asInstanceOf[Symbol @@ String("label")], ::.apply[Symbol @@ String("value"), shapeless.HNil.type](scala.Symbol.apply("value").asInstanceOf[Symbol @@ String("value")], HNil))), Generic.instance[org.make.core.demographics.LabelsValue, org.make.core.technical.Multilingual[String] :: String :: shapeless.HNil](((x0$3: org.make.core.demographics.LabelsValue) => x0$3 match { case (label: org.make.core.technical.Multilingual[String], value: String): org.make.core.demographics.LabelsValue((label$macro$8 @ _), (value$macro$9 @ _)) => ::.apply[org.make.core.technical.Multilingual[String], String :: shapeless.HNil.type](label$macro$8, ::.apply[String, shapeless.HNil.type](value$macro$9, HNil)).asInstanceOf[org.make.core.technical.Multilingual[String] :: String :: shapeless.HNil] }), ((x0$4: org.make.core.technical.Multilingual[String] :: String :: shapeless.HNil) => x0$4 match { case (head: org.make.core.technical.Multilingual[String], tail: String :: shapeless.HNil): org.make.core.technical.Multilingual[String] :: String :: shapeless.HNil((label$macro$6 @ _), (head: String, tail: shapeless.HNil): String :: shapeless.HNil((value$macro$7 @ _), HNil)) => demographics.this.LabelsValue.apply(label$macro$6, value$macro$7) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("label"), org.make.core.technical.Multilingual[String], (Symbol @@ String("value")) :: shapeless.HNil, String :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("value"), String, shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("value")]](scala.Symbol.apply("value").asInstanceOf[Symbol @@ String("value")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("value")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("label")]](scala.Symbol.apply("label").asInstanceOf[Symbol @@ String("label")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("label")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$11.this.inst$macro$10)).asInstanceOf[io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelsValue]]; <stable> <accessor> lazy val inst$macro$10: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForlabel: io.circe.Decoder[org.make.core.technical.Multilingual[String]] = technical.this.Multilingual.circeDecoder[String](circe.this.Decoder.decodeString); private[this] val circeGenericDecoderForvalue: io.circe.Decoder[String] = circe.this.Decoder.decodeString; private[this] val circeGenericEncoderForlabel: io.circe.Encoder[org.make.core.technical.Multilingual[String]] = technical.this.Multilingual.circeEncoder[String](circe.this.Encoder.encodeString); private[this] val circeGenericEncoderForvalue: io.circe.Encoder[String] = circe.this.Encoder.encodeString; final def encodeObject(a: shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): io.circe.JsonObject = a match { case (head: shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]], tail: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForlabel @ _), (head: shapeless.labelled.FieldType[Symbol @@ String("value"),String], tail: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForvalue @ _), shapeless.HNil)) => io.circe.JsonObject.fromIterable(scala.collection.immutable.Vector.apply[(String, io.circe.Json)](scala.Tuple2.apply[String, io.circe.Json]("label", $anon.this.circeGenericEncoderForlabel.apply(circeGenericHListBindingForlabel)), scala.Tuple2.apply[String, io.circe.Json]("value", $anon.this.circeGenericEncoderForvalue.apply(circeGenericHListBindingForvalue)))) }; final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("label"), org.make.core.technical.Multilingual[String], shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForlabel.tryDecode(c.downField("label")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("value"), String, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecode(c.downField("value")), ReprDecoder.hnilResult)(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance); final override def decodeAccumulating(c: io.circe.HCursor): io.circe.Decoder.AccumulatingResult[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("label"), org.make.core.technical.Multilingual[String], shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForlabel.tryDecodeAccumulating(c.downField("label")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("value"), String, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecodeAccumulating(c.downField("value")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),org.make.core.technical.Multilingual[String]] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$11().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelsValue]](inst$macro$12) })
84 4155 2659 - 2670 ApplyToImplicitArgs io.circe.generic.semiauto.deriveCodec io.circe.generic.semiauto.deriveCodec[org.make.core.demographics.LabelValue]({ val inst$macro$12: io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelValue] = { final class anon$lazy$macro$11 extends AnyRef with Serializable { def <init>(): anon$lazy$macro$11 = { anon$lazy$macro$11.super.<init>(); () }; <stable> <accessor> lazy val inst$macro$1: io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelValue] = codec.this.DerivedAsObjectCodec.deriveCodec[org.make.core.demographics.LabelValue, shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.core.demographics.LabelValue, (Symbol @@ String("label")) :: (Symbol @@ String("value")) :: shapeless.HNil, String :: String :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.core.demographics.LabelValue, (Symbol @@ String("label")) :: (Symbol @@ String("value")) :: shapeless.HNil](::.apply[Symbol @@ String("label"), (Symbol @@ String("value")) :: shapeless.HNil.type](scala.Symbol.apply("label").asInstanceOf[Symbol @@ String("label")], ::.apply[Symbol @@ String("value"), shapeless.HNil.type](scala.Symbol.apply("value").asInstanceOf[Symbol @@ String("value")], HNil))), Generic.instance[org.make.core.demographics.LabelValue, String :: String :: shapeless.HNil](((x0$3: org.make.core.demographics.LabelValue) => x0$3 match { case (label: String, value: String): org.make.core.demographics.LabelValue((label$macro$8 @ _), (value$macro$9 @ _)) => ::.apply[String, String :: shapeless.HNil.type](label$macro$8, ::.apply[String, shapeless.HNil.type](value$macro$9, HNil)).asInstanceOf[String :: String :: shapeless.HNil] }), ((x0$4: String :: String :: shapeless.HNil) => x0$4 match { case (head: String, tail: String :: shapeless.HNil): String :: String :: shapeless.HNil((label$macro$6 @ _), (head: String, tail: shapeless.HNil): String :: shapeless.HNil((value$macro$7 @ _), HNil)) => demographics.this.LabelValue.apply(label$macro$6, value$macro$7) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("label"), String, (Symbol @@ String("value")) :: shapeless.HNil, String :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("value"), String, shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("value")]](scala.Symbol.apply("value").asInstanceOf[Symbol @@ String("value")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("value")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("label")]](scala.Symbol.apply("label").asInstanceOf[Symbol @@ String("label")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("label")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$11.this.inst$macro$10)).asInstanceOf[io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelValue]]; <stable> <accessor> lazy val inst$macro$10: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForvalue: io.circe.Decoder[String] = circe.this.Decoder.decodeString; private[this] val circeGenericEncoderForvalue: io.circe.Encoder[String] = circe.this.Encoder.encodeString; final def encodeObject(a: shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): io.circe.JsonObject = a match { case (head: shapeless.labelled.FieldType[Symbol @@ String("label"),String], tail: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForlabel @ _), (head: shapeless.labelled.FieldType[Symbol @@ String("value"),String], tail: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForvalue @ _), shapeless.HNil)) => io.circe.JsonObject.fromIterable(scala.collection.immutable.Vector.apply[(String, io.circe.Json)](scala.Tuple2.apply[String, io.circe.Json]("label", $anon.this.circeGenericEncoderForvalue.apply(circeGenericHListBindingForlabel)), scala.Tuple2.apply[String, io.circe.Json]("value", $anon.this.circeGenericEncoderForvalue.apply(circeGenericHListBindingForvalue)))) }; final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("label"), String, shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecode(c.downField("label")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("value"), String, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecode(c.downField("value")), ReprDecoder.hnilResult)(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance); final override def decodeAccumulating(c: io.circe.HCursor): io.circe.Decoder.AccumulatingResult[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("label"), String, shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecodeAccumulating(c.downField("label")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("value"), String, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForvalue.tryDecodeAccumulating(c.downField("value")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("label"),String] :: shapeless.labelled.FieldType[Symbol @@ String("value"),String] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$11().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.codec.DerivedAsObjectCodec[org.make.core.demographics.LabelValue]](inst$macro$12) })