# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# 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 ImportJob(Model):
    """A job which contains a reference to the operations to perform, results, and
    execution metadata.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    All required parameters must be populated in order to send to Azure.

    :ivar id: The identifier of the import job.
    :vartype id: str
    :param input_blob_uri: Required. The path to the input Azure storage blob
     that contains file(s) describing the operations to perform in the job.
    :type input_blob_uri: str
    :param output_blob_uri: Required. The path to the output Azure storage
     blob that will contain the errors and progress logs of import job.
    :type output_blob_uri: str
    :ivar status: Status of the job. Possible values include: 'notstarted',
     'running', 'failed', 'succeeded', 'cancelling', 'cancelled'
    :vartype status: str or ~dataplane.models.Status
    :ivar created_date_time: Start time of the job. The timestamp is in
     RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
    :vartype created_date_time: datetime
    :ivar last_action_date_time: Last time service performed any action from
     the job. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.
    :vartype last_action_date_time: datetime
    :ivar finished_date_time: End time of the job. The timestamp is in RFC3339
     format: `yyyy-MM-ddTHH:mm:ssZ`.
    :vartype finished_date_time: datetime
    :ivar purge_date_time: Time at which job will be purged by the service
     from the system. The timestamp is in RFC3339 format:
     `yyyy-MM-ddTHH:mm:ssZ`.
    :vartype purge_date_time: datetime
    :param error: Details of the error(s) that occurred executing the import
     job.
    :type error: ~dataplane.models.Error
    """

    _validation = {
        'id': {'readonly': True},
        'input_blob_uri': {'required': True},
        'output_blob_uri': {'required': True},
        'status': {'readonly': True},
        'created_date_time': {'readonly': True},
        'last_action_date_time': {'readonly': True},
        'finished_date_time': {'readonly': True},
        'purge_date_time': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'input_blob_uri': {'key': 'inputBlobUri', 'type': 'str'},
        'output_blob_uri': {'key': 'outputBlobUri', 'type': 'str'},
        'status': {'key': 'status', 'type': 'Status'},
        'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'},
        'last_action_date_time': {'key': 'lastActionDateTime', 'type': 'iso-8601'},
        'finished_date_time': {'key': 'finishedDateTime', 'type': 'iso-8601'},
        'purge_date_time': {'key': 'purgeDateTime', 'type': 'iso-8601'},
        'error': {'key': 'error', 'type': 'Error'},
    }

    def __init__(self, *, input_blob_uri: str, output_blob_uri: str, error=None, **kwargs) -> None:
        super(ImportJob, self).__init__(**kwargs)
        self.id = None
        self.input_blob_uri = input_blob_uri
        self.output_blob_uri = output_blob_uri
        self.status = None
        self.created_date_time = None
        self.last_action_date_time = None
        self.finished_date_time = None
        self.purge_date_time = None
        self.error = error
