Parameter

A parameter provides the ability to specify the parameters that a trait should contain. By providing a name, default values, and supported data types, trait references become restricted by which arguments they can contain. Parameters are defined for traits in the schema documents folder.

public class CdmParameterDefinition extends CdmObjectDefinitionBase

CdmParameterDefinition extends CdmObjectSimple in Python and TypeScript.

Constructors

Name Description
CdmParameterDefinition(CdmCorpusContext, string)
ctx: The corpus context.
name: The parameter's name.
Initializes a new instance of the CdmParameterDefinition class.

Properties

Name Type Description
Name string The parameter's name. This can be used to set argument values when referencing traits.
DefaultValue dynamic The parameter's default value to use if no corresponding arguments are set.
Required bool If true, an error will be reported if a trait being referenced has no value set as an argument.
DataTypeRef CdmDataTypeReference The data type that describes the meaning and shape of the values that can be represented by this parameter.

Methods

Name Description Return Type
GetName() See CdmObjectDefinition.GetName(). string
IsDerivedFrom(string, ResolveOptions) See CdmObject.IsDerivedFrom(...). bool
Copy(ResolveOptions, CdmObject) See CdmObject.Copy(...). CdmObject
Validate() See CdmObject.Validate(). bool