mstrio > distribution_services > subscription > delivery

enum mstrio.distribution_services.subscription.delivery.CacheType(value)

Bases: AutoName

Valid values are as follows:

RESERVED = CacheType.RESERVED
SHORTCUT = CacheType.SHORTCUT
SHORTCUTWITHBOOKMARK = CacheType.SHORTCUTWITHBOOKMARK
enum mstrio.distribution_services.subscription.delivery.ClientType(value)

Bases: AutoUpperName

Valid values are as follows:

PHONE = <ClientType.PHONE: 'PHONE'>
TABLET = <ClientType.TABLET: 'TABLET'>
class mstrio.distribution_services.subscription.delivery.Delivery(mode='EMAIL', expiration=None, contact_security=None, subject=None, message=None, filename=None, compress=False, zip=None, password=None, password_protect=False, space_delimiter=None, send_content_as=SendContentAs.DATA, overwrite_older_version=False, burst_sub_folder=None, copies=None, range_start=None, range_end=None, collated=False, orientation='PORTRAIT', use_print_range=False, mobile_client_type='PHONE', device_id=None, do_not_create_update_caches=False, re_run_hl=False, expiration_time_zone=None, email=None, file=None, cache_type=CacheType.RESERVED, shortcut_cache_format=ShortcutCacheFormat.RESERVED, library_cache_types=None, reuse_dataset_cache=False, is_all_library_users=False, notification_enabled=False, personal_notification_address_id=None)

Bases: DeliveryDictable

Delivery settings object

Parameters:
  • expiration (str) –

  • contact_security (bool | None) –

  • subject (str | None) –

  • message (str | None) –

  • filename (str | None) –

  • compress (bool) –

  • zip (ZipSettings | None) –

  • password (str | None) –

  • password_protect (bool) –

  • space_delimiter (str | None) –

  • send_content_as (SendContentAs) –

  • overwrite_older_version (bool) –

  • burst_sub_folder (str | None) –

  • copies (int | None) –

  • range_start (int | None) –

  • range_end (int | None) –

  • collated (bool) –

  • orientation (Orientation) –

  • use_print_range (bool) –

  • mobile_client_type (ClientType) –

  • device_id (str | None) –

  • do_not_create_update_caches (bool) –

  • re_run_hl (bool) –

  • expiration_time_zone (str | None) –

  • email (Email | None) –

  • file (File | None) –

  • cache_type (CacheType | str) –

  • shortcut_cache_format (ShortcutCacheFormat | str) –

  • library_cache_types (list[LibraryCacheTypes | str]) –

  • reuse_dataset_cache (bool) –

  • is_all_library_users (bool) –

  • notification_enabled (bool) –

  • personal_notification_address_id (str | None) –

mode

The subscription delivery mode (i.e. email, file, printer, etc.)

expiration

Expiration date of the subscription, format should be yyyy-MM-dd

contact_security

Whether to use contact security for each contact group member

email

Email delivery properties object

file

File delivery properties object

printer

File delivery properties object

ftp

FTP delivery properties object

cache

Cache delivery properties

mobile

Mobile delivery properties object

history_list

HistoryList delivery properties

class Cache(cache_type=CacheType.RESERVED, shortcut_cache_format=ShortcutCacheFormat.RESERVED, library_cache_types=None, reuse_dataset_cache=False, is_all_library_users=False)

Bases: DeliveryDictable

Delivery properties for Cache subscriptions

Parameters:
cache_type

The cache type to use

shortcut_cache_format

The shortcut cache format to use

library_cache_types

Set of library cache types, available types can be web, android, ios

reuse_dataset_cache

Whether to reuse dataset cache

is_all_library_users

Whether for all library users

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'is_all_library_users': [<class 'bool'>, False], 'library_cache_types': [<class 'list'>, False], 'reuse_dataset_cache': [<class 'bool'>, False]}
enum DeliveryMode(value)

Bases: AutoUpperName

Valid values are as follows:

EMAIL = <DeliveryMode.EMAIL: 'EMAIL'>
FILE = <DeliveryMode.FILE: 'FILE'>
PRINTER = <DeliveryMode.PRINTER: 'PRINTER'>
HISTORY_LIST = <DeliveryMode.HISTORY_LIST: 'HISTORY_LIST'>
CACHE = <DeliveryMode.CACHE: 'CACHE'>
MOBILE = <DeliveryMode.MOBILE: 'MOBILE'>
FTP = <DeliveryMode.FTP: 'FTP'>
SNAPSHOT = <DeliveryMode.SNAPSHOT: 'SNAPSHOT'>
PERSONAL_VIEW = <DeliveryMode.PERSONAL_VIEW: 'PERSONAL_VIEW'>
UNSUPPORTED = <DeliveryMode.UNSUPPORTED: 'UNSUPPORTED'>
class Email(subject=None, message=None, filename=None, space_delimiter=None, send_content_as=None, overwrite_older_version=False, zip=None)

Bases: DeliveryDictable

Delivery properties for Email subscriptions

Parameters:
  • subject (str | None) –

  • message (str | None) –

  • filename (str | None) –

  • space_delimiter (str | None) –

  • send_content_as (SendContentAs | None) –

  • overwrite_older_version (bool) –

  • zip (ZipSettings | None) –

subject

The email subject associated with the subscription

message

The email body of subscription

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

send_content_as

Send subscribed content as one of [data, data_and_history_list, data_and_link_and_history_list, link_and_history_list]

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

zip

Optional compression settings object

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present, whether all the properties present are of correct types and whether the message and subject do not exceed the character limits.

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'message': [<class 'str'>, False], 'overwrite_older_version': [<class 'bool'>, False], 'send_content_as': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'subject': [<class 'str'>, True], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
class File(filename=None, space_delimiter=None, burst_sub_folder=None, zip=None)

Bases: DeliveryDictable

Delivery properties for File subscriptions

Parameters:
  • filename (str | None) –

  • space_delimiter (str | None) –

  • burst_sub_folder (str | None) –

  • zip (ZipSettings | None) –

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

burst_sub_folder

The burst sub folder

zip

Optional compression settings object

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'burst_sub_folder': [<class 'str'>, False], 'filename': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
class Ftp(space_delimiter=None, filename=None, zip=None)

Bases: DeliveryDictable

Delivery properties for FTP subscriptions

Parameters:
  • space_delimiter (str | None) –

  • filename (str | None) –

  • zip (ZipSettings | None) –

filename

The filename that will be delivered when the subscription is executed

space_delimiter

The space delimiter

zip

Optional compression settings object

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'space_delimiter': [<class 'str'>, False], 'zip': [<class 'mstrio.distribution_services.subscription.delivery.ZipSettings'>, False]}
class HistoryList(device_id=None, do_not_create_update_caches=False, overwrite_older_version=False, re_run_hl=False)

Bases: DeliveryDictable

Delivery properties for History List subscriptions

Parameters:
  • device_id (str | None) –

  • do_not_create_update_caches (bool) –

  • overwrite_older_version (bool) –

  • re_run_hl (bool) –

device_id

The mobile target project

do_not_create_update_caches

Whether the subscription will use a existing cache

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

re_run_hl

Whether the subscription will re-run against warehouse

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'device_id': [<class 'str'>, False], 'do_not_create_update_caches': [<class 'bool'>, False], 'overwrite_older_version': [<class 'bool'>, False], 're_run_hl': [<class 'bool'>, False]}
class Mobile(mobile_client_type='PHONE', device_id=None, do_not_create_update_caches=False, overwrite_older_version=False, re_run_hl=False)

Bases: DeliveryDictable

Delivery properties for Mobile subscriptions

Parameters:
  • mobile_client_type (ClientType) –

  • device_id (str | None) –

  • do_not_create_update_caches (bool) –

  • overwrite_older_version (bool) –

  • re_run_hl (bool) –

mobile_client_type

The mobile client type

device_id

The mobile target project

do_not_create_update_caches

Whether the subscription will use a existing cache

overwrite_older_version

Whether the current subscription will overwrite earlier versions of the same report or document in the history list

re_run_hl

Whether the subscription will re-run against warehouse

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'device_id': [<class 'str'>, False], 'do_not_create_update_caches': [<class 'bool'>, False], 'mobile_client_type': [<class 'str'>, False], 'overwrite_older_version': [<class 'bool'>, False], 're_run_hl': [<class 'bool'>, False]}
class Printer(copies=None, range_start=None, range_end=None, collated=False, orientation='PORTRAIT', use_print_range=False)

Bases: DeliveryDictable

Delivery properties for Printer subscriptions

Parameters:
  • copies (int | None) –

  • range_start (int | None) –

  • range_end (int | None) –

  • collated (bool) –

  • orientation (Orientation) –

  • use_print_range (bool) –

copies

The number of copies that should be printed

range_start

The number indicating the first report page that should be printed

range_end

The number indicating the last report page that should be printed

collated

Whether the printing should be collated or not

orientation

Whether orientation is portrait or landscape

use_print_range

Whether a print range should be used

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'collated': [<class 'bool'>, False], 'copies': [<class 'int'>, False], 'orientation': [<class 'str'>, False], 'range_end': [<class 'int'>, False], 'range_start': [<class 'int'>, False], 'use_print_range': [<class 'bool'>, False]}
classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

change_mode(mode_name, mode_value)

Change mode of the Delivery object. Return True on success, False if mode_name was invalid.

Parameters:

mode_name (str) –

Return type:

bool

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'cache': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Cache'>, False], 'contact_security': [<class 'bool'>, False], 'email': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Email'>, False], 'expiration': [<class 'str'>, False], 'expiration_time_zone': [<class 'str'>, False], 'file': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.File'>, False], 'ftp': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Ftp'>, False], 'history_list': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.HistoryList'>, False], 'mobile': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Mobile'>, False], 'mode': [<class 'str'>, True], 'printer': [<class 'mstrio.distribution_services.subscription.delivery.Delivery.Printer'>, False]}
class mstrio.distribution_services.subscription.delivery.DeliveryDictable

Bases: Dictable

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {}
enum mstrio.distribution_services.subscription.delivery.LegacyCacheType(value)

Bases: AutoUpperName

Available values when using environment with version 11.3.0100 or lower

Valid values are as follows:

RESERVED = <LegacyCacheType.RESERVED: 'RESERVED'>
SHORTCUT = <LegacyCacheType.SHORTCUT: 'SHORTCUT'>
SHORTCUTWITHBOOKMARK = <LegacyCacheType.SHORTCUTWITHBOOKMARK: 'SHORTCUTWITHBOOKMARK'>
BOOKMARK = <LegacyCacheType.BOOKMARK: 'BOOKMARK'>
enum mstrio.distribution_services.subscription.delivery.LibraryCacheTypes(value)

Bases: AutoName

Valid values are as follows:

ANDROID = LibraryCacheTypes.ANDROID
ANDROID_AND_IOS = LibraryCacheTypes.ANDROID_AND_IOS
IOS = LibraryCacheTypes.IOS
WEB = LibraryCacheTypes.WEB
enum mstrio.distribution_services.subscription.delivery.Orientation(value)

Bases: AutoUpperName

Valid values are as follows:

PORTRAIT = <Orientation.PORTRAIT: 'PORTRAIT'>
LANDSCAPE = <Orientation.LANDSCAPE: 'LANDSCAPE'>
enum mstrio.distribution_services.subscription.delivery.SendContentAs(value)

Bases: AutoName

Valid values are as follows:

DATA = SendContentAs.DATA
DATA_AND_HISTORY_LIST = SendContentAs.DATA_AND_HISTORY_LIST
enum mstrio.distribution_services.subscription.delivery.ShortcutCacheFormat(value)

Bases: AutoUpperName

Valid values are as follows:

RESERVED = <ShortcutCacheFormat.RESERVED: 'RESERVED'>
JSON = <ShortcutCacheFormat.JSON: 'JSON'>
BINARY = <ShortcutCacheFormat.BINARY: 'BINARY'>
BOTH = <ShortcutCacheFormat.BOTH: 'BOTH'>
class mstrio.distribution_services.subscription.delivery.ZipSettings(filename=None, password=None, password_protect=False)

Bases: DeliveryDictable

Optional compression settings

Parameters:
  • filename (str | None) –

  • password (str | None) –

  • password_protect (bool) –

filename

Filename of the compressed content

password

Optional password for the compressed file

password_protect

Whether to password protect file or not

classmethod bulk_from_dict(source_list, connection=None, to_snake_case=True, with_missing_value=False)

Creates multiple objects from a list of dictionaries. For each dictionary provided the keys in camel case are changed to object’s attribute names (by default in snake case) and dict values are composed to their proper data types such as Enums, list of Enums etc. as specified in the object’s _FROM_DICT_MAP.

Parameters:
  • cls (T) – Class (type) of the objects that should be created.

  • source_list (List[Dict[str, Any]]) – A list of dictionaries from which the objects will be constructed.

  • connection (Connection, optional) – A MSTR Connection object. Defaults to None.

  • to_snake_case (bool, optional) – Set to True if attribute names should be converted from camel case to snake case. Defaults to True.

  • with_missing_value (bool) – (bool, optional): If True, class attributes possible to fetch and missing in source will be set as MissingValue objects.

Returns:

A list of objects of type T.

Return type:

T

classmethod from_dict(source, **kwargs)

Initialize Delivery object from dictionary.

to_dict(camel_case=True)

Converts an object to a dictionary excluding object’s private properties. When converting the object to a dictionary, the object’s attributes become the dictionary’s keys and are in camel case by default Attribute values stored as objects are automatically converted to non-/ primitive data structures.

Parameters:

camel_case (bool, optional) – Set to True if attribute names should be converted from snake case to camel case. Defaults to True.

Returns:

A dictionary representation of object’s attributes and values.

By default, the dictionary keys are in camel case.

Return type:

dict

validate()

Validate whether all obligatory properties of the Delivery object are present and whether all the properties present are of correct types.

VALIDATION_DICT = {'filename': [<class 'str'>, False], 'password': [<class 'str'>, False], 'password_protect': [<class 'bool'>, False]}