package Ġbr . com . z up . controller ; Ċ Ċ import Ġbr . com . z up . controller . resource . Account Type Request Ċ import Ġbr . com . z up . controller . resource . Pix Type Ċ import Ġbr . com . z up . controller . response . List Pix Pix Response Ċ import Ġbr . com . z up . controller . response . List Pix Response Ċ import Ġcom . z up . br . orange . Pix Key List Grpc Request Ċ import Ġcom . z up . br . orange . Pix Key List Grpc Response Ċ import Ġcom . z up . br . orange . Pix Key List Service Grpc Ċ import Ġio . mic ronaut . http . HttpResponse Ċ import Ġio . mic ronaut . http . Mutable HttpResponse Ċ import Ġio . mic ronaut . http . annotation . Controller ; Ċ import Ġio . mic ronaut . http . annotation . Get Ċ import Ġorg . slf 4 j . LoggerFactory Ċ Ċ @ Controller (" api / v 1 / clients /{ clientId }/ pix ") Ċ class ĠList Pix Controller ( ĊĠĠĠ Ġprivate Ġval Ġgrpc Pix List Service : ĠP ix Key List Service Grpc . Pix Key List Service Blocking Stub Ċ ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠLoggerFactory . getLogger ( this :: class . java ) ĊĊĠĠĠ Ġ@ Get ĊĠĠĠ Ġfun Ġlist Pix ( clientId : ĠString ): ĠHttpResponse < List Pix Response > Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" List Ġrequest Ġreceive Ġfrom Ġclient Ġ$ clientId ") ĊĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġgrpc Pix List Service . list ( Pix Key List Grpc Request . newBuilder (). set ClientId ( clientId ). build ()) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠHttpResponse . ok ( build Response ( response )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Response ( response : ĠP ix Key List Grpc Response ) Ġ: ĠList Pix Response Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpix List Ġ= Ġresponse . pix List List . map Ġ{ ĠList Pix Pix Response ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . pix Id , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠP ix Type . valueOf ( it . pix Type . name ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . pix Value , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAccount Type Request . valueOf ( it . account Type . name ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . createdAt ĊĠĠĠĠĠĠĠ Ġ) Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠList Pix Response ( response . clientId , Ġpix List ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ