Home

validate.EnumRules

Example

Disclaimer: The example is meant to show what methods are available on the object and does not necessarily constitute working code.
local types = import 'types.libsonnet';

types.validate.EnumRules
.withConst(1)
.withDefinedOnly(false)
.withIn([ 1 ])
.withNotIn([ 1 ])
._validate()

Fields

Name Type One-of group Required Constraints
const int32  
defined_only bool  
in [] int32  
not_in [] int32