template represents a common reusable asset, concept or data model within Wizata.
Attributes
| Name | Type | Description |
|---|---|---|
| template_id | uuid.UUID | technical id of the template. |
| key | str | unique logical str key identifier of your template. |
| name | str | logical display name of the Template. |
| properties | list | list of template properties associated with the template. |
| createdById | uuid.UUID | unique identifier of creating user. |
| createdDate | int | timestamp of created date. |
| updatedById | uuid.UUID | unique identifier of updating user. |
| updatedDate | int | timestamp of updated date. |
Methods
add()
add a property to the template.
| Name | Type | Default | Description |
|---|---|---|---|
| name | str | ||
| p_type | VarType | ||
| required | bool | True | |
| template_property_id | UUID | None | |
| description | str | None |
add_property()
add a property in list of properties
by default - a property is required
| Name | Type | Default | Description |
|---|---|---|---|
| property_value | dict or TemplateProperty |
api_id()
return current object id on Web API format.
endpoint()
return endpoint name used to contact backend.
from_json()
load the object from a dict originating of a JSON format.
| Name | Type | Default | Description |
|---|---|---|---|
| obj | object to load information from. |
get_properties()
return a list of TemplateProperty (replacing dict properties)
get_property()
get a property from its name.
| Name | Type | Default | Description |
|---|---|---|---|
| property_name | name of the property. |
return: template property
remove_property()
remove a property from the list based on its name
| Name | Type | Default | Description |
|---|---|---|---|
| name | str | property to remove |
set_id()
specify the id_value neutrally
| Name | Type | Default | Description |
|---|---|---|---|
| id_value |
return:
to_json()
transform current object into a dict that could be JSONIFY.
| Name | Type | Default | Description |
|---|---|---|---|
| target | str | None |
return: dumpable dict.