Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated files from swagger file (Version 2021-01-11) #22

Merged
merged 1 commit into from
Jan 15, 2021
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 @@ -16,6 +16,7 @@
from .sas_uri_response_py3 import SasUriResponse
from .target_status_py3 import TargetStatus
from .provider_status_py3 import ProviderStatus
from .quota_py3 import Quota
from .rest_error_py3 import RestError, RestErrorException
except (SyntaxError, ImportError):
from .error_data import ErrorData
Expand All @@ -24,13 +25,17 @@
from .sas_uri_response import SasUriResponse
from .target_status import TargetStatus
from .provider_status import ProviderStatus
from .quota import Quota
from .rest_error import RestError, RestErrorException
from .job_details_paged import JobDetailsPaged
from .provider_status_paged import ProviderStatusPaged
from .quota_paged import QuotaPaged
from .quantum_client_enums import (
JobStatus,
ProviderAvailability,
TargetAvailability,
DimensionScope,
MeterPeriod,
)

__all__ = [
Expand All @@ -40,10 +45,14 @@
'SasUriResponse',
'TargetStatus',
'ProviderStatus',
'Quota',
'RestError', 'RestErrorException',
'JobDetailsPaged',
'ProviderStatusPaged',
'QuotaPaged',
'JobStatus',
'ProviderAvailability',
'TargetAvailability',
'DimensionScope',
'MeterPeriod',
]
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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 ~azure.quantum.models.JobStatus
:vartype status: str or ~quantum.models.JobStatus
:ivar creation_time: The creation time of the job.
:vartype creation_time: datetime
:ivar begin_execution_time: The time when the job began execution.
Expand All @@ -63,7 +63,7 @@ class JobDetails(Model):
:vartype cancellation_time: datetime
:ivar error_data: The error data for the job. This is expected only when
Status 'Failed'.
:vartype error_data: ~azure.quantum.models.ErrorData
:vartype error_data: ~quantum.models.ErrorData
"""

_validation = {
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 <azure.quantum.models.JobDetails>` object
A paging container for iterating over a list of :class:`JobDetails <quantum.models.JobDetails>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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 ~azure.quantum.models.JobStatus
:vartype status: str or ~quantum.models.JobStatus
:ivar creation_time: The creation time of the job.
:vartype creation_time: datetime
:ivar begin_execution_time: The time when the job began execution.
Expand All @@ -63,7 +63,7 @@ class JobDetails(Model):
:vartype cancellation_time: datetime
:ivar error_data: The error data for the job. This is expected only when
Status 'Failed'.
:vartype error_data: ~azure.quantum.models.ErrorData
:vartype error_data: ~quantum.models.ErrorData
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ class ProviderStatus(Model):
:vartype id: str
:ivar current_availability: Provider availability. Possible values
include: 'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or
~azure.quantum.models.ProviderAvailability
:vartype current_availability: str or ~quantum.models.ProviderAvailability
:ivar targets:
:vartype targets: list[~azure.quantum.models.TargetStatus]
:vartype targets: list[~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 <azure.quantum.models.ProviderStatus>` object
A paging container for iterating over a list of :class:`ProviderStatus <quantum.models.ProviderStatus>` object
"""

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

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,15 @@ class TargetAvailability(str, Enum):
available = "Available"
degraded = "Degraded"
unavailable = "Unavailable"


class DimensionScope(str, Enum):

workspace = "Workspace"
subscription = "Subscription"


class MeterPeriod(str, Enum):

none = "None"
monthly = "Monthly"
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 Quota(Model):
"""Quota information.

:param dimension: The name of the dimension associated with the quota.
:type dimension: str
:param scope: The scope at which the quota is applied. Possible values
include: 'Workspace', 'Subscription'
:type scope: str or ~quantum.models.DimensionScope
:param provider_id: The unique identifier for the provider.
:type provider_id: str
:param utilization: The amount of the usage that has been applied for the
current period.
:type utilization: float
:param holds: The amount of the usage that has been reserved but not
applied for the current period.
:type holds: float
:param limit: The maximum amount of usage allowed for the current period.
:type limit: float
:param period: The time period in which the quota's underlying meter is
accumulated. Based on calendar year. 'None' is used for concurrent quotas.
Possible values include: 'None', 'Monthly'
:type period: str or ~quantum.models.MeterPeriod
"""

_attribute_map = {
'dimension': {'key': 'dimension', 'type': 'str'},
'scope': {'key': 'scope', 'type': 'str'},
'provider_id': {'key': 'providerId', 'type': 'str'},
'utilization': {'key': 'utilization', 'type': 'float'},
'holds': {'key': 'holds', 'type': 'float'},
'limit': {'key': 'limit', 'type': 'float'},
'period': {'key': 'period', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Quota, self).__init__(**kwargs)
self.dimension = kwargs.get('dimension', None)
self.scope = kwargs.get('scope', None)
self.provider_id = kwargs.get('provider_id', None)
self.utilization = kwargs.get('utilization', None)
self.holds = kwargs.get('holds', None)
self.limit = kwargs.get('limit', None)
self.period = kwargs.get('period', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


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

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Quota]'}
}

def __init__(self, *args, **kwargs):

super(QuotaPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 Quota(Model):
"""Quota information.

:param dimension: The name of the dimension associated with the quota.
:type dimension: str
:param scope: The scope at which the quota is applied. Possible values
include: 'Workspace', 'Subscription'
:type scope: str or ~quantum.models.DimensionScope
:param provider_id: The unique identifier for the provider.
:type provider_id: str
:param utilization: The amount of the usage that has been applied for the
current period.
:type utilization: float
:param holds: The amount of the usage that has been reserved but not
applied for the current period.
:type holds: float
:param limit: The maximum amount of usage allowed for the current period.
:type limit: float
:param period: The time period in which the quota's underlying meter is
accumulated. Based on calendar year. 'None' is used for concurrent quotas.
Possible values include: 'None', 'Monthly'
:type period: str or ~quantum.models.MeterPeriod
"""

_attribute_map = {
'dimension': {'key': 'dimension', 'type': 'str'},
'scope': {'key': 'scope', 'type': 'str'},
'provider_id': {'key': 'providerId', 'type': 'str'},
'utilization': {'key': 'utilization', 'type': 'float'},
'holds': {'key': 'holds', 'type': 'float'},
'limit': {'key': 'limit', 'type': 'float'},
'period': {'key': 'period', 'type': 'str'},
}

def __init__(self, *, dimension: str=None, scope=None, provider_id: str=None, utilization: float=None, holds: float=None, limit: float=None, period=None, **kwargs) -> None:
super(Quota, self).__init__(**kwargs)
self.dimension = dimension
self.scope = scope
self.provider_id = provider_id
self.utilization = utilization
self.holds = holds
self.limit = limit
self.period = period
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RestError(Model):
"""Error information returned by the API.

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RestError(Model):
"""Error information returned by the API.

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class TargetStatus(Model):
:vartype id: str
:ivar current_availability: Target availability. Possible values include:
'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or
~azure.quantum.models.TargetAvailability
:vartype current_availability: str or ~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,8 +22,7 @@ class TargetStatus(Model):
:vartype id: str
:ivar current_availability: Target availability. Possible values include:
'Available', 'Degraded', 'Unavailable'
:vartype current_availability: str or
~azure.quantum.models.TargetAvailability
:vartype current_availability: str or ~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 @@ -12,9 +12,11 @@
from .jobs_operations import JobsOperations
from .providers_operations import ProvidersOperations
from .storage_operations import StorageOperations
from .quotas_operations import QuotasOperations

__all__ = [
'JobsOperations',
'ProvidersOperations',
'StorageOperations',
'QuotasOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def list(
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of JobDetails
:rtype:
~azure.quantum.models.JobDetailsPaged[~azure.quantum.models.JobDetails]
:rtype: ~quantum.models.JobDetailsPaged[~quantum.models.JobDetails]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def internal_paging(next_link=None, raw=False):
Expand Down Expand Up @@ -112,10 +111,10 @@ def get(
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: JobDetails or ClientRawResponse if raw=true
:rtype: ~azure.quantum.models.JobDetails or
:rtype: ~quantum.models.JobDetails or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`RestErrorException<azure.quantum.models.RestErrorException>`
:class:`RestErrorException<quantum.models.RestErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
Expand Down Expand Up @@ -166,17 +165,17 @@ def create(
:param job_id: Id of the job.
:type job_id: str
:param job: The complete metadata of the job to submit.
:type job: ~azure.quantum.models.JobDetails
:type job: ~quantum.models.JobDetails
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: JobDetails or ClientRawResponse if raw=true
:rtype: ~azure.quantum.models.JobDetails or
:rtype: ~quantum.models.JobDetails or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`RestErrorException<azure.quantum.models.RestErrorException>`
:class:`RestErrorException<quantum.models.RestErrorException>`
"""
# Construct URL
url = self.create.metadata['url']
Expand Down Expand Up @@ -240,7 +239,7 @@ def cancel(
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`RestErrorException<azure.quantum.models.RestErrorException>`
:class:`RestErrorException<quantum.models.RestErrorException>`
"""
# Construct URL
url = self.cancel.metadata['url']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def get_status(
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of ProviderStatus
:rtype:
~azure.quantum.models.ProviderStatusPaged[~azure.quantum.models.ProviderStatus]
~quantum.models.ProviderStatusPaged[~quantum.models.ProviderStatus]
:raises:
:class:`RestErrorException<azure.quantum.models.RestErrorException>`
:class:`RestErrorException<quantum.models.RestErrorException>`
"""
def internal_paging(next_link=None, raw=False):

Expand Down
Loading