# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class WebhookResponse(Model):
    """WebhookResponse.

    :param webhook_id: The identifier of the webhook
    :type webhook_id: int
    :param webhook_name: The name of the webhook
    :type webhook_name: str
    :param webhook_description: The description of the webhook
    :type webhook_description: str
    :param created_by:
    :type created_by: ~energycap.sdk.models.UserChild
    :param created_date: The date and time the webhook was created
    :type created_date: datetime
    :param mailing_list: List of email addresses. Each recipient in this list
     will receive an email when a webhook fails or gets disabled
    :type mailing_list: list[str]
    :param success_rate: The percentage of success for the webhook
    :type success_rate: float
    :param webhook_status: The activation status of the webhook
    :type webhook_status: str
    :param locked: Locked webhooks cannot be edited.
     Locked webhooks will also NOT be automatically disabled on 10 consecutive
     failures
    :type locked: bool
    :param url: The URL to be invoked by the webhook
    :type url: str
    :param secret: The encryption secret
    :type secret: str
    :param event_type:
    :type event_type: ~energycap.sdk.models.WebhookEventTypeChild
    """

    _attribute_map = {
        'webhook_id': {'key': 'webhookId', 'type': 'int'},
        'webhook_name': {'key': 'webhookName', 'type': 'str'},
        'webhook_description': {'key': 'webhookDescription', 'type': 'str'},
        'created_by': {'key': 'createdBy', 'type': 'UserChild'},
        'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
        'mailing_list': {'key': 'mailingList', 'type': '[str]'},
        'success_rate': {'key': 'successRate', 'type': 'float'},
        'webhook_status': {'key': 'webhookStatus', 'type': 'str'},
        'locked': {'key': 'locked', 'type': 'bool'},
        'url': {'key': 'url', 'type': 'str'},
        'secret': {'key': 'secret', 'type': 'str'},
        'event_type': {'key': 'eventType', 'type': 'WebhookEventTypeChild'},
    }

    def __init__(self, webhook_id=None, webhook_name=None, webhook_description=None, created_by=None, created_date=None, mailing_list=None, success_rate=None, webhook_status=None, locked=None, url=None, secret=None, event_type=None):
        super(WebhookResponse, self).__init__()
        self.webhook_id = webhook_id
        self.webhook_name = webhook_name
        self.webhook_description = webhook_description
        self.created_by = created_by
        self.created_date = created_date
        self.mailing_list = mailing_list
        self.success_rate = success_rate
        self.webhook_status = webhook_status
        self.locked = locked
        self.url = url
        self.secret = secret
        self.event_type = event_type
