from nz.org.riskscape.engine.types import Struct, Text, Type, WithinSet, WithinRange, Integer

ID = 'asset:building'

materials = WithinSet(Text(), ["wood", "concrete", "brick"])
age = WithinRange(Integer(), 0, 10000)

TYPE = Struct.StructBuilder() \
                   .and('cladding', materials) \
                   .and('structure', materials) \
                   .and('age', age) \
                   .build()
