# Path: moira_client/client.py
# class ResponseStructureError(Exception):
#     def __init__(self, msg, content):
#         """
# 
#         :param msg: str error message
#         :param content: dict response content
#         """
#         self.msg = msg
#         self.content = content


from ..client import ResponseStructureError
class HealthManager:
    def __init__(self, client):
        self._client = client

    def get_notifier_state(self):
        """
        Returns current Moira Notifier state
        :return: str

        :raises: ResponseStructureError
        """
        result = self._client.get(self._full_path("notifier"))
        if 'state' not in result:
            raise ResponseStructureError("state doesn't exist in response", result)

        return result['state']

    def disable_notifications(self):
        """
        Manage Moira Notifier to stop sending notifications
        Returns current Moira Notifier state
        :return: str

        :raises: ResponseStructureError
        """
        data = {
            'state': STATE_DISABLED
        }
        result = self._client.put(self._full_path("notifier"), json=data)
        if 'state' not in result:

# Path: moira_client/client.py
# class ResponseStructureError(Exception):
#     def __init__(self, msg, content):
#         """
# 
#         :param msg: str error message
#         :param content: dict response content
#         """
#         self.msg = msg
#         self.content = content


# Path: moira_client/models/health.py
from ..client import ResponseStructureError

class HealthManager:
    def __init__(self, client):
        self._client = client

    def get_notifier_state(self):
        """
        Returns current Moira Notifier state
        :return: str

        :raises: ResponseStructureError
        """
        result = self._client.get(self._full_path("notifier"))
        if 'state' not in result:
            raise ResponseStructureError("state doesn't exist in response", result)

        return result['state']

    def disable_notifications(self):
        """
        Manage Moira Notifier to stop sending notifications
        Returns current Moira Notifier state
        :return: str

        :raises: ResponseStructureError
        """
        data = {
            'state': STATE_DISABLED
        }
        result = self._client.put(self._full_path("notifier"), json=data)
        if 'state' not in result:

            raise ResponseStructureError("state doesn't exist in response", result)