package Ġcom . sk sam uel . avro 4 k . decoder Ċ Ċ import Ġkotlinx . serialization . Composite Decoder Ċ import Ġkotlinx . serialization . Element Value Decoder Ċ import Ġkotlinx . serialization . K Serializer Ċ import Ġkotlinx . serialization . Serial Descriptor Ċ import Ġkotlinx . serialization . Serialization Exception Ċ import Ġkotlinx . serialization . Structure Kind Ċ import Ġorg . apache . avro . generic . Generic Record Ċ Ċ class ĠRoot Record Decoder ( private Ġval Ġrecord : ĠGeneric Record ) Ġ: ĠElement Value Decoder () Ġ{ ĊĊĠĠ Ġoverride Ġfun Ġbegin Structure ( desc : ĠSerial Descriptor , Ġvar arg Ġtype Params : ĠK Serializer < *> ): ĠComposite Decoder Ġ{ ĊĠĠĠĠĠ Ġreturn Ġwhen Ġ( desc . kind Ġas ĠStructure Kind ) Ġ{ ĊĠĠĠĠĠĠĠĠ ĠStructure Kind . CLASS Ġ-> ĠRecord Decoder ( desc , Ġrecord ) ĊĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠSerialization Exception (" Non - class Ġstructure Ġpassed Ġto Ġroot Ġrecord Ġdecoder ") ĊĠĠĠĠĠ Ġ} ĊĠĠ Ġ} Ċ }