import Ġcom . squareup . kotlin po et .* Ċ Ċ fun ĠFile Spec . Builder . build ( init : ĠFile Spec . Builder . () Ġ-> ĠUnit ) Ġ= Ġapply ( init ). build () Ċ Ċ fun ĠFile Spec . Builder . add Type ( name : ĠString , Ġinit : ĠType Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Type ( Type Spec . class Builder ( name ). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠFile Spec . Builder . addFunction ( name : ĠString , Ġinit : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Function ( Fun Spec . builder ( name ). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . addFunction ( name : ĠString , Ġinit : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Function ( Fun Spec . builder ( name ). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . primary Constructor ( init : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġprimary Constructor ( Fun Spec . constructor Builder (). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . ctr ( init : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Function ( Fun Spec . constructor Builder (). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . add Var Property ( name : ĠString , Ġtype : ĠType Name , Ġinit : ĠProperty Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Property ( Property Spec . builder ( name , Ġtype ). mutable ( true ). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠProperty Spec . Builder . getter ( init : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġgetter ( Fun Spec . getter Builder (). apply ( init ). build ()) Ċ } Ċ fun ĠProperty Spec . Builder . setter ( type : ĠType Name , Ġinit : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġsetter ( Fun Spec . setter Builder (). add Parameter (" value ", Ġtype ). apply ( init ). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . addProperty ( name : ĠString , Ġtype : ĠType Name , Ġinit : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Property ( Property Spec . builder ( name . validate (), Ġtype ). getter ( Fun Spec . getter Builder (). apply ( init ). build ()). build ()) Ċ } Ċ Ċ fun ĠType Spec . Builder . add Private Property ( name : ĠString , Ġtype : ĠType Name , Ġinit : ĠFun Spec . Builder . () Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġadd Property ( Property Spec . builder ( name , Ġtype , ĠK Modifier . PRIVATE ). getter ( Fun Spec . getter Builder (). apply ( init ). build ()). build ()) Ċ } Ċ Ċ private Ġfun ĠString . validate () Ġ= Ġwhen ( this ) Ġ{ ĊĠĠĠ Ġ" object " Ġ-> Ġ" obj " ĊĠĠĠ Ġelse Ġ-> Ġthis Ċ }