/* Ċ Ġ* ĠCopyright ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ Ġ* ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ġ*/ Ċ Ċ package Ġsoftware . amazon . smithy . rust . codegen . smithy . generators . client Ċ Ċ import Ġsoftware . amazon . smithy . model . Model Ċ import Ġsoftware . amazon . smithy . model . shapes . Member Shape Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . Rust Type Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . Rust Writer Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . as Argument Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . docs Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . document Shape Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . rust Ċ import Ġsoftware . amazon . smithy . rust . codegen . rust lang . rust Block Ċ import Ġsoftware . amazon . smithy . rust . codegen . smithy . generators . setter Name Ċ Ċ class ĠFluent Client Core ( private Ġval Ġmodel : ĠModel ) Ġ{ ĊĠĠĠ Ġ/** ĠGenerate Ġand Ġwrite ĠRust Ġcode Ġfor Ġa Ġbuilder Ġmethod Ġthat Ġsets Ġa ĠVec < T > Ġ*/ ĊĠĠĠ Ġfun ĠRust Writer . render Vec Helper ( member : ĠMember Shape , Ġmember Name : ĠString , Ġcore Type : ĠRust Type . Vec ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdocs (" App ends Ġan Ġitem Ġto Ġ`${ member . member Name }`. ") ĊĠĠĠĠĠĠĠ Ġrust (" /// ") ĊĠĠĠĠĠĠĠ Ġdocs (" To Ġoverride Ġthe Ġcontents Ġof Ġthis Ġcollection Ġuse Ġ[` ${ member . setter Name () }` ]( Self :: ${ member . setter Name ()} ). ") ĊĠĠĠĠĠĠĠ Ġrust (" /// ") ĊĠĠĠĠĠĠĠ Ġval Ġinput Ġ= Ġcore Type . member . as Argument (" input ") ĊĊĠĠĠĠĠĠĠ Ġdocument Shape ( member , Ġmodel ) ĊĠĠĠĠĠĠĠ Ġrust Block (" pub Ġfn Ġ$ member Name ( mut Ġself , Ġ${ input . argument }) Ġ-> ĠSelf ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self . inner Ġ= Ġself . inner .$ member Name (${ input . value }); ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĠGenerate Ġand Ġwrite ĠRust Ġcode Ġfor Ġa Ġbuilder Ġmethod Ġthat Ġsets Ġa ĠHashMap < K , V > Ġ*/ ĊĠĠĠ Ġfun ĠRust Writer . render Map Helper ( member : ĠMember Shape , Ġmember Name : ĠString , Ġcore Type : ĠRust Type . HashMap ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdocs (" Adds Ġa Ġkey - value Ġpair Ġto Ġ`${ member . member Name }`. ") ĊĠĠĠĠĠĠĠ Ġrust (" /// ") ĊĠĠĠĠĠĠĠ Ġdocs (" To Ġoverride Ġthe Ġcontents Ġof Ġthis Ġcollection Ġuse Ġ[` ${ member . setter Name () }` ]( Self :: ${ member . setter Name ()} ). ") ĊĠĠĠĠĠĠĠ Ġrust (" /// ") ĊĠĠĠĠĠĠĠ Ġval Ġk Ġ= Ġcore Type . key . as Argument (" k ") ĊĠĠĠĠĠĠĠ Ġval Ġv Ġ= Ġcore Type . member . as Argument (" v ") ĊĊĠĠĠĠĠĠĠ Ġdocument Shape ( member , Ġmodel ) ĊĠĠĠĠĠĠĠ Ġrust Block (" pub Ġfn Ġ$ member Name ( mut Ġself , Ġ${ k . argument }, Ġ${ v . argument }) Ġ-> ĠSelf ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self . inner Ġ= Ġself . inner .$ member Name (${ k . value }, Ġ${ v . value }); ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠGenerate Ġand Ġwrite ĠRust Ġcode Ġfor Ġa Ġbuilder Ġmethod Ġthat Ġsets Ġan Ġinput . ĠCan Ġbe Ġused Ġfor Ġsetter Ġmethods Ġas Ġwell Ġe . g . ĊĠĠĠĠ Ġ* ĊĠĠĠĠ Ġ* Ġ` render Input Helper ( member Shape , Ġ" foo ", ĠRust Type . String )` Ġ-> Ġ` pub Ġfn Ġfoo ( mut Ġself , Ġinput : Ġimpl ĠInto < String >) Ġ-> ĠSelf Ġ{ Ġ... Ġ}` ĊĠĠĠĠ Ġ* Ġ` render Input Helper ( member Shape , Ġ" set _ bar ", ĠRust Type . Option )` Ġ-> Ġ` pub Ġfn Ġset _ bar ( mut Ġself , Ġinput : ĠOption < String >) Ġ-> ĠSelf Ġ{ Ġ... Ġ}` ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun ĠRust Writer . render Input Helper ( member : ĠMember Shape , Ġmember Name : ĠString , Ġcore Type : ĠRust Type ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfunction Input Ġ= Ġcore Type . as Argument (" input ") ĊĊĠĠĠĠĠĠĠ Ġdocument Shape ( member , Ġmodel ) ĊĠĠĠĠĠĠĠ Ġrust Block (" pub Ġfn Ġ$ member Name ( mut Ġself , Ġ${ function Input . argument }) Ġ-> ĠSelf ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self . inner Ġ= Ġself . inner .$ member Name (${ function Input . value }); ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwrite (" self ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ