package Ġbr . com . mate us ch acon . key manager . rest Ċ Ċ import Ġbr . com . mate us ch acon . key manager . rest . cad astro . pix . Nova Ch ave Pix Request Ċ import Ġjavax . inject . Singleton Ċ import Ġjavax . validation . Constraint Ċ import Ġjavax . validation . Constraint Validator Ċ import Ġjavax . validation . Constraint Validator Context Ċ import Ġjavax . validation . Payload Ċ import Ġkotlin . annotation . Annotation Retention . RUNTIME Ċ import Ġkotlin . annotation . Annotation Target . CLASS Ċ import Ġkotlin . annotation . Annotation Target . TYPE Ċ import Ġkotlin . reflect . K Class Ċ Ċ @ Must Be Document ed Ċ @ Target ( CLASS , ĠTYPE ) Ċ @ Retention ( RUNTIME ) Ċ @ Constraint ( validated By Ġ= Ġ[ Ch ave Pix Valid ador :: class ]) Ċ annotation Ġclass ĠValid ar Ch ave Pix ( ĊĠĠĠ Ġval Ġmessage : ĠString Ġ= Ġ" Ch ave ĠP ix Ġinv Ã¡l ida Ġ(\ ${ validated Value . tipo Ch ave })", ĊĠĠĠ Ġval Ġgroups : ĠArray < K Class < Any >> Ġ= Ġ[], ĊĠĠĠ Ġval Ġpayload : ĠArray < K Class < Payload >> Ġ= Ġ[] Ċ ) Ċ Ċ @ Singleton Ċ class ĠCh ave Pix Valid ador () Ġ: ĠConstraint Validator < Valid ar Ch ave Pix , ĠN ova Ch ave Pix Request > Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠisValid ( value : ĠN ova Ch ave Pix Request ?, Ġcontext : ĠConstraint Validator Context ?): ĠBoolean Ġ{ ĊĊĠĠĠĠĠĠĠ Ġif Ġ( value ?. tipo Ch ave Ġ== Ġnull ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġfalse ĊĊĠĠĠĠĠĠĠ Ġreturn Ġvalue . tipo Ch ave . valid a ( value . valor Ch ave ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ