# Path: aodh/i18n.py
# DOMAIN = 'aodh'
# def translate(value, user_locale):
# def get_available_languages():
# 
# Path: aodh/storage/base.py
# def update_nested(original_dict, updates):
#     def __init__(self, **kwds):
#     def as_dict(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def get_field_names(cls):
#     def __init__(self, conf, url):
#     def upgrade():
#     def get_alarms(*args, **kwargs):
#     def create_alarm(alarm):
#     def update_alarm(alarm):
#     def delete_alarm(alarm_id):
#     def get_alarm_changes(alarm_id, on_behalf_of,
#                           user=None, project=None, alarm_type=None,
#                           severity=None, start_timestamp=None,
#                           start_timestamp_op=None, end_timestamp=None,
#                           end_timestamp_op=None, pagination=None):
#     def record_alarm_change(alarm_change):
#     def clear():
#     def query_alarms(filter_expr=None, orderby=None, limit=None):
#     def query_alarm_history(filter_expr=None, orderby=None, limit=None):
#     def get_capabilities(cls):
#     def get_storage_capabilities(cls):
#     def clear_expired_alarm_history_data(ttl, max_count=None):
#     def get_quotas(project_id):
#     def set_quotas(project_id, quotas):
#     def delete_quotas(project_id):
# class Model(object):
# class Connection(object):
#     CAPABILITIES = {
#         'alarms': {'query': {'simple': False,
#                              'complex': False},
#                    'history': {'query': {'simple': False,
#                                          'complex': False}}},
#     }
#     STORAGE_CAPABILITIES = {
#         'storage': {'production_ready': False},
#     }


import datetime
from aodh.i18n import _
from aodh.storage import base
    :param name: The Alarm name
    :param description: User friendly description of the alarm
    :param enabled: Is the alarm enabled
    :param state: Alarm state (ok/alarm/insufficient data)
    :param state_reason: Alarm state reason
    :param rule: A rule that defines when the alarm fires
    :param user_id: the owner/creator of the alarm
    :param project_id: the project_id of the creator
    :param evaluation_periods: the number of periods
    :param period: the time period in seconds
    :param time_constraints: the list of the alarm's time constraints, if any
    :param timestamp: the timestamp when the alarm was last updated
    :param state_timestamp: the timestamp of the last state change
    :param ok_actions: the list of webhooks to call when entering the ok state
    :param alarm_actions: the list of webhooks to call when entering the
                          alarm state
    :param insufficient_data_actions: the list of webhooks to call when
                                      entering the insufficient data state
    :param repeat_actions: Is the actions should be triggered on each
                           alarm evaluation.
    :param severity: Alarm level (low/moderate/critical)
    :param evaluate_timestamp: The timestamp when the alarm is finished
                               evaluating.
    """
    def __init__(self, alarm_id, type, enabled, name, description,
                 timestamp, user_id, project_id, state, state_timestamp,
                 state_reason, ok_actions, alarm_actions,
                 insufficient_data_actions, repeat_actions, rule,
                 time_constraints, severity=None, evaluate_timestamp=None):
        if not isinstance(timestamp, datetime.datetime):

# Path: aodh/i18n.py
# DOMAIN = 'aodh'
# def translate(value, user_locale):
# def get_available_languages():
# 
# Path: aodh/storage/base.py
# def update_nested(original_dict, updates):
#     def __init__(self, **kwds):
#     def as_dict(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def get_field_names(cls):
#     def __init__(self, conf, url):
#     def upgrade():
#     def get_alarms(*args, **kwargs):
#     def create_alarm(alarm):
#     def update_alarm(alarm):
#     def delete_alarm(alarm_id):
#     def get_alarm_changes(alarm_id, on_behalf_of,
#                           user=None, project=None, alarm_type=None,
#                           severity=None, start_timestamp=None,
#                           start_timestamp_op=None, end_timestamp=None,
#                           end_timestamp_op=None, pagination=None):
#     def record_alarm_change(alarm_change):
#     def clear():
#     def query_alarms(filter_expr=None, orderby=None, limit=None):
#     def query_alarm_history(filter_expr=None, orderby=None, limit=None):
#     def get_capabilities(cls):
#     def get_storage_capabilities(cls):
#     def clear_expired_alarm_history_data(ttl, max_count=None):
#     def get_quotas(project_id):
#     def set_quotas(project_id, quotas):
#     def delete_quotas(project_id):
# class Model(object):
# class Connection(object):
#     CAPABILITIES = {
#         'alarms': {'query': {'simple': False,
#                              'complex': False},
#                    'history': {'query': {'simple': False,
#                                          'complex': False}}},
#     }
#     STORAGE_CAPABILITIES = {
#         'storage': {'production_ready': False},
#     }


# Path: aodh/storage/models.py
import datetime
from aodh.i18n import _
from aodh.storage import base

    :param name: The Alarm name
    :param description: User friendly description of the alarm
    :param enabled: Is the alarm enabled
    :param state: Alarm state (ok/alarm/insufficient data)
    :param state_reason: Alarm state reason
    :param rule: A rule that defines when the alarm fires
    :param user_id: the owner/creator of the alarm
    :param project_id: the project_id of the creator
    :param evaluation_periods: the number of periods
    :param period: the time period in seconds
    :param time_constraints: the list of the alarm's time constraints, if any
    :param timestamp: the timestamp when the alarm was last updated
    :param state_timestamp: the timestamp of the last state change
    :param ok_actions: the list of webhooks to call when entering the ok state
    :param alarm_actions: the list of webhooks to call when entering the
                          alarm state
    :param insufficient_data_actions: the list of webhooks to call when
                                      entering the insufficient data state
    :param repeat_actions: Is the actions should be triggered on each
                           alarm evaluation.
    :param severity: Alarm level (low/moderate/critical)
    :param evaluate_timestamp: The timestamp when the alarm is finished
                               evaluating.
    """
    def __init__(self, alarm_id, type, enabled, name, description,
                 timestamp, user_id, project_id, state, state_timestamp,
                 state_reason, ok_actions, alarm_actions,
                 insufficient_data_actions, repeat_actions, rule,
                 time_constraints, severity=None, evaluate_timestamp=None):
        if not isinstance(timestamp, datetime.datetime):

            raise TypeError(_("timestamp should be datetime object"))