sams_client.schemas.sets – Sets¶
-
SET_SCHEMA= {'description': {'type': 'string'}, 'destination_config': {'allow_unknown': True, 'schema': {}, 'type': 'dict'}, 'destination_name': {'required': True, 'type': 'string'}, 'firstcreated': {'type': 'datetime'}, 'maximum_asset_size': {'mapping': {'type': 'long'}, 'type': 'integer'}, 'name': {'empty': False, 'nullable': False, 'required': True, 'type': 'string', 'unique': True}, 'original_creator': {'type': 'string'}, 'state': {'allowed': ('draft', 'usable', 'disabled'), 'default': 'draft', 'nullable': False, 'type': 'string'}, 'version_creator': {'type': 'string'}, 'versioncreated': {'type': 'datetime'}}¶ - Set Schema =
_idbson.objectid.ObjectIdGlobally unique id, generated automatically by the system.
stateSET_STATE (sams_client.schemas.sets.SET_STATES)The state of the Set. One of
draft,usable, ordisabled.namestringUnique name for the Set
descriptionstringA short description on what this set is designated for
destination_namestringThe name of a registered StorageDestination (
sams.storage.destinations)destination_configdictA dictionary containing the configuration options for the specific destination used
maximum_asset_sizelongThe maximum size of an Asset that can be uploaded to this Set (optional)
original_creatorstringA field to store the id of the user who created the set
version_creatorstringA field to store the id of the user who updated the set
firstcreatedstringA field to store time, when set is created
versioncreatedstringA field to store time, when set is updated
-
SET_STATES: sams_client.schemas.sets.SetStates = SetStates(DRAFT='draft', USABLE='usable', DISABLED='disabled')¶ The state of a Set defines the available actions on it. A Set can be in any one of the following states:
DRAFT: allows the administrator to configure the Set with the correct
destination_nameanddestination_config.destination_namecan be changeddestination_configcan be changedThe Set can be deleted
Assets cannot be uploaded to it
Assets cannot be downloaded from it
USABLE: Once the administrator has completed configuring the Set, they will change the
statetousable. This meansproducerscan now upload Assets to the Set.destination_namecannot be changeddestination_configcannot be changedThe Set cannot be deleted
The
statecan only be changed todisabledAssets can be uploaded to it
Assets can be downloaded from it
DISABLED: The administrator is able to change a Set to be in disabled, so
producersare unable to add new Assets to it.destination_namecannot be changeddestination_configcannot be changedThe Set cannot be deleted
The
statecan only be changed tousableAssets cannot be uploaded to it
Assets can be downloaded from it
Note
The attributes
destination_nameanddestination_configare read-only when thestateisusableordisabled. This is because the system would have to move Assets to the new destination, which would be better suited to a migrate endpoint.