Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@
# --------------------------------------------------------------------------

try:
from .rest_error_py3 import RestError, RestErrorException
from .error_data_py3 import ErrorData
from .job_details_py3 import JobDetails
from .blob_details_py3 import BlobDetails
from .sas_uri_response_py3 import SasUriResponse
from .target_status_py3 import TargetStatus
from .provider_status_py3 import ProviderStatus
from .rest_error_py3 import RestError, RestErrorException
except (SyntaxError, ImportError):
from .rest_error import RestError, RestErrorException
from .error_data import ErrorData
from .job_details import JobDetails
from .blob_details import BlobDetails
from .sas_uri_response import SasUriResponse
from .target_status import TargetStatus
from .provider_status import ProviderStatus
from .rest_error import RestError, RestErrorException
from .job_details_paged import JobDetailsPaged
from .provider_status_paged import ProviderStatusPaged
from .quantum_client_enums import (
Expand All @@ -32,12 +34,13 @@
)

__all__ = [
'RestError', 'RestErrorException',
'ErrorData',
'JobDetails',
'BlobDetails',
'SasUriResponse',
'TargetStatus',
'ProviderStatus',
'RestError', 'RestErrorException',
'JobDetailsPaged',
'ProviderStatusPaged',
'JobStatus',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ErrorData(Model):
"""An error response from Azure.

:param code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for displaying in a user interface.
:type message: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ErrorData, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 ErrorData(Model):
"""An error response from Azure.

:param code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for displaying in a user interface.
:type message: str
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
super(ErrorData, self).__init__(**kwargs)
self.code = code
self.message = message
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ class JobDetails(Model):
:type output_data_format: str
:ivar status: The job status. Possible values include: 'Waiting',
'Executing', 'Succeeded', 'Failed', 'Cancelled'
:vartype status: str or ~quantum.models.JobStatus
:vartype status: str or ~azure.quantum.models.JobStatus
:ivar creation_time: The creation time of the job.
:vartype creation_time: str
:vartype creation_time: datetime
:ivar begin_execution_time: The time when the job began execution.
:vartype begin_execution_time: str
:vartype begin_execution_time: datetime
:ivar end_execution_time: The time when the job finished execution.
:vartype end_execution_time: str
:vartype end_execution_time: datetime
:ivar cancellation_time: The time when a job was successfully cancelled.
:vartype cancellation_time: str
:vartype cancellation_time: datetime
:ivar error_data: The error data for the job. This is expected only when
Status 'Failed'.
:vartype error_data: ~quantum.models.RestError
:vartype error_data: ~azure.quantum.models.ErrorData
"""

_validation = {
Expand Down Expand Up @@ -92,11 +92,11 @@ class JobDetails(Model):
'output_data_uri': {'key': 'outputDataUri', 'type': 'str'},
'output_data_format': {'key': 'outputDataFormat', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'creation_time': {'key': 'creationTime', 'type': 'str'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'str'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'str'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'str'},
'error_data': {'key': 'errorData', 'type': 'RestError'},
'creation_time': {'key': 'creationTime', 'type': 'iso-8601'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'iso-8601'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'iso-8601'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'iso-8601'},
'error_data': {'key': 'errorData', 'type': 'ErrorData'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class JobDetailsPaged(Paged):
"""
A paging container for iterating over a list of :class:`JobDetails <quantum.models.JobDetails>` object
A paging container for iterating over a list of :class:`JobDetails <azure.quantum.models.JobDetails>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ class JobDetails(Model):
:type output_data_format: str
:ivar status: The job status. Possible values include: 'Waiting',
'Executing', 'Succeeded', 'Failed', 'Cancelled'
:vartype status: str or ~quantum.models.JobStatus
:vartype status: str or ~azure.quantum.models.JobStatus
:ivar creation_time: The creation time of the job.
:vartype creation_time: str
:vartype creation_time: datetime
:ivar begin_execution_time: The time when the job began execution.
:vartype begin_execution_time: str
:vartype begin_execution_time: datetime
:ivar end_execution_time: The time when the job finished execution.
:vartype end_execution_time: str
:vartype end_execution_time: datetime
:ivar cancellation_time: The time when a job was successfully cancelled.
:vartype cancellation_time: str
:vartype cancellation_time: datetime
:ivar error_data: The error data for the job. This is expected only when
Status 'Failed'.
:vartype error_data: ~quantum.models.RestError
:vartype error_data: ~azure.quantum.models.ErrorData
"""

_validation = {
Expand Down Expand Up @@ -92,11 +92,11 @@ class JobDetails(Model):
'output_data_uri': {'key': 'outputDataUri', 'type': 'str'},
'output_data_format': {'key': 'outputDataFormat', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'creation_time': {'key': 'creationTime', 'type': 'str'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'str'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'str'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'str'},
'error_data': {'key': 'errorData', 'type': 'RestError'},
'creation_time': {'key': 'creationTime', 'type': 'iso-8601'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'iso-8601'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'iso-8601'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'iso-8601'},
'error_data': {'key': 'errorData', 'type': 'ErrorData'},
}

def __init__(self, *, container_uri: str, input_data_format: str, provider_id: str, target: str, id: str=None, name: str=None, input_data_uri: str=None, input_params=None, metadata=None, output_data_uri: str=None, output_data_format: str=None, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class ProviderStatus(Model):
:vartype id: str
:ivar current_availability: Provider availability. Possible values
include: 'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or ~quantum.models.ProviderAvailability
:vartype current_availability: str or
~azure.quantum.models.ProviderAvailability
:ivar targets:
:vartype targets: list[~quantum.models.TargetStatus]
:vartype targets: list[~azure.quantum.models.TargetStatus]
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ProviderStatusPaged(Paged):
"""
A paging container for iterating over a list of :class:`ProviderStatus <quantum.models.ProviderStatus>` object
A paging container for iterating over a list of :class:`ProviderStatus <azure.quantum.models.ProviderStatus>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class ProviderStatus(Model):
:vartype id: str
:ivar current_availability: Provider availability. Possible values
include: 'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or ~quantum.models.ProviderAvailability
:vartype current_availability: str or
~azure.quantum.models.ProviderAvailability
:ivar targets:
:vartype targets: list[~quantum.models.TargetStatus]
:vartype targets: list[~azure.quantum.models.TargetStatus]
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@


class RestError(Model):
"""An error response from Azure.

:param code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for displaying in a user interface.
:type message: str
"""Error information returned by the API.

:param error:
:type error: ~azure.quantum.models.ErrorData
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorData'},
}

def __init__(self, **kwargs):
super(RestError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.error = kwargs.get('error', None)


class RestErrorException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@


class RestError(Model):
"""An error response from Azure.

:param code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for displaying in a user interface.
:type message: str
"""Error information returned by the API.

:param error:
:type error: ~azure.quantum.models.ErrorData
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorData'},
}

def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
def __init__(self, *, error=None, **kwargs) -> None:
super(RestError, self).__init__(**kwargs)
self.code = code
self.message = message
self.error = error


class RestErrorException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class TargetStatus(Model):
:vartype id: str
:ivar current_availability: Target availability. Possible values include:
'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or ~quantum.models.TargetAvailability
:vartype current_availability: str or
~azure.quantum.models.TargetAvailability
:ivar average_queue_time: Average queue time in seconds.
:vartype average_queue_time: long
:ivar status_page: A page with detailed status of the provider.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class TargetStatus(Model):
:vartype id: str
:ivar current_availability: Target availability. Possible values include:
'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or ~quantum.models.TargetAvailability
:vartype current_availability: str or
~azure.quantum.models.TargetAvailability
:ivar average_queue_time: Average queue time in seconds.
:vartype average_queue_time: long
:ivar status_page: A page with detailed status of the provider.
Expand Down
Loading