Skip to main content

CollectionType

The kind of collection.

Attributes​

AttributeTypeDescription
MANUALstring = "manual"Represents a manual collection type.
SMARTstring = "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​

NameTypeDescription
valuestringThe string value to convert to a CollectionType enum member.

Returns​

TypeDescription
[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​

NameTypeDescription
valuestringThe value to convert to a CollectionType enum member.

Returns​

TypeDescription
[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​

TypeDescription
listA 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​

NameTypeDescription
valuestringThe value to check for validity.

Returns​

TypeDescription
booleanTrue if the value is a valid enum member, False otherwise.

values()​

@classmethod
def values() - > list

List all enum values.

Returns​

TypeDescription
listA list of all enum values.