CollectionType
The kind of collection.
Attributes
| Attribute | Type | Description |
|---|---|---|
| MANUAL | string = "manual" | Represents a manual collection type. |
| SMART | string = "smart" | Represents a smart collection type. |
Methods
from_string()
@classmethod
def from_string(
value: string
) - > [CollectionType](collectiontype.md?sid=app_models_collection_collectiontype)
Returns the enum member matching the string value, or raises ValueError if it cannot be found.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The string value to convert to a CollectionType enum member. |
Returns
| Type | Description |
|---|---|
[CollectionType](collectiontype.md?sid=app_models_collection_collectiontype) | The enum member matching the string value. |
from_value()
@classmethod
def from_value(
value: string
) - > [CollectionType](collectiontype.md?sid=app_models_collection_collectiontype)
Returns the enum member matching the given value, or raises ValueError if it cannot be found.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The value to convert to a CollectionType enum member. |
Returns
| Type | Description |
|---|---|
[CollectionType](collectiontype.md?sid=app_models_collection_collectiontype) | The enum member matching the given value. |
member_names()
@classmethod
def member_names() - > list
List all member names.
Returns
| Type | Description |
|---|---|
list | A list of all member names. |
valid()
@classmethod
def valid(
value: string
) - > boolean
Returns True if the given value is a valid enum member, False otherwise.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The value to check for validity. |
Returns
| Type | Description |
|---|---|
boolean | True if the value is a valid enum member, False otherwise. |
values()
@classmethod
def values() - > list
List all enum values.
Returns
| Type | Description |
|---|---|
list | A list of all enum values. |