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

[ReleasePR azure-mgmt-powerbidedicated] Update all schemas.md files #15923

Closed
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 ._models_py3 import DedicatedCapacityAdministrators
from ._models_py3 import DedicatedCapacityUpdateParameters
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import Resource
Expand All @@ -30,6 +31,7 @@
from ._models import DedicatedCapacityAdministrators
from ._models import DedicatedCapacityUpdateParameters
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import Operation
from ._models import OperationDisplay
from ._models import Resource
Expand All @@ -52,6 +54,7 @@
'DedicatedCapacityAdministrators',
'DedicatedCapacityUpdateParameters',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'Operation',
'OperationDisplay',
'Resource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,21 +232,17 @@ def __init__(self, **kwargs):
class ErrorResponse(Model):
"""Describes the format of Error response.

:param code: Error code
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
:param error: The error object
:type error: ~azure.mgmt.powerbidedicated.models.ErrorResponseError
"""

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

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


class ErrorResponseException(HttpOperationError):
Expand All @@ -261,6 +257,26 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseError(Model):
"""The error object.

:param code: Error code
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
"""

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

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


class Operation(Model):
"""Capacities REST API operation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,21 +232,17 @@ def __init__(self, *, sku=None, tags=None, administration=None, **kwargs) -> Non
class ErrorResponse(Model):
"""Describes the format of Error response.

:param code: Error code
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
:param error: The error object
:type error: ~azure.mgmt.powerbidedicated.models.ErrorResponseError
"""

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

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


class ErrorResponseException(HttpOperationError):
Expand All @@ -261,6 +257,26 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseError(Model):
"""The error object.

:param code: Error code
:type code: str
:param message: Error message indicating why the operation failed.
: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(ErrorResponseError, self).__init__(**kwargs)
self.code = code
self.message = message


class Operation(Model):
"""Capacities REST API operation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrest.polling import LROPoller, NoPolling
from msrestazure.polling.arm_polling import ARMPolling

Expand Down Expand Up @@ -60,7 +59,8 @@ def get_details(
:return: DedicatedCapacity or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.powerbidedicated.models.DedicatedCapacity or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
# Construct URL
url = self.get_details.metadata['url']
Expand Down Expand Up @@ -90,9 +90,7 @@ def get_details(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand Down Expand Up @@ -140,9 +138,7 @@ def _create_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 201]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down Expand Up @@ -184,7 +180,8 @@ def create(
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
raw_result = self._create_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -243,9 +240,7 @@ def _delete_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202, 204]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

if raw:
client_raw_response = ClientRawResponse(None, response)
Expand All @@ -271,7 +266,8 @@ def delete(
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -330,9 +326,7 @@ def _update_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down Expand Up @@ -373,7 +367,8 @@ def update(
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
raw_result = self._update_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -432,9 +427,7 @@ def _suspend_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

if raw:
client_raw_response = ClientRawResponse(None, response)
Expand All @@ -460,7 +453,8 @@ def suspend(
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
raw_result = self._suspend_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -514,9 +508,7 @@ def _resume_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

if raw:
client_raw_response = ClientRawResponse(None, response)
Expand All @@ -542,7 +534,8 @@ def resume(
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
raw_result = self._resume_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -582,7 +575,8 @@ def list_by_resource_group(
:return: An iterator like instance of DedicatedCapacity
:rtype:
~azure.mgmt.powerbidedicated.models.DedicatedCapacityPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -622,9 +616,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

return response

Expand All @@ -649,7 +641,8 @@ def list(
:return: An iterator like instance of DedicatedCapacity
:rtype:
~azure.mgmt.powerbidedicated.models.DedicatedCapacityPaged[~azure.mgmt.powerbidedicated.models.DedicatedCapacity]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -688,9 +681,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

return response

Expand All @@ -717,7 +708,8 @@ def list_skus(
:rtype:
~azure.mgmt.powerbidedicated.models.SkuEnumerationForNewResourceResult
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
# Construct URL
url = self.list_skus.metadata['url']
Expand Down Expand Up @@ -745,9 +737,7 @@ def list_skus(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand Down Expand Up @@ -781,7 +771,8 @@ def list_skus_for_capacity(
:rtype:
~azure.mgmt.powerbidedicated.models.SkuEnumerationForExistingResourceResult
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
# Construct URL
url = self.list_skus_for_capacity.metadata['url']
Expand Down Expand Up @@ -811,9 +802,7 @@ def list_skus_for_capacity(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand Down Expand Up @@ -846,7 +835,8 @@ def check_name_availability(
:rtype:
~azure.mgmt.powerbidedicated.models.CheckCapacityNameAvailabilityResult
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
:raises:
:class:`ErrorResponseException<azure.mgmt.powerbidedicated.models.ErrorResponseException>`
"""
capacity_parameters = models.CheckCapacityNameAvailabilityParameters(name=name, type=type)

Expand Down Expand Up @@ -881,9 +871,7 @@ def check_name_availability(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand Down