package Ġcom . cj bo oms . fab ri kt . cli Ċ Ċ import Ġcom . cj bo oms . fab ri kt . cli . Code Generation Type . CLIENT Ċ import Ġcom . cj bo oms . fab ri kt . cli . Code Generation Type . CONTRO LL ERS Ċ import Ġcom . cj bo oms . fab ri kt . cli . Code Generation Type . HTTP _ MODE LS Ċ import Ġcom . cj bo oms . fab ri kt . cli . Code Generation Type . QU ARK US _ REF LECTION _ CONFIG Ċ import Ġcom . cj bo oms . fab ri kt . configurations . Packages Ċ import Ġcom . cj bo oms . fab ri kt . generators . Mutable Settings Ċ import Ġcom . cj bo oms . fab ri kt . generators . client . Ok HttpClient Generator Ċ import Ġcom . cj bo oms . fab ri kt . generators . controller . Spring Controller Interface Generator Ċ import Ġcom . cj bo oms . fab ri kt . generators . model . Jack son Model Generator Ċ import Ġcom . cj bo oms . fab ri kt . generators . model . Qu ark us Reflection Model Generator Ċ import Ġcom . cj bo oms . fab ri kt . model . Clients Ċ import Ġcom . cj bo oms . fab ri kt . model . Controllers Ċ import Ġcom . cj bo oms . fab ri kt . model . Generated File Ċ import Ġcom . cj bo oms . fab ri kt . model . Kotlin Source Set Ċ import Ġcom . cj bo oms . fab ri kt . model . Models Ċ import Ġcom . cj bo oms . fab ri kt . model . Resource File Ċ import Ġcom . cj bo oms . fab ri kt . model . Resource Source Set Ċ import Ġcom . cj bo oms . fab ri kt . model . Source Api Ċ import Ġcom . squareup . kotlin po et . File Spec Ċ import Ġjava . nio . file . Path Ċ Ċ class ĠCode Generator ( ĊĠĠĠ Ġprivate Ġval Ġpackages : ĠPackages , ĊĠĠĠ Ġprivate Ġval Ġsource Api : ĠSource Api , ĊĠĠĠ Ġprivate Ġval Ġsrc Path : ĠPath , ĊĠĠĠ Ġprivate Ġval Ġresources Path : ĠPath Ċ ) Ġ{ ĊĊĠĠĠ Ġfun Ġgenerate (): ĠCollection < Generated File > Ġ= ĠMutable Settings . generation Types (). map (:: generate Code ). flatten () ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Code ( generation Type : ĠCode Generation Type ): ĠCollection < Generated File > Ġ= ĊĠĠĠĠĠĠĠ Ġwhen Ġ( generation Type ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCLIENT Ġ-> Ġgenerate Client () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCONT ROLL ERS Ġ-> Ġgenerate Controller Interfaces () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠHTTP _ MODE LS Ġ-> Ġgenerate Models () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠQU ARK US _ REF LECTION _ CONFIG Ġ-> Ġgenerate Qu ark us Reflection Resource () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Models (): ĠCollection < Generated File > Ġ= Ġsource Set ( models (). files ) ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Controller Interfaces (): ĠCollection < Generated File > Ġ= ĊĠĠĠĠĠĠĠ Ġsource Set ( controllers (). files ). plus ( source Set ( models (). files )) ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Client (): ĠCollection < Generated File > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlib Ġ= ĠOk HttpClient Generator ( packages , Ġsource Api , Ġsrc Path ). generate Library ( Mutable Settings . client Options ()) ĊĠĠĠĠĠĠĠ Ġreturn Ġsource Set ( client (). files ). plus ( lib ). plus ( source Set ( models (). files )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġgenerate Qu ark us Reflection Resource (): ĠCollection < Generated File > Ġ= Ġresource Set ( resources ( models ())) ĊĊĠĠĠ Ġprivate Ġfun Ġsource Set ( file Spec : ĠCollection < File Spec >) Ġ= Ġset Of ( Kotlin Source Set ( file Spec , Ġsrc Path )) ĊĊĠĠĠ Ġprivate Ġfun Ġresource Set ( res Files : ĠCollection < Resource File >) Ġ= Ġset Of ( Resource Source Set ( res Files , Ġresources Path )) ĊĊĠĠĠ Ġprivate Ġfun Ġmodels (): ĠModels Ġ= ĊĠĠĠĠĠĠĠ ĠJack son Model Generator ( packages , Ġsource Api , ĠMutable Settings . model Options ()). generate () ĊĊĠĠĠ Ġprivate Ġfun Ġresources ( models : ĠModels ): ĠList < Resource File > Ġ= ĊĠĠĠĠĠĠĠ ĠlistOf NotNull ( Qu ark us Reflection Model Generator ( models , ĠMutable Settings . generation Types ()). generate ()) ĊĊĠĠĠ Ġprivate Ġfun Ġcontrollers (): ĠCont rollers Ġ= ĊĠĠĠĠĠĠĠ ĠSpring Controller Interface Generator ( packages , Ġsource Api , ĠMutable Settings . controller Options ()). generate () ĊĊĠĠĠ Ġprivate Ġfun Ġclient (): ĠClients Ġ= ĊĠĠĠĠĠĠĠ ĠOk HttpClient Generator ( packages , Ġsource Api , Ġsrc Path ). generate ( Mutable Settings . client Options ()) Ċ } Ċ