

@staticmethod
def from_model(notify_model):
    notify = {
        
    }
    if getattr(notify_model, 'on_complete', None):
        notify['on-complete'] = NotificationsHelper._from_model_sub_schema(notify_model.on_complete)
    if getattr(notify_model, 'on_success', None):
        notify['on-success'] = NotificationsHelper._from_model_sub_schema(notify_model.on_success)
    if getattr(notify_model, 'on_failure', None):
        notify['on-failure'] = NotificationsHelper._from_model_sub_schema(notify_model.on_failure)
    return notify

dataset/ETHPy150Open StackStorm/st2/st2common/st2common/models/api/notification.py NotificationsHelper.from_model/original