@ file : Suppress (" Member Visibility Can Be Private ", Ġ" unused ") Ċ Ċ package Ġru . i is ae v . kotlin . aws . sdk Ċ Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġkotlinx . coroutines . flow . flow Ċ import Ġkotlinx . coroutines . flow . flow On Ċ import Ġkotlinx . coroutines . future . await Ċ import Ġkotlinx . coroutines . reactive . as Flow Ċ import Ġsoftware . amazon . aw ssdk . auth . credentials . EnvironmentVariable Credentials Provider Ċ import Ġsoftware . amazon . aw ssdk . core . client . config . Client Override Configuration Ċ import Ġsoftware . amazon . aw ssdk . core . client . config . Sdk Advanced Async Client Option Ċ import Ġsoftware . amazon . aw ssdk . http . async . Sdk Async HttpClient Ċ import Ġsoftware . amazon . aw ssdk . regions . Region Ċ import Ġsoftware . amazon . aw ssdk . services . dynamodb . D ynamo Db Async Client Ċ import Ġsoftware . amazon . aw ssdk . services . dynamodb . D ynamo Db Async Client Builder Ċ import Ġsoftware . amazon . aw ssdk . services . dynamodb . model .* Ċ import Ġjava . net . URI Ċ import Ġjava . util . concurrent . Concurrent HashMap Ċ import Ġjava . util . concurrent . Executor Ċ Ċ @ Experimental Cor outines Api Ċ class ĠD ynamo Db Async K lient ( val Ġnative Client : ĠD ynamo Db Async Client ) Ġ{ ĊĠĠĠ Ġsuspend Ġfun Ġbatch GetItem ( builder : Ġ( Batch GetItem Request . Builder ) Ġ-> ĠUnit ): ĠBatch GetItem Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . batch GetItem ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġbatch Write Item ( builder : Ġ( Batch Write Item Request . Builder ) Ġ-> ĠUnit ): ĠBatch Write Item Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . batch Write Item ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate Backup ( builder : Ġ( Create Backup Request . Builder ) Ġ-> ĠUnit ): ĠBackup Details Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . create Backup ( builder ). await (). backup Details () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate Global Table ( builder : Ġ( Create Global Table Request . Builder ) Ġ-> ĠUnit ): ĠGlobal Table Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . create Global Table ( builder ). await (). global Table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate Table ( builder : Ġ( CreateTable Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . createTable ( builder ). await (). table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Backup ( builder : Ġ( Delete Backup Request . Builder ) Ġ-> ĠUnit ): ĠBackup Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . delete Backup ( builder ). await (). backup Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Item ( builder : Ġ( Delete Item Request . Builder ) Ġ-> ĠUnit ): ĠDelete Item Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . delete Item ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdelete Table ( builder : Ġ( Delete Table Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . delete Table ( builder ). await (). table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Backup ( builder : Ġ( Describe Backup Request . Builder ) Ġ-> ĠUnit ): ĠBackup Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Backup ( builder ). await (). backup Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Continuous Backups ( builder : Ġ( Describe Continuous Backups Request . Builder ) Ġ-> ĠUnit ): ĠContinuous Backups Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Continuous Backups ( builder ). await (). continuous Backups Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Contributor Insights ( builder : Ġ( Describe Contributor Insights Request . Builder ) Ġ-> ĠUnit ): ĠDescribe Contributor Insights Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Contributor Insights ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Endpoints ( builder : Ġ( Describe Endpoints Request . Builder ) Ġ-> ĠUnit Ġ= Ġ{} ): ĠList < Endpoint > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Endpoints ( builder ). await (). endpoints () Ġ?: Ġempty List () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Global Table ( builder : Ġ( Describe Global Table Request . Builder ) Ġ-> ĠUnit ): ĠGlobal Table Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Global Table ( builder ). await (). global Table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Global Table Settings ( builder : Ġ( Describe Global Table Settings Request . Builder ) Ġ-> ĠUnit ): ĠDescribe Global Table Settings Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Global Table Settings ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Limits ( builder : Ġ( Describe Limits Request . Builder ) Ġ-> ĠUnit Ġ= Ġ{} ): ĠDescribe Limits Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Limits ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Table ( builder : Ġ( Describe Table Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Table ( builder ). await (). table () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe Table Replica AutoScaling ( builder : Ġ( Describe Table Replica AutoScaling Request . Builder ) Ġ-> ĠUnit ): ĠTable AutoScaling Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe Table Replica AutoScaling ( builder ). await (). table AutoScaling Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġdescribe TimeTo Live ( builder : Ġ( Describe TimeTo Live Request . Builder ) Ġ-> ĠUnit ): ĠTime To Live Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . describe TimeTo Live ( builder ). await (). time To Live Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun ĠgetItem ( builder : Ġ( GetItem Request . Builder ) Ġ-> ĠUnit ): ĠMap < String , ĠAttribute Value > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . getItem ( builder ). await (). item () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġlist Backups ( builder : Ġ( List Backups Request . Builder ) Ġ-> ĠUnit Ġ= Ġ{} ): ĠFlow < Backup Summary > Ġ= Ġflow Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġnext Token : ĠString ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġdo Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġnative Client . list Backups Ġ{ Ġit . exclusive Start Backup Arn ( nextToken ). also ( builder ) Ġ}. await () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresult . backup Sum maries ()?. forEach Ġ{ Ġemit ( it ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnext Token Ġ= Ġresult . last Evalu ated Backup Arn () ĊĠĠĠĠĠĠĠ Ġ} Ġwhile Ġ( nextToken Ġ!= Ġnull ) ĊĠĠĠ Ġ}. flow On ( Dispatch ers . IO ) ĊĊĠĠĠ Ġfun Ġlist Contributor Insights ( builder : Ġ( List Contributor Insights Request . Builder ) Ġ-> ĠUnit ): ĠFlow < Contributor Insights Summary > Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnative Client . list Contributor Insights Paginator ( builder ). flatMap Iterable Ġ{ Ġit . contributor Insights Sum maries () Ġ?: Ġempty List () Ġ}. as Flow () ĊĊĠĠĠ Ġfun Ġlist Global Tables ( builder : Ġ( List Global Tables Request . Builder ) Ġ-> ĠUnit Ġ= Ġ{} ): ĠFlow < Global Table > Ġ= Ġflow Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġnext Token : ĠString ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġdo Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġnative Client . list Global Tables Ġ{ Ġit . exclusive Start Global TableName ( nextToken ). also ( builder ) Ġ}. await () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresult . global Tables ()?. forEach Ġ{ Ġemit ( it ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnext Token Ġ= Ġresult . last Evalu ated Global TableName () ĊĠĠĠĠĠĠĠ Ġ} Ġwhile Ġ( nextToken Ġ!= Ġnull ) ĊĠĠĠ Ġ}. flow On ( Dispatch ers . IO ) ĊĊĊĠĠĠ Ġfun Ġlist Tables ( builder : Ġ( List Tables Request . Builder ) Ġ-> ĠUnit Ġ= Ġ{} ): ĠFlow < String > Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnative Client . list Tables Paginator ( builder ). table Names (). as Flow () ĊĊĠĠĠ Ġsuspend Ġfun Ġlist Tags Of Resource ( builder : Ġ( List Tags Of Resource Request . Builder ) Ġ-> ĠUnit ): ĠMap < String , ĠString > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĠHashMap < String , ĠString >() ĊĠĠĠĠĠĠĠ Ġvar Ġnext Token : ĠString ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġdo Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġrs Ġ= Ġnative Client . list Tags Of Resource () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . nextToken ( nextToken ). also ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}. await () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrs . tags ()?. forEach Ġ{ Ġresult [ it . key ()] Ġ= Ġit . value () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnext Token Ġ= Ġrs . nextToken () ĊĠĠĠĠĠĠĠ Ġ} Ġwhile Ġ( nextToken Ġ!= Ġnull ) ĊĠĠĠĠĠĠĠ Ġreturn Ġresult ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġput Item ( builder : Ġ( Put Item Request . Builder ) Ġ-> ĠUnit ): ĠMap < String , ĠAttribute Value > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . put Item ( builder ). await (). attributes () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġquery ( builder : Ġ( Query Request . Builder ) Ġ-> ĠUnit ): ĠFlow < Map < String , ĠAttribute Value >> Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnative Client . query Paginator ( builder ). items (). as Flow () ĊĊĠĠĠ Ġsuspend Ġfun Ġrestore Table From Backup ( builder : Ġ( Restore Table From Backup Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . restore Table From Backup ( builder ). await (). table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġrestore Table To Point In Time ( builder : Ġ( Restore Table To Point In Time Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . restore Table To Point In Time ( builder ). await (). table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġscan ( builder : Ġ( Scan Request . Builder ) Ġ-> ĠUnit ): ĠFlow < Map < String , ĠAttribute Value >> Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnative Client . scan Paginator ( builder ). items (). as Flow () ĊĊĠĠĠ Ġsuspend Ġfun Ġtag Resource ( builder : Ġ( Tag Resource Request . Builder ) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġnative Client . tag Resource ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġtrans act Get Items ( builder : Ġ( Transact Get Items Request . Builder ) Ġ-> ĠUnit ): ĠList < Item Response > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . transact Get Items ( builder ). await (). responses () Ġ?: Ġempty List () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġtrans act Write Items ( builder : Ġ( Transact Write Items Request . Builder ) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġnative Client . transact Write Items ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġunt ag Resource ( builder : Ġ( Unt ag Resource Request . Builder ) Ġ-> ĠUnit ) Ġ{ ĊĠĠĠĠĠĠĠ Ġnative Client . unt ag Resource ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Continuous Backups ( builder : Ġ( Update Continuous Backups Request . Builder ) Ġ-> ĠUnit ): ĠContinuous Backups Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Continuous Backups ( builder ). await (). continuous Backups Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Contributor Insights ( builder : Ġ( Update Contributor Insights Request . Builder ) Ġ-> ĠUnit ): ĠUpdate Contributor Insights Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Contributor Insights ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Global Table ( builder : Ġ( Update Global Table Request . Builder ) Ġ-> ĠUnit ): ĠGlobal Table Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Global Table ( builder ). await (). global Table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Global Table Settings ( builder : Ġ( Update Global Table Settings Request . Builder ) Ġ-> ĠUnit ): ĠUpdate Global Table Settings Response Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Global Table Settings ( builder ). await () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Item ( builder : Ġ( Update Item Request . Builder ) Ġ-> ĠUnit ): ĠMap < String , ĠAttribute Value > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Item ( builder ). await (). attributes () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Table ( builder : Ġ( Update Table Request . Builder ) Ġ-> ĠUnit ): ĠTable Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Table ( builder ). await (). table Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Table Replica AutoScaling ( builder : Ġ( Update Table Replica AutoScaling Request . Builder ) Ġ-> ĠUnit ): ĠTable AutoScaling Description Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update Table Replica AutoScaling ( builder ). await (). table AutoScaling Description () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate TimeTo Live ( builder : Ġ( UpdateTime To Live Request . Builder ) Ġ-> ĠUnit ): ĠTime To Live Specification Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnative Client . update TimeTo Live ( builder ). await (). time To Live Specification () ĊĠĠĠ Ġ} Ċ } ĊĊ Ċ @ Experimental Cor outines Api Ċ private Ġval Ġclient Cache Ġ= ĠConcurrent HashMap < Region , ĠD ynamo Db Async K lient >( Region . regions (). size ) Ċ Ċ @ Experimental Cor outines Api Ċ fun ĠS dk Async HttpClient . d ynamo Db ( ĊĠĠĠĠĠĠĠ Ġregion : ĠRegion , ĊĠĠĠĠĠĠĠ Ġbuilder : Ġ( D ynamo Db Async Client Builder ) Ġ-> ĠUnit Ġ= Ġ{} Ċ ) Ġ= Ġclient Cache . compute If Absent ( region ) Ġ{ ĊĠĠĠ ĠD ynamo Db Async Client . builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. httpClient ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. region ( region ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. credentials Provider ( EnvironmentVariable Credentials Provider . create ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. async Configuration Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . advanced Option ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠS dk Advanced Async Client Option . F UT URE _ COMP LE TION _ EXECUT OR , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠExecutor Ġ{ Ġrunnable Ġ-> Ġrunnable . run () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. override Configuration ( Client Override Configuration . builder (). build ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. endpoint Override ( URI (" https :// dynamodb .${ region . id ()}. amazonaws . com ")) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. also ( builder ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. let Ġ{ ĠD ynamo Db Async K lient ( it ) Ġ} Ċ }