class documentation

class AttributePolicy:

View In Hierarchy

Attribute policy for a single resource attribute.

Method select Return the n-th attributes in the dataclass.
Class Variable announcement Whether the attribute is announced.
Class Variable cardinality Cardinality of the attribute.
Class Variable choice Whether this attribute is part of a choice.
Class Variable ctype Definition name for a complex type attribute.
Class Variable etype Name of the enum type (if the attribute is of type enum).
Class Variable evalues Dict of enum values and interpretations.
Class Variable fname Name of the definition file.
Class Variable lname Long name of the attribute.
Class Variable lSize Mandatory size of a list.
Class Variable ltype Sub-type of a list as writen in the definition.
Class Variable lTypeName Sub-type of a list as writen in the definition.
Class Variable namespace Namespace of the attribute.
Class Variable optionalCreate Optionality of the attribute for create requests.
Class Variable optionalDiscovery Optionality of the attribute for discovery requests.
Class Variable optionalUpdate Optionality of the attribute for update requests.
Class Variable ptype Implementation type of the enum values.
Class Variable rtypes List of resource types that this attribute is valid for.
Class Variable sname Short name of the attribute.
Class Variable type Type of the attribute.
Class Variable typeName The type as written in the definition.
Class Variable typeShortname Type name of the attribute.
def select(self, index: int) -> Any | None:

Return the n-th attributes in the dataclass.

Parameters
index:intAttribute index
Returns
Any | Nonen-th attribute from the dataclass, or None in case of an error.
announcement: Announced =

Whether the attribute is announced.

cardinality: Cardinality =

Cardinality of the attribute.

choice: bool =

Whether this attribute is part of a choice.

ctype: str =

Definition name for a complex type attribute.

etype: str =

Name of the enum type (if the attribute is of type enum).

evalues: dict[int, str] =

Dict of enum values and interpretations.

fname: str =

Name of the definition file.

lname: str =

Long name of the attribute.

lSize: int =

Mandatory size of a list.

ltype: BasicType =

Sub-type of a list as writen in the definition.

lTypeName: str =

Sub-type of a list as writen in the definition.

namespace: str =

Namespace of the attribute.

optionalCreate: RequestOptionality =

Optionality of the attribute for create requests.

optionalDiscovery: RequestOptionality =

Optionality of the attribute for discovery requests.

optionalUpdate: RequestOptionality =

Optionality of the attribute for update requests.

ptype: type =

Implementation type of the enum values.

rtypes: list[ResourceTypes] =

List of resource types that this attribute is valid for.

sname: str =

Short name of the attribute.

type: BasicType =

Type of the attribute.

typeName: str =

The type as written in the definition.

typeShortname: str =

Type name of the attribute.