1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2018 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.user
21 
22 import cats.implicits._
23 import akka.http.scaladsl.server._
24 import grizzled.slf4j.Logging
25 import io.swagger.annotations._
26 import scalaoauth2.provider.AuthInfo
27 import io.circe.Codec
28 import io.circe.generic.semiauto.deriveCodec
29 import org.make.api.operation.OperationServiceComponent
30 import org.make.api.technical.MakeDirectives.MakeDirectivesDependencies
31 import org.make.api.technical.MakeAuthenticationDirectives
32 import org.make.api.technical.directives.FutureDirectivesExtensions._
33 import org.make.api.question.QuestionServiceComponent
34 import org.make.api.proposal.MaxPropositionsThresholdsComponent
35 import org.make.core._
36 import org.make.core.auth.UserRights
37 import org.make.core.question.QuestionId
38 import org.make.core.user._
39 
40 import javax.ws.rs.Path
41 
42 @Api(value = "Moderator Users")
43 @Path(value = "/moderation/users")
44 trait ModerationUserApi extends Directives {
45 
46   @ApiOperation(
47     value = "proposals-count",
48     httpMethod = "GET",
49     code = HttpCodes.OK,
50     authorizations = Array(
51       new Authorization(
52         value = "MakeApi",
53         scopes = Array(new AuthorizationScope(scope = "moderation", description = "BO Moderation"))
54       )
55     )
56   )
57   @ApiImplicitParams(
58     value = Array(
59       new ApiImplicitParam(name = "userId", paramType = "path", dataType = "string"),
60       new ApiImplicitParam(name = "questionId", paramType = "path", dataType = "string")
61     )
62   )
63   @ApiResponses(
64     value = Array(new ApiResponse(code = HttpCodes.OK, message = "OK", response = classOf[NumberOfProposalsResponse]))
65   )
66   @Path(value = "/{userId}/{questionId}/proposals-count")
67   def getNumberOfProposals: Route
68 
69   def routes: Route = getNumberOfProposals
70 }
71 
72 trait ModerationUserApiComponent {
73 
74   def moderationUserApi: ModerationUserApi
75 }
76 
77 trait DefaultModerationUserApiComponent
78     extends ModerationUserApiComponent
79     with MakeAuthenticationDirectives
80     with Logging
81     with ParameterExtractors {
82 
83   this: MakeDirectivesDependencies
84     with UserServiceComponent
85     with QuestionServiceComponent
86     with OperationServiceComponent
87     with UserProposalsServiceComponent
88     with MaxPropositionsThresholdsComponent =>
89 
90   override lazy val moderationUserApi: ModerationUserApi = new DefaultModerationUserApi
91 
92   class DefaultModerationUserApi extends ModerationUserApi {
93 
94     private val userId = Segment.map(UserId.apply)
95     private val questionId = Segment.map(QuestionId.apply)
96 
97     private val thresholds =
98       MaxPropositionsThresholdsResponse(
99         maxPropositionsThresholds.warnThreshold,
100         maxPropositionsThresholds.blockThreshold
101       )
102 
103     override def getNumberOfProposals: Route =
104       get {
105         path("moderation" / "users" / userId / questionId / "proposals-count") {
106           case (userId, questionId) =>
107             makeOperation("GetProposalsCounter") { _ =>
108               makeOAuth2 { auth: AuthInfo[UserRights] =>
109                 requireModerationRole(auth.user) {
110                   userService.getUser(userId).asDirectiveOrNotFound { _ =>
111                     questionService.getQuestion(questionId).asDirectiveOrNotFound { _ =>
112                       userProposalsService.getCounter(userId, questionId).asDirective { count =>
113                         complete(NumberOfProposalsResponse(count, thresholds))
114                       }
115                     }
116                   }
117                 }
118               }
119             }
120         }
121       }
122   }
123 }
124 
125 final case class NumberOfProposalsResponse(count: Int, thresholds: MaxPropositionsThresholdsResponse)
126 
127 object NumberOfProposalsResponse {
128 
129   implicit val codec: Codec[NumberOfProposalsResponse] = deriveCodec
130 }
131 
132 final case class MaxPropositionsThresholdsResponse(warn: Int, block: Int)
133 
134 object MaxPropositionsThresholdsResponse {
135 
136   implicit val codec: Codec[MaxPropositionsThresholdsResponse] = deriveCodec
137 }
Line Stmt Id Pos Tree Symbol Tests Code
69 37851 2416 - 2436 Select org.make.api.user.ModerationUserApi.getNumberOfProposals org.make.api.user.moderationuserapitest ModerationUserApi.this.getNumberOfProposals
94 42756 3097 - 3109 Apply org.make.core.user.UserId.apply org.make.api.user.moderationuserapitest org.make.core.user.UserId.apply(value)
94 51163 3085 - 3092 Select akka.http.scaladsl.server.PathMatchers.Segment org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.Segment
94 35178 3085 - 3110 Apply akka.http.scaladsl.server.PathMatcher.PathMatcher1Ops.map org.make.api.user.moderationuserapitest server.this.PathMatcher.PathMatcher1Ops[String](DefaultModerationUserApi.this.Segment).map[org.make.core.user.UserId](((value: String) => org.make.core.user.UserId.apply(value)))
95 31054 3140 - 3147 Select akka.http.scaladsl.server.PathMatchers.Segment org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.Segment
95 36292 3140 - 3169 Apply akka.http.scaladsl.server.PathMatcher.PathMatcher1Ops.map org.make.api.user.moderationuserapitest server.this.PathMatcher.PathMatcher1Ops[String](DefaultModerationUserApi.this.Segment).map[org.make.core.question.QuestionId](((value: String) => org.make.core.question.QuestionId.apply(value)))
95 44384 3152 - 3168 Apply org.make.core.question.QuestionId.apply org.make.api.user.moderationuserapitest org.make.core.question.QuestionId.apply(value)
98 37892 3206 - 3346 Apply org.make.api.user.MaxPropositionsThresholdsResponse.apply org.make.api.user.moderationuserapitest MaxPropositionsThresholdsResponse.apply(DefaultModerationUserApiComponent.this.maxPropositionsThresholds.warnThreshold, DefaultModerationUserApiComponent.this.maxPropositionsThresholds.blockThreshold)
99 49282 3249 - 3288 Select org.make.api.proposal.MaxPropositionsThresholds.warnThreshold org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.maxPropositionsThresholds.warnThreshold
100 44864 3298 - 3338 Select org.make.api.proposal.MaxPropositionsThresholds.blockThreshold org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.maxPropositionsThresholds.blockThreshold
104 36373 3401 - 4162 Apply scala.Function1.apply org.make.api.user.moderationuserapitest server.this.Directive.addByNameNullaryApply(DefaultModerationUserApi.this.get).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.UserId, org.make.core.question.QuestionId)](DefaultModerationUserApi.this.path[(org.make.core.user.UserId, org.make.core.question.QuestionId)](DefaultModerationUserApi.this._segmentStringToPathMatcher("moderation")./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("users"))(TupleOps.this.Join.join0P[Unit])./[(org.make.core.user.UserId,)](DefaultModerationUserApi.this.userId)(TupleOps.this.Join.join0P[(org.make.core.user.UserId,)])./[(org.make.core.question.QuestionId,)](DefaultModerationUserApi.this.questionId)(TupleOps.this.Join.join[(org.make.core.user.UserId,), (org.make.core.question.QuestionId,)](TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]))))./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("proposals-count"))(TupleOps.this.Join.join[(org.make.core.user.UserId, org.make.core.question.QuestionId), Unit](TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type]))))(util.this.ApplyConverter.hac2[org.make.core.user.UserId, org.make.core.question.QuestionId]).apply(((x0$1: org.make.core.user.UserId, x1$1: org.make.core.question.QuestionId) => scala.Tuple2.apply[org.make.core.user.UserId, org.make.core.question.QuestionId](x0$1, x1$1) match { case (_1: org.make.core.user.UserId, _2: org.make.core.question.QuestionId): (org.make.core.user.UserId, org.make.core.question.QuestionId)((userId @ _), (questionId @ _)) => server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultModerationUserApiComponent.this.makeOperation("GetProposalsCounter", DefaultModerationUserApiComponent.this.makeOperation$default$2, DefaultModerationUserApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultModerationUserApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((auth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))))))))))))) })))
104 50922 3401 - 3404 Select akka.http.scaladsl.server.directives.MethodDirectives.get org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.get
105 30489 3433 - 3433 TypeApply akka.http.scaladsl.server.util.TupleOps.Join.join0P org.make.api.user.moderationuserapitest TupleOps.this.Join.join0P[Unit]
105 43579 3465 - 3465 ApplyToImplicitArgs akka.http.scaladsl.server.util.TupleOps.LowLevelJoinImplicits.join org.make.api.user.moderationuserapitest TupleOps.this.Join.join[(org.make.core.user.UserId, org.make.core.question.QuestionId), Unit](TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type])
105 42550 3452 - 3452 ApplyToImplicitArgs akka.http.scaladsl.server.util.TupleOps.LowLevelJoinImplicits.join org.make.api.user.moderationuserapitest TupleOps.this.Join.join[(org.make.core.user.UserId,), (org.make.core.question.QuestionId,)](TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId])))
105 50421 3452 - 3452 ApplyToImplicitArgs akka.http.scaladsl.server.util.TupleFoldInstances.t1 org.make.api.user.moderationuserapitest TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]))
105 30527 3465 - 3465 TypeApply akka.http.scaladsl.server.util.TupleFoldInstances.t0 org.make.api.user.moderationuserapitest TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type]
105 40973 3419 - 3419 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac2 org.make.api.user.moderationuserapitest util.this.ApplyConverter.hac2[org.make.core.user.UserId, org.make.core.question.QuestionId]
105 37052 3452 - 3452 ApplyToImplicitArgs akka.http.scaladsl.server.util.TupleOps.Join.Fold.step org.make.api.user.moderationuserapitest Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId])
105 34444 3467 - 3484 ApplyImplicitView akka.http.scaladsl.server.ImplicitPathMatcherConstruction._segmentStringToPathMatcher org.make.api.user.moderationuserapitest DefaultModerationUserApi.this._segmentStringToPathMatcher("proposals-count")
105 44421 3445 - 3451 Select org.make.api.user.DefaultModerationUserApiComponent.DefaultModerationUserApi.userId org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.userId
105 36077 3420 - 3484 ApplyToImplicitArgs akka.http.scaladsl.server.PathMatcher./ org.make.api.user.moderationuserapitest DefaultModerationUserApi.this._segmentStringToPathMatcher("moderation")./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("users"))(TupleOps.this.Join.join0P[Unit])./[(org.make.core.user.UserId,)](DefaultModerationUserApi.this.userId)(TupleOps.this.Join.join0P[(org.make.core.user.UserId,)])./[(org.make.core.question.QuestionId,)](DefaultModerationUserApi.this.questionId)(TupleOps.this.Join.join[(org.make.core.user.UserId,), (org.make.core.question.QuestionId,)](TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]))))./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("proposals-count"))(TupleOps.this.Join.join[(org.make.core.user.UserId, org.make.core.question.QuestionId), Unit](TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type]))
105 36038 3443 - 3443 TypeApply akka.http.scaladsl.server.util.TupleOps.Join.join0P org.make.api.user.moderationuserapitest TupleOps.this.Join.join0P[(org.make.core.user.UserId,)]
105 49086 3415 - 3485 Apply akka.http.scaladsl.server.directives.PathDirectives.path org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.path[(org.make.core.user.UserId, org.make.core.question.QuestionId)](DefaultModerationUserApi.this._segmentStringToPathMatcher("moderation")./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("users"))(TupleOps.this.Join.join0P[Unit])./[(org.make.core.user.UserId,)](DefaultModerationUserApi.this.userId)(TupleOps.this.Join.join0P[(org.make.core.user.UserId,)])./[(org.make.core.question.QuestionId,)](DefaultModerationUserApi.this.questionId)(TupleOps.this.Join.join[(org.make.core.user.UserId,), (org.make.core.question.QuestionId,)](TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]))))./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("proposals-count"))(TupleOps.this.Join.join[(org.make.core.user.UserId, org.make.core.question.QuestionId), Unit](TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type])))
105 34931 3435 - 3442 ApplyImplicitView akka.http.scaladsl.server.ImplicitPathMatcherConstruction._segmentStringToPathMatcher org.make.api.user.moderationuserapitest DefaultModerationUserApi.this._segmentStringToPathMatcher("users")
105 45933 3452 - 3452 TypeApply akka.http.scaladsl.server.util.TupleAppendOneInstances.append1 org.make.api.user.moderationuserapitest TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]
105 42796 3420 - 3432 Literal <nosymbol> org.make.api.user.moderationuserapitest "moderation"
105 43932 3415 - 4154 Apply scala.Function1.apply org.make.api.user.moderationuserapitest server.this.Directive.addDirectiveApply[(org.make.core.user.UserId, org.make.core.question.QuestionId)](DefaultModerationUserApi.this.path[(org.make.core.user.UserId, org.make.core.question.QuestionId)](DefaultModerationUserApi.this._segmentStringToPathMatcher("moderation")./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("users"))(TupleOps.this.Join.join0P[Unit])./[(org.make.core.user.UserId,)](DefaultModerationUserApi.this.userId)(TupleOps.this.Join.join0P[(org.make.core.user.UserId,)])./[(org.make.core.question.QuestionId,)](DefaultModerationUserApi.this.questionId)(TupleOps.this.Join.join[(org.make.core.user.UserId,), (org.make.core.question.QuestionId,)](TupleOps.this.FoldLeft.t1[(org.make.core.user.UserId,), org.make.core.question.QuestionId, akka.http.scaladsl.server.util.TupleOps.Join.Fold.type](Join.this.Fold.step[(org.make.core.user.UserId,), org.make.core.question.QuestionId](TupleOps.this.AppendOne.append1[org.make.core.user.UserId, org.make.core.question.QuestionId]))))./[Unit](DefaultModerationUserApi.this._segmentStringToPathMatcher("proposals-count"))(TupleOps.this.Join.join[(org.make.core.user.UserId, org.make.core.question.QuestionId), Unit](TupleOps.this.FoldLeft.t0[(org.make.core.user.UserId, org.make.core.question.QuestionId), akka.http.scaladsl.server.util.TupleOps.Join.Fold.type]))))(util.this.ApplyConverter.hac2[org.make.core.user.UserId, org.make.core.question.QuestionId]).apply(((x0$1: org.make.core.user.UserId, x1$1: org.make.core.question.QuestionId) => scala.Tuple2.apply[org.make.core.user.UserId, org.make.core.question.QuestionId](x0$1, x1$1) match { case (_1: org.make.core.user.UserId, _2: org.make.core.question.QuestionId): (org.make.core.user.UserId, org.make.core.question.QuestionId)((userId @ _), (questionId @ _)) => server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultModerationUserApiComponent.this.makeOperation("GetProposalsCounter", DefaultModerationUserApiComponent.this.makeOperation$default$2, DefaultModerationUserApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultModerationUserApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((auth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))))))))))))) }))
105 49318 3454 - 3464 Select org.make.api.user.DefaultModerationUserApiComponent.DefaultModerationUserApi.questionId org.make.api.user.moderationuserapitest DefaultModerationUserApi.this.questionId
107 50882 3539 - 3539 Select org.make.api.technical.MakeDirectives.makeOperation$default$2 org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.makeOperation$default$2
107 47486 3539 - 4144 Apply scala.Function1.apply org.make.api.user.moderationuserapitest server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultModerationUserApiComponent.this.makeOperation("GetProposalsCounter", DefaultModerationUserApiComponent.this.makeOperation$default$2, DefaultModerationUserApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultModerationUserApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((auth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse])))))))))))))))
107 42593 3539 - 3539 Select org.make.api.technical.MakeDirectives.makeOperation$default$3 org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.makeOperation$default$3
107 37093 3553 - 3574 Literal <nosymbol> org.make.api.user.moderationuserapitest "GetProposalsCounter"
107 35499 3539 - 3575 Apply org.make.api.technical.MakeDirectives.makeOperation org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.makeOperation("GetProposalsCounter", DefaultModerationUserApiComponent.this.makeOperation$default$2, DefaultModerationUserApiComponent.this.makeOperation$default$3)
107 31605 3552 - 3552 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac1 org.make.api.user.moderationuserapitest util.this.ApplyConverter.hac1[org.make.core.RequestContext]
108 36541 3597 - 3597 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac1 org.make.api.user.moderationuserapitest util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]
108 44381 3597 - 3607 Select org.make.api.technical.auth.MakeAuthentication.makeOAuth2 org.make.api.user.moderationuserapitest DefaultModerationUserApiComponent.this.makeOAuth2
108 34721 3597 - 4130 Apply scala.Function1.apply org.make.api.user.moderationuserapitest server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultModerationUserApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((auth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse])))))))))))))
109 41013 3656 - 3688 Apply org.make.api.technical.MakeAuthenticationDirectives.requireModerationRole DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)
109 42585 3656 - 4114 Apply scala.Function1.apply server.this.Directive.addByNameNullaryApply(DefaultModerationUserApiComponent.this.requireModerationRole(auth.user)).apply(server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse])))))))))))
109 49887 3678 - 3687 Select scalaoauth2.provider.AuthInfo.user auth.user
110 50713 3709 - 4096 Apply scala.Function1.apply server.this.Directive.addDirectiveApply[(org.make.core.user.User,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.user.User]).apply(((x$2: org.make.core.user.User) => server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))))))))
110 43054 3737 - 3737 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac1 util.this.ApplyConverter.hac1[org.make.core.user.User]
110 50916 3709 - 3758 Select org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes.asDirectiveOrNotFound org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.user.User](DefaultModerationUserApiComponent.this.userService.getUser(userId)).asDirectiveOrNotFound
110 38145 3709 - 3736 Apply org.make.api.user.UserService.getUser DefaultModerationUserApiComponent.this.userService.getUser(userId)
111 31642 3786 - 3847 Select org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes.asDirectiveOrNotFound org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound
111 35539 3786 - 3825 Apply org.make.api.question.QuestionService.getQuestion DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)
111 37398 3786 - 4076 Apply scala.Function1.apply server.this.Directive.addDirectiveApply[(org.make.core.question.Question,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureOptionWithRoutes[org.make.core.question.Question](DefaultModerationUserApiComponent.this.questionService.getQuestion(questionId)).asDirectiveOrNotFound)(util.this.ApplyConverter.hac1[org.make.core.question.Question]).apply(((x$3: org.make.core.question.Question) => server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))))))
111 44139 3826 - 3826 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac1 util.this.ApplyConverter.hac1[org.make.core.question.Question]
112 49311 3877 - 3940 Select org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes.asDirective org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective
112 36573 3877 - 3928 Apply org.make.api.user.UserProposalsService.getCounter DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)
112 41498 3877 - 4054 Apply scala.Function1.apply server.this.Directive.addDirectiveApply[(Int,)](org.make.api.technical.directives.FutureDirectivesExtensions.FutureWithRoutes[Int](DefaultModerationUserApiComponent.this.userProposalsService.getCounter(userId, questionId)).asDirective)(util.this.ApplyConverter.hac1[Int]).apply(((count: Int) => DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))))
112 42072 3929 - 3929 TypeApply akka.http.scaladsl.server.util.ApplyConverterInstances.hac1 util.this.ApplyConverter.hac1[Int]
113 50678 3985 - 4029 Apply org.make.api.user.NumberOfProposalsResponse.apply NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds)
113 48597 4010 - 4010 ApplyToImplicitArgs de.heikoseeberger.akkahttpcirce.BaseCirceSupport.marshaller DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse])
113 34965 4010 - 4010 TypeApply de.heikoseeberger.akkahttpcirce.BaseCirceSupport.marshaller$default$2 DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]
113 44179 4010 - 4010 ApplyToImplicitArgs akka.http.scaladsl.marshalling.LowPriorityToResponseMarshallerImplicits.liftMarshaller marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))
113 42543 4010 - 4010 Select org.make.api.user.NumberOfProposalsResponse.codec user.this.NumberOfProposalsResponse.codec
113 37644 4018 - 4028 Select org.make.api.user.DefaultModerationUserApiComponent.DefaultModerationUserApi.thresholds DefaultModerationUserApi.this.thresholds
113 36337 3985 - 4029 ApplyToImplicitArgs akka.http.scaladsl.marshalling.ToResponseMarshallable.apply marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse])))
113 49073 3976 - 4030 Apply akka.http.scaladsl.server.directives.RouteDirectives.complete DefaultModerationUserApi.this.complete(marshalling.this.ToResponseMarshallable.apply[org.make.api.user.NumberOfProposalsResponse](NumberOfProposalsResponse.apply(count, DefaultModerationUserApi.this.thresholds))(marshalling.this.Marshaller.liftMarshaller[org.make.api.user.NumberOfProposalsResponse](DefaultModerationUserApiComponent.this.marshaller[org.make.api.user.NumberOfProposalsResponse](user.this.NumberOfProposalsResponse.codec, DefaultModerationUserApiComponent.this.marshaller$default$2[org.make.api.user.NumberOfProposalsResponse]))))
129 49111 4366 - 4377 ApplyToImplicitArgs io.circe.generic.semiauto.deriveCodec io.circe.generic.semiauto.deriveCodec[org.make.api.user.NumberOfProposalsResponse]({ val inst$macro$12: io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.NumberOfProposalsResponse] = { 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.api.user.NumberOfProposalsResponse] = codec.this.DerivedAsObjectCodec.deriveCodec[org.make.api.user.NumberOfProposalsResponse, shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.api.user.NumberOfProposalsResponse, (Symbol @@ String("count")) :: (Symbol @@ String("thresholds")) :: shapeless.HNil, Int :: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.api.user.NumberOfProposalsResponse, (Symbol @@ String("count")) :: (Symbol @@ String("thresholds")) :: shapeless.HNil](::.apply[Symbol @@ String("count"), (Symbol @@ String("thresholds")) :: shapeless.HNil.type](scala.Symbol.apply("count").asInstanceOf[Symbol @@ String("count")], ::.apply[Symbol @@ String("thresholds"), shapeless.HNil.type](scala.Symbol.apply("thresholds").asInstanceOf[Symbol @@ String("thresholds")], HNil))), Generic.instance[org.make.api.user.NumberOfProposalsResponse, Int :: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil](((x0$3: org.make.api.user.NumberOfProposalsResponse) => x0$3 match { case (count: Int, thresholds: org.make.api.user.MaxPropositionsThresholdsResponse): org.make.api.user.NumberOfProposalsResponse((count$macro$8 @ _), (thresholds$macro$9 @ _)) => ::.apply[Int, org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil.type](count$macro$8, ::.apply[org.make.api.user.MaxPropositionsThresholdsResponse, shapeless.HNil.type](thresholds$macro$9, HNil)).asInstanceOf[Int :: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil] }), ((x0$4: Int :: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil) => x0$4 match { case (head: Int, tail: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil): Int :: org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil((count$macro$6 @ _), (head: org.make.api.user.MaxPropositionsThresholdsResponse, tail: shapeless.HNil): org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil((thresholds$macro$7 @ _), HNil)) => user.this.NumberOfProposalsResponse.apply(count$macro$6, thresholds$macro$7) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("count"), Int, (Symbol @@ String("thresholds")) :: shapeless.HNil, org.make.api.user.MaxPropositionsThresholdsResponse :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("thresholds"), org.make.api.user.MaxPropositionsThresholdsResponse, shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("thresholds")]](scala.Symbol.apply("thresholds").asInstanceOf[Symbol @@ String("thresholds")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("thresholds")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("count")]](scala.Symbol.apply("count").asInstanceOf[Symbol @@ String("count")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("count")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$11.this.inst$macro$10)).asInstanceOf[io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.NumberOfProposalsResponse]]; <stable> <accessor> lazy val inst$macro$10: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForcount: io.circe.Decoder[Int] = circe.this.Decoder.decodeInt; private[this] val circeGenericDecoderForthresholds: io.circe.Codec[org.make.api.user.MaxPropositionsThresholdsResponse] = user.this.MaxPropositionsThresholdsResponse.codec; private[this] val circeGenericEncoderForcount: io.circe.Encoder[Int] = circe.this.Encoder.encodeInt; private[this] val circeGenericEncoderForthresholds: io.circe.Codec[org.make.api.user.MaxPropositionsThresholdsResponse] = user.this.MaxPropositionsThresholdsResponse.codec; final def encodeObject(a: shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): io.circe.JsonObject = a match { case (head: shapeless.labelled.FieldType[Symbol @@ String("count"),Int], tail: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForcount @ _), (head: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse], tail: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForthresholds @ _), shapeless.HNil)) => io.circe.JsonObject.fromIterable(scala.collection.immutable.Vector.apply[(String, io.circe.Json)](scala.Tuple2.apply[String, io.circe.Json]("count", $anon.this.circeGenericEncoderForcount.apply(circeGenericHListBindingForcount)), scala.Tuple2.apply[String, io.circe.Json]("thresholds", $anon.this.circeGenericEncoderForthresholds.apply(circeGenericHListBindingForthresholds)))) }; final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("count"), Int, shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForcount.tryDecode(c.downField("count")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("thresholds"), org.make.api.user.MaxPropositionsThresholdsResponse, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForthresholds.tryDecode(c.downField("thresholds")), 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("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("count"), Int, shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForcount.tryDecodeAccumulating(c.downField("count")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("thresholds"), org.make.api.user.MaxPropositionsThresholdsResponse, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForthresholds.tryDecodeAccumulating(c.downField("thresholds")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("count"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("thresholds"),org.make.api.user.MaxPropositionsThresholdsResponse] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$11().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.NumberOfProposalsResponse]](inst$macro$12) })
136 41254 4565 - 4576 ApplyToImplicitArgs io.circe.generic.semiauto.deriveCodec io.circe.generic.semiauto.deriveCodec[org.make.api.user.MaxPropositionsThresholdsResponse]({ val inst$macro$12: io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.MaxPropositionsThresholdsResponse] = { 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.api.user.MaxPropositionsThresholdsResponse] = codec.this.DerivedAsObjectCodec.deriveCodec[org.make.api.user.MaxPropositionsThresholdsResponse, shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](shapeless.this.LabelledGeneric.materializeProduct[org.make.api.user.MaxPropositionsThresholdsResponse, (Symbol @@ String("warn")) :: (Symbol @@ String("block")) :: shapeless.HNil, Int :: Int :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](DefaultSymbolicLabelling.instance[org.make.api.user.MaxPropositionsThresholdsResponse, (Symbol @@ String("warn")) :: (Symbol @@ String("block")) :: shapeless.HNil](::.apply[Symbol @@ String("warn"), (Symbol @@ String("block")) :: shapeless.HNil.type](scala.Symbol.apply("warn").asInstanceOf[Symbol @@ String("warn")], ::.apply[Symbol @@ String("block"), shapeless.HNil.type](scala.Symbol.apply("block").asInstanceOf[Symbol @@ String("block")], HNil))), Generic.instance[org.make.api.user.MaxPropositionsThresholdsResponse, Int :: Int :: shapeless.HNil](((x0$3: org.make.api.user.MaxPropositionsThresholdsResponse) => x0$3 match { case (warn: Int, block: Int): org.make.api.user.MaxPropositionsThresholdsResponse((warn$macro$8 @ _), (block$macro$9 @ _)) => ::.apply[Int, Int :: shapeless.HNil.type](warn$macro$8, ::.apply[Int, shapeless.HNil.type](block$macro$9, HNil)).asInstanceOf[Int :: Int :: shapeless.HNil] }), ((x0$4: Int :: Int :: shapeless.HNil) => x0$4 match { case (head: Int, tail: Int :: shapeless.HNil): Int :: Int :: shapeless.HNil((warn$macro$6 @ _), (head: Int, tail: shapeless.HNil): Int :: shapeless.HNil((block$macro$7 @ _), HNil)) => user.this.MaxPropositionsThresholdsResponse.apply(warn$macro$6, block$macro$7) })), hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("warn"), Int, (Symbol @@ String("block")) :: shapeless.HNil, Int :: shapeless.HNil, shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hconsZipWithKeys[Symbol @@ String("block"), Int, shapeless.HNil, shapeless.HNil, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out](hlist.this.ZipWithKeys.hnilZipWithKeys, Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("block")]](scala.Symbol.apply("block").asInstanceOf[Symbol @@ String("block")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("block")]])), Witness.mkWitness[Symbol with shapeless.tag.Tagged[String("warn")]](scala.Symbol.apply("warn").asInstanceOf[Symbol @@ String("warn")].asInstanceOf[Symbol with shapeless.tag.Tagged[String("warn")]])), scala.this.<:<.refl[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]), shapeless.Lazy.apply[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]](anon$lazy$macro$11.this.inst$macro$10)).asInstanceOf[io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.MaxPropositionsThresholdsResponse]]; <stable> <accessor> lazy val inst$macro$10: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ({ final class $anon extends io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] { def <init>(): <$anon: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]> = { $anon.super.<init>(); () }; private[this] val circeGenericDecoderForblock: io.circe.Decoder[Int] = circe.this.Decoder.decodeInt; private[this] val circeGenericEncoderForblock: io.circe.Encoder[Int] = circe.this.Encoder.encodeInt; final def encodeObject(a: shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): io.circe.JsonObject = a match { case (head: shapeless.labelled.FieldType[Symbol @@ String("warn"),Int], tail: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForwarn @ _), (head: shapeless.labelled.FieldType[Symbol @@ String("block"),Int], tail: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out): shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out((circeGenericHListBindingForblock @ _), shapeless.HNil)) => io.circe.JsonObject.fromIterable(scala.collection.immutable.Vector.apply[(String, io.circe.Json)](scala.Tuple2.apply[String, io.circe.Json]("warn", $anon.this.circeGenericEncoderForblock.apply(circeGenericHListBindingForwarn)), scala.Tuple2.apply[String, io.circe.Json]("block", $anon.this.circeGenericEncoderForblock.apply(circeGenericHListBindingForblock)))) }; final def apply(c: io.circe.HCursor): io.circe.Decoder.Result[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("warn"), Int, shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForblock.tryDecode(c.downField("warn")), ReprDecoder.consResults[io.circe.Decoder.Result, Symbol @@ String("block"), Int, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForblock.tryDecode(c.downField("block")), 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("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out] = ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("warn"), Int, shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForblock.tryDecodeAccumulating(c.downField("warn")), ReprDecoder.consResults[io.circe.Decoder.AccumulatingResult, Symbol @@ String("block"), Int, shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]($anon.this.circeGenericDecoderForblock.tryDecodeAccumulating(c.downField("block")), ReprDecoder.hnilResultAccumulating)(io.circe.Decoder.accumulatingResultInstance))(io.circe.Decoder.accumulatingResultInstance) }; new $anon() }: io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]).asInstanceOf[io.circe.generic.codec.ReprAsObjectCodec[shapeless.labelled.FieldType[Symbol @@ String("warn"),Int] :: shapeless.labelled.FieldType[Symbol @@ String("block"),Int] :: shapeless.ops.hlist.ZipWithKeys.hnilZipWithKeys.Out]] }; new anon$lazy$macro$11().inst$macro$1 }; shapeless.Lazy.apply[io.circe.generic.codec.DerivedAsObjectCodec[org.make.api.user.MaxPropositionsThresholdsResponse]](inst$macro$12) })