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.api.question
21 
22 import cats.implicits._
23 import io.circe.Decoder
24 import io.circe.generic.semiauto.deriveDecoder
25 import io.swagger.annotations.ApiModelProperty
26 import org.make.core.Validation._
27 import org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils
28 
29 import scala.annotation.meta.field
30 
31 final case class AuthorRequest(
32   @(ApiModelProperty @field)(dataType = "int", example = "23", allowableValues = "range[8, 120)", required = true)
33   age: Option[Int],
34   firstName: String,
35   lastName: Option[String],
36   @(ApiModelProperty @field)(dataType = "string", example = "12345")
37   postalCode: Option[String],
38   profession: Option[String]
39 ) {
40 
41   (firstName.toSanitizedInput("fistName"), firstName.toNonEmpty("firstName")).tupled.throwIfInvalid()
42 
43   Seq(
44     age.map(BirthDate.fromAge(_).validatedAge("age").void),
45     lastName.map(_.toSanitizedInput("lastName").void),
46     postalCode.map(_.toSanitizedInput("postalCode").void),
47     postalCode.map(_.toPostalCode.void),
48     profession.map(_.toSanitizedInput("profession").void)
49   ).flatten.foreach(_.throwIfInvalid())
50 }
51 
52 object AuthorRequest {
53   implicit val decoder: Decoder[AuthorRequest] = deriveDecoder[AuthorRequest]
54 }
Line Stmt Id Pos Tree Symbol Tests Code
41 29792 1408 - 1507 Apply org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils.throwIfInvalid org.make.api.user.userservicetest org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils[(eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml], org.make.core.Validation.NonEmptyString)](cats.implicits.catsSyntaxTuple2Semigroupal[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml], org.make.core.Validation.NonEmptyString](scala.Tuple2.apply[cats.data.ValidatedNec[org.make.core.ValidationError,eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]], cats.data.ValidatedNec[org.make.core.ValidationError,org.make.core.Validation.NonEmptyString]]({ <artifact> val qual$1: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(AuthorRequest.this.firstName); <artifact> val x$1: String("fistName") = "fistName"; <artifact> val x$2: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$1.toSanitizedInput$default$2; qual$1.toSanitizedInput("fistName", x$2) }, { <artifact> val qual$2: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(AuthorRequest.this.firstName); <artifact> val x$3: String("firstName") = "firstName"; <artifact> val x$4: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$2.toNonEmpty$default$2; qual$2.toNonEmpty("firstName", x$4) })).tupled(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]), data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]))).throwIfInvalid()
44 28282 1561 - 1561 TypeApply cats.data.NonEmptyChainInstances.catsDataSemigroupForNonEmptyChain org.make.api.user.userservicetest data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]
44 29687 1561 - 1561 ApplyToImplicitArgs cats.data.ValidatedInstances.catsDataApplicativeErrorForValidated org.make.api.user.userservicetest data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])
44 28655 1562 - 1567 Literal <nosymbol> org.make.api.user.userservicetest "age"
44 28407 1520 - 1574 Apply scala.Option.map org.make.api.user.userservicetest AuthorRequest.this.age.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$1: Int) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.BirthDate]({ <artifact> val qual$3: org.make.core.Validation.BirthDate = org.make.core.Validation.BirthDate.fromAge(x$1); <artifact> val x$5: String("age") = "age"; <artifact> val x$6: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$3.validatedAge$default$2; qual$3.validatedAge("age", x$6) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))
44 30013 1549 - 1549 Select org.make.core.Validation.BirthDate.validatedAge$default$2 org.make.api.user.userservicetest qual$3.validatedAge$default$2
44 29088 1528 - 1568 Apply org.make.core.Validation.BirthDate.validatedAge org.make.api.user.userservicetest qual$3.validatedAge("age", x$6)
44 29336 1528 - 1573 Select cats.Functor.Ops.void org.make.api.user.userservicetest cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.BirthDate]({ <artifact> val qual$3: org.make.core.Validation.BirthDate = org.make.core.Validation.BirthDate.fromAge(x$1); <artifact> val x$5: String("age") = "age"; <artifact> val x$6: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$3.validatedAge$default$2; qual$3.validatedAge("age", x$6) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void
44 28977 1528 - 1548 Apply org.make.core.Validation.BirthDate.fromAge org.make.api.user.userservicetest org.make.core.Validation.BirthDate.fromAge(x$1)
45 28987 1612 - 1622 Literal <nosymbol> "lastName"
45 29696 1593 - 1628 Select cats.Functor.Ops.void cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$4: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$2); <artifact> val x$7: String("lastName") = "lastName"; <artifact> val x$8: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$4.toSanitizedInput$default$2; qual$4.toSanitizedInput("lastName", x$8) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void
45 29851 1593 - 1594 ApplyImplicitView org.make.core.Validation.StringWithParsers org.make.core.Validation.StringWithParsers(x$2)
45 29316 1580 - 1629 Apply scala.Option.map org.make.api.user.userservicetest AuthorRequest.this.lastName.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$2: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$4: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$2); <artifact> val x$7: String("lastName") = "lastName"; <artifact> val x$8: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$4.toSanitizedInput$default$2; qual$4.toSanitizedInput("lastName", x$8) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))
45 28355 1611 - 1611 ApplyToImplicitArgs cats.data.ValidatedInstances.catsDataApplicativeErrorForValidated data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])
45 30018 1593 - 1623 Apply org.make.core.Validation.StringWithParsers.toSanitizedInput qual$4.toSanitizedInput("lastName", x$8)
45 28644 1595 - 1595 Select org.make.core.Validation.StringWithParsers.toSanitizedInput$default$2 qual$4.toSanitizedInput$default$2
45 29149 1611 - 1611 TypeApply cats.data.NonEmptyChainInstances.catsDataSemigroupForNonEmptyChain data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]
46 28509 1650 - 1651 ApplyImplicitView org.make.core.Validation.StringWithParsers org.make.core.Validation.StringWithParsers(x$3)
46 29854 1669 - 1681 Literal <nosymbol> "postalCode"
46 29674 1635 - 1688 Apply scala.Option.map org.make.api.user.userservicetest AuthorRequest.this.postalCode.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$3: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$5: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$3); <artifact> val x$9: String("postalCode") = "postalCode"; <artifact> val x$10: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$5.toSanitizedInput$default$2; qual$5.toSanitizedInput("postalCode", x$10) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))
46 28645 1650 - 1682 Apply org.make.core.Validation.StringWithParsers.toSanitizedInput qual$5.toSanitizedInput("postalCode", x$10)
46 29058 1652 - 1652 Select org.make.core.Validation.StringWithParsers.toSanitizedInput$default$2 qual$5.toSanitizedInput$default$2
46 28360 1650 - 1687 Select cats.Functor.Ops.void cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$5: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$3); <artifact> val x$9: String("postalCode") = "postalCode"; <artifact> val x$10: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$5.toSanitizedInput$default$2; qual$5.toSanitizedInput("postalCode", x$10) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void
46 29123 1668 - 1668 ApplyToImplicitArgs cats.data.ValidatedInstances.catsDataApplicativeErrorForValidated data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])
46 30023 1668 - 1668 TypeApply cats.data.NonEmptyChainInstances.catsDataSemigroupForNonEmptyChain data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]
47 28446 1711 - 1711 TypeApply cats.data.NonEmptyChainInstances.catsDataSemigroupForNonEmptyChain data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]
47 30404 1694 - 1729 Apply scala.Option.map org.make.api.user.userservicetest AuthorRequest.this.postalCode.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$4: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.PostalCode](org.make.core.Validation.StringWithParsers(x$4).toPostalCode)(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))
47 29318 1709 - 1723 Select org.make.core.Validation.StringWithParsers.toPostalCode org.make.core.Validation.StringWithParsers(x$4).toPostalCode
47 29060 1709 - 1728 Select cats.Functor.Ops.void cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.PostalCode](org.make.core.Validation.StringWithParsers(x$4).toPostalCode)(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void
47 29822 1711 - 1711 ApplyToImplicitArgs cats.data.ValidatedInstances.catsDataApplicativeErrorForValidated data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])
48 29684 1750 - 1782 Apply org.make.core.Validation.StringWithParsers.toSanitizedInput qual$6.toSanitizedInput("profession", x$12)
48 29992 1750 - 1751 ApplyImplicitView org.make.core.Validation.StringWithParsers org.make.core.Validation.StringWithParsers(x$5)
48 29824 1750 - 1787 Select cats.Functor.Ops.void cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$6: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$5); <artifact> val x$11: String("profession") = "profession"; <artifact> val x$12: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$6.toSanitizedInput$default$2; qual$6.toSanitizedInput("profession", x$12) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void
48 29126 1769 - 1781 Literal <nosymbol> "profession"
48 28435 1768 - 1768 ApplyToImplicitArgs cats.data.ValidatedInstances.catsDataApplicativeErrorForValidated data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])
48 28949 1735 - 1788 Apply scala.Option.map org.make.api.user.userservicetest AuthorRequest.this.profession.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$5: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$6: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$5); <artifact> val x$11: String("profession") = "profession"; <artifact> val x$12: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$6.toSanitizedInput$default$2; qual$6.toSanitizedInput("profession", x$12) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))
48 28324 1752 - 1752 Select org.make.core.Validation.StringWithParsers.toSanitizedInput$default$2 qual$6.toSanitizedInput$default$2
48 29275 1768 - 1768 TypeApply cats.data.NonEmptyChainInstances.catsDataSemigroupForNonEmptyChain data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError]
49 30372 1793 - 1793 TypeApply scala.Predef.$conforms org.make.api.user.userservicetest scala.Predef.$conforms[Option[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]]]
49 29110 1511 - 1828 Apply scala.collection.IterableOnceOps.foreach org.make.api.user.userservicetest scala.`package`.Seq.apply[Option[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]]](AuthorRequest.this.age.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$1: Int) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.BirthDate]({ <artifact> val qual$3: org.make.core.Validation.BirthDate = org.make.core.Validation.BirthDate.fromAge(x$1); <artifact> val x$5: String("age") = "age"; <artifact> val x$6: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$3.validatedAge$default$2; qual$3.validatedAge("age", x$6) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void)), AuthorRequest.this.lastName.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$2: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$4: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$2); <artifact> val x$7: String("lastName") = "lastName"; <artifact> val x$8: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$4.toSanitizedInput$default$2; qual$4.toSanitizedInput("lastName", x$8) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void)), AuthorRequest.this.postalCode.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$3: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$5: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$3); <artifact> val x$9: String("postalCode") = "postalCode"; <artifact> val x$10: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$5.toSanitizedInput$default$2; qual$5.toSanitizedInput("postalCode", x$10) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void)), AuthorRequest.this.postalCode.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$4: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], org.make.core.Validation.PostalCode](org.make.core.Validation.StringWithParsers(x$4).toPostalCode)(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void)), AuthorRequest.this.profession.map[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](((x$5: String) => cats.implicits.toFunctorOps[[+A]cats.data.ValidatedNec[org.make.core.ValidationError,A], eu.timepit.refined.api.Refined[String,org.make.core.Validation.ValidHtml]]({ <artifact> val qual$6: org.make.core.Validation.StringWithParsers = org.make.core.Validation.StringWithParsers(x$5); <artifact> val x$11: String("profession") = "profession"; <artifact> val x$12: Option[String] @scala.reflect.internal.annotations.uncheckedBounds = qual$6.toSanitizedInput$default$2; qual$6.toSanitizedInput("profession", x$12) })(data.this.Validated.catsDataApplicativeErrorForValidated[cats.data.NonEmptyChain[org.make.core.ValidationError]](data.this.NonEmptyChainImpl.catsDataSemigroupForNonEmptyChain[org.make.core.ValidationError])).void))).flatten[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]](scala.Predef.$conforms[Option[cats.data.ValidatedNec[org.make.core.ValidationError,Unit]]]).foreach[Unit](((x$6: cats.data.ValidatedNec[org.make.core.ValidationError,Unit]) => org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils[Unit](x$6).throwIfInvalid()))
49 30017 1809 - 1827 Apply org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils.throwIfInvalid org.make.api.user.userservicetest org.make.core.technical.ValidatedUtils.ValidatedNecWithUtils[Unit](x$6).throwIfInvalid()
53 28328 1904 - 1932 ApplyToImplicitArgs io.circe.generic.semiauto.deriveDecoder io.circe.generic.semiauto.deriveDecoder[org.make.api.question.AuthorRequest]({ val inst$macro$24: io.circe.generic.decoding.DerivedDecoder[org.make.api.question.AuthorRequest] = { final class anon$lazy$macro$23 extends AnyRef with Serializable { def <init>(): anon$lazy$macro$23 = { anon$lazy$macro$23.super.<init>(); () }; <stable> <accessor> lazy val inst$macro$1: io.circe.generic.decoding.DerivedDecoder[org.make.api.question.AuthorRequest] = decoding.this.DerivedDecoder.deriveDecoder[org.make.api.question.AuthorRequest, shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.api.question.AuthorRequest, (Symbol @@ String("age")) :: (Symbol @@ String("firstName")) :: (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil, Option[Int] :: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.api.question.AuthorRequest, (Symbol @@ String("age")) :: (Symbol @@ String("firstName")) :: (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil](::.apply[Symbol @@ String("age"), (Symbol @@ String("firstName")) :: (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil.type](scala.Symbol.apply("age").asInstanceOf[Symbol @@ String("age")], ::.apply[Symbol @@ String("firstName"), (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil.type](scala.Symbol.apply("firstName").asInstanceOf[Symbol @@ String("firstName")], ::.apply[Symbol @@ String("lastName"), (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil.type](scala.Symbol.apply("lastName").asInstanceOf[Symbol @@ String("lastName")], ::.apply[Symbol @@ String("postalCode"), (Symbol @@ String("profession")) :: shapeless.HNil.type](scala.Symbol.apply("postalCode").asInstanceOf[Symbol @@ String("postalCode")], ::.apply[Symbol @@ String("profession"), shapeless.HNil.type](scala.Symbol.apply("profession").asInstanceOf[Symbol @@ String("profession")], HNil)))))), Generic.instance[org.make.api.question.AuthorRequest, Option[Int] :: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil](((x0$3: org.make.api.question.AuthorRequest) => x0$3 match { case (age: Option[Int], firstName: String, lastName: Option[String], postalCode: Option[String], profession: Option[String]): org.make.api.question.AuthorRequest((age$macro$17 @ _), (firstName$macro$18 @ _), (lastName$macro$19 @ _), (postalCode$macro$20 @ _), (profession$macro$21 @ _)) => ::.apply[Option[Int], String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil.type](age$macro$17, ::.apply[String, Option[String] :: Option[String] :: Option[String] :: shapeless.HNil.type](firstName$macro$18, ::.apply[Option[String], Option[String] :: Option[String] :: shapeless.HNil.type](lastName$macro$19, ::.apply[Option[String], Option[String] :: shapeless.HNil.type](postalCode$macro$20, ::.apply[Option[String], shapeless.HNil.type](profession$macro$21, HNil))))).asInstanceOf[Option[Int] :: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil] }), ((x0$4: Option[Int] :: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil) => x0$4 match { case (head: Option[Int], tail: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil): Option[Int] :: String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil((age$macro$12 @ _), (head: String, tail: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil): String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil((firstName$macro$13 @ _), (head: Option[String], tail: Option[String] :: Option[String] :: shapeless.HNil): Option[String] :: Option[String] :: Option[String] :: shapeless.HNil((lastName$macro$14 @ _), (head: Option[String], tail: Option[String] :: shapeless.HNil): Option[String] :: Option[String] :: shapeless.HNil((postalCode$macro$15 @ _), (head: Option[String], tail: shapeless.HNil): Option[String] :: shapeless.HNil((profession$macro$16 @ _), HNil))))) => question.this.AuthorRequest.apply(age$macro$12, firstName$macro$13, lastName$macro$14, postalCode$macro$15, profession$macro$16) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("age"), Option[Int], (Symbol @@ String("firstName")) :: (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil, String :: Option[String] :: Option[String] :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("firstName"), String, (Symbol @@ String("lastName")) :: (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil, Option[String] :: Option[String] :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("lastName"), Option[String], (Symbol @@ String("postalCode")) :: (Symbol @@ String("profession")) :: shapeless.HNil, Option[String] :: Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("postalCode"), Option[String], (Symbol @@ String("profession")) :: shapeless.HNil, Option[String] :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("profession"), Option[String], shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("profession")]](scala.Symbol.apply("profession").asInstanceOf[Symbol @@ String("profession")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("profession")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("postalCode")]](scala.Symbol.apply("postalCode").asInstanceOf[Symbol @@ String("postalCode")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("postalCode")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("lastName")]](scala.Symbol.apply("lastName").asInstanceOf[Symbol @@ String("lastName")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("lastName")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("firstName")]](scala.Symbol.apply("firstName").asInstanceOf[Symbol @@ String("firstName")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("firstName")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("age")]](scala.Symbol.apply("age").asInstanceOf[Symbol @@ String("age")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("age")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$23.this.inst$macro$22)).asInstanceOf[io.circe.generic.decoding.DerivedDecoder[org.make.api.question.AuthorRequest]]; <stable> <accessor> lazy val inst$macro$22: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForage: io.circe.Decoder[Option[Int]] = circe.this.Decoder.decodeOption[Int](circe.this.Decoder.decodeInt); private[this] val circeGenericDecoderForfirstName: io.circe.Decoder[String] = circe.this.Decoder.decodeString; private[this] val circeGenericDecoderForprofession: io.circe.Decoder[Option[String]] = circe.this.Decoder.decodeOption[String](circe.this.Decoder.decodeString); final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("age"), Option[Int], shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForage.tryDecode(c.downField("age")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("firstName"), String, shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForfirstName.tryDecode(c.downField("firstName")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("lastName"), Option[String], shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecode(c.downField("lastName")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("postalCode"), Option[String], shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecode(c.downField("postalCode")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("profession"), Option[String], shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecode(c.downField("profession")), ReprDecoder.hnilResult)(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance))(io.circe.Decoder.resultInstance))(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("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("age"), Option[Int], shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForage.tryDecodeAccumulating(c.downField("age")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("firstName"), String, shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForfirstName.tryDecodeAccumulating(c.downField("firstName")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("lastName"), Option[String], shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecodeAccumulating(c.downField("lastName")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("postalCode"), Option[String], shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecodeAccumulating(c.downField("postalCode")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("profession"), Option[String], shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForprofession.tryDecodeAccumulating(c.downField("profession")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.decoding.ReprDecoder[shapeless.labelled.FieldType[Symbol @@ String("age"),Option[Int]] :: shapeless.labelled.FieldType[Symbol @@ String("firstName"),String] :: shapeless.labelled.FieldType[Symbol @@ String("lastName"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("postalCode"),Option[String]] :: shapeless.labelled.FieldType[Symbol @@ String("profession"),Option[String]] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$23().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.decoding.DerivedDecoder[org.make.api.question.AuthorRequest]](inst$macro$24) })