package Ġcom . intellij . aws . cloudformation . model Ċ Ċ import Ġcom . intellij . aws . cloudformation . Cloud Formation Metadata Provider Ċ import Ġcom . intellij . aws . cloudformation . metadata . Cloud Formation Resource Attribute Ċ import Ġcom . intellij . aws . cloudformation . metadata . aws Server less Function Ċ Ċ class ĠC fn Resource Node ( name : ĠC fn Scalar Value Node ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtype : ĠC fn ResourceType Node ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġproperties : ĠC fn Resource Properties Node ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcondition : ĠC fn Resource Condition Node ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġdepends On : ĠC fn Resource Dep ends On Node ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġall TopLevel Properties : ĠMap < String , ĠC fn Named Node >) Ġ: ĠC fn Named Node ( name ) Ġ{ ĊĠ Ġval ĠtypeName : ĠString ? ĊĠĠĠ Ġget () Ġ= Ġtype ?. value ?. value ĊĊĠ Ġfun Ġget Attributes ( root : ĠC fn Root Node ): ĠMap < String , ĠCloudFormation Resource Attribute > Ġ{ ĊĠĠĠ Ġval Ġresource TypeName Ġ= ĠtypeName Ġ?: Ġreturn Ġempty Map () ĊĠĠĠ Ġval Ġresource Type Ġ= ĠCloudFormation Metadata Provider . METADATA . find ResourceType ( resource TypeName , Ġroot ) Ġ?: Ġreturn Ġempty Map () ĊĊĠĠĠ Ġ// Ġhttps :// github . com / aw sl abs / serverless - application - model / blob / develop / versions / 2 0 1 6 - 1 0 - 3 1 . md # refer encing - lambda - version -- alias - resources ĊĠĠĠ Ġif Ġ( is Aws Server less Function With Auto Publish Alias ()) Ġ{ ĊĠĠĠĠĠ Ġval Ġadditional Attributes Ġ= ĠlistOf (" Version ", Ġ" Alias ") ĊĠĠĠĠĠ Ġreturn Ġresource Type . attributes Ġ+ Ġadditional Attributes . map Ġ{ Ġit Ġto ĠCloudFormation Resource Attribute ( it ) Ġ}. toMap () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġreturn Ġresource Type . attributes ĊĠ Ġ} ĊĊĠ Ġ// Ġhttps :// github . com / aw sl abs / serverless - application - model / blob / develop / versions / 2 0 1 6 - 1 0 - 3 1 . md # refer encing - lambda - version -- alias - resources ĊĠ Ġfun Ġis Aws Server less Function With Auto Publish Alias () Ġ= ĊĠĠĠĠĠ ĠtypeName Ġ== Ġaws Server less Function . name Ġ&& ĊĠĠĠĠĠĠĠĠĠ Ġproperties Ġ!= Ġnull Ġ&& Ġproperties . properties . any Ġ{ Ġit . name ?. value Ġ== Ġ" Auto Publish Alias " Ġ&& Ġit . value Ġ!= Ġnull Ġ} Ċ }