# 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 Evaluation(Model):
    """Represents the measure evaluation details for a particular measure. It
    includes various properties pertaining to an
    evaluation including the measure name, orchestrationId, start time, state,
    errors (if-any) etc. This latest evaluation
    is stored in the measure metadata, while historical copies are written to
    table storage.

    :param last_successful_run_id:
    :type last_successful_run_id: str
    :param state: Possible values include: 'none', 'running', 'failed',
     'completed'
    :type state: str or ~dynamics.customerinsights.api.models.enum
    :param end_time: Evaluation completion time.
    :type end_time: datetime
    :param error: Error Information (if any) that occured during the measure
     evaluation.
    :type error: str
    """

    _attribute_map = {
        'last_successful_run_id': {'key': 'lastSuccessfulRunId', 'type': 'str'},
        'state': {'key': 'state', 'type': 'str'},
        'end_time': {'key': 'endTime', 'type': 'iso-8601'},
        'error': {'key': 'error', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(Evaluation, self).__init__(**kwargs)
        self.last_successful_run_id = kwargs.get('last_successful_run_id', None)
        self.state = kwargs.get('state', None)
        self.end_time = kwargs.get('end_time', None)
        self.error = kwargs.get('error', None)
