AttributeOptionDef

class AttributeOptionDef

API for an attribute option definition.

Returned by

AddOption(option)

Adds a child option.

Parameters:
option

Child option definition

Raises:

ApiError – If argument option has invalid type.

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

AttributeOptionDef

GetIdentifier()

Returns the identifier of the option definition.

Returns:

Identifier of the option definition

Return type:

str

GetLabel()

Returns the label of the option definition.

Returns:

Display label of the option definition

Return type:

str

GetOption(identifier)

Returns the first option that matches the given identifier.

Parameters:
identifier : str

Option identifier

Returns:

Matching option or None

Return type:

AttributeOptionDef

Raises:

ApiError – If argument identifier has invalid type.

GetOptions()

Returns all direct child options.

Returns:

Child option definitions

Return type:

list[AttributeOptionDef]

SetLabel(label)

Sets the label of the option definition.

Parameters:
label : str

Display label of the option definition