    

 ## On this page

  

 

 # setMetadata

 Last update: 16.07.2025 

public [setMetadata](set-metadata.md)(name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), type: [Variable.MetadataType](-metadata-type/index.md), value: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html), access: [Variable.MetadataAccess](-metadata-access/index.md), archive: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))

Set a metadata value on a variable.

#### Parameters

namethe metadata value's nametypethe type of metadatavaluethe string representation of the value to setaccessthe access (private, readonly, public)archivewhether to save the data with the model