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

[AutoPR azure-mgmt-containerregistry] Rename ErrorSchema to ErrorResponse. Rename Error to ErrorResponseBod… #680

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 @@ -31,8 +31,8 @@
from ._models_py3 import EncodedTaskRunRequest
from ._models_py3 import EncodedTaskStep
from ._models_py3 import EncodedTaskStepUpdateParameters
from ._models_py3 import Error
from ._models_py3 import ErrorSchema, ErrorSchemaException
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseBody
from ._models_py3 import Event
from ._models_py3 import EventContent
from ._models_py3 import EventInfo
Expand Down Expand Up @@ -141,8 +141,8 @@
from ._models import EncodedTaskRunRequest
from ._models import EncodedTaskStep
from ._models import EncodedTaskStepUpdateParameters
from ._models import Error
from ._models import ErrorSchema, ErrorSchemaException
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseBody
from ._models import Event
from ._models import EventContent
from ._models import EventInfo
Expand Down Expand Up @@ -296,8 +296,8 @@
'EncodedTaskRunRequest',
'EncodedTaskStep',
'EncodedTaskStepUpdateParameters',
'Error',
'ErrorSchema', 'ErrorSchemaException',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseBody',
'Event',
'EventContent',
'EventInfo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,36 @@ def __init__(self, **kwargs):
self.type = 'EncodedTask'


class Error(Model):
class ErrorResponse(Model):
"""An error response from the Azure Container Registry service.

:param error: Azure container registry build API error body.
:type error:
~azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseBody
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
}

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


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseBody(Model):
"""An error response from the Azure Container Registry service.

All required parameters must be populated in order to send to Azure.
Expand All @@ -1102,40 +1131,11 @@ class Error(Model):
}

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


class ErrorSchema(Model):
"""An error response from the Azure Container Registry service.

:param error: Azure container registry build API error body.
:type error:
~azure.mgmt.containerregistry.v2019_06_01_preview.models.Error
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'Error'},
}

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


class ErrorSchemaException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorSchema'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorSchemaException, self).__init__(deserialize, response, 'ErrorSchema', *args)


class EventInfo(Model):
"""The basic information of an event.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,36 @@ def __init__(self, *, context_path: str=None, context_access_token: str=None, en
self.type = 'EncodedTask'


class Error(Model):
class ErrorResponse(Model):
"""An error response from the Azure Container Registry service.

:param error: Azure container registry build API error body.
:type error:
~azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseBody
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
}

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


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseBody(Model):
"""An error response from the Azure Container Registry service.

All required parameters must be populated in order to send to Azure.
Expand All @@ -1102,40 +1131,11 @@ class Error(Model):
}

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


class ErrorSchema(Model):
"""An error response from the Azure Container Registry service.

:param error: Azure container registry build API error body.
:type error:
~azure.mgmt.containerregistry.v2019_06_01_preview.models.Error
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'Error'},
}

def __init__(self, *, error=None, **kwargs) -> None:
super(ErrorSchema, self).__init__(**kwargs)
self.error = error


class ErrorSchemaException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorSchema'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorSchemaException, self).__init__(deserialize, response, 'ErrorSchema', *args)


class EventInfo(Model):
"""The basic information of an event.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get(
~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPool or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
# Construct URL
url = self.get.metadata['url']
Expand Down Expand Up @@ -92,7 +92,7 @@ def get(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

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

if response.status_code not in [200, 201]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down Expand Up @@ -184,7 +184,7 @@ def create(
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPool]]
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
raw_result = self._create_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -245,7 +245,7 @@ def _delete_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202, 204]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

if raw:
client_raw_response = ClientRawResponse(None, response)
Expand All @@ -272,7 +272,7 @@ def delete(
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -335,7 +335,7 @@ def _update_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 201]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down Expand Up @@ -377,7 +377,7 @@ def update(
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPool]]
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
raw_result = self._update_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -426,7 +426,7 @@ def list(
:rtype:
~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPoolPaged[~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPool]
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
def prepare_request(next_link=None):
if not next_link:
Expand Down Expand Up @@ -467,7 +467,7 @@ def internal_paging(next_link=None):
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

return response

Expand Down Expand Up @@ -501,7 +501,7 @@ def get_queue_status(
~azure.mgmt.containerregistry.v2019_06_01_preview.models.AgentPoolQueueStatus
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
# Construct URL
url = self.get_queue_status.metadata['url']
Expand Down Expand Up @@ -532,7 +532,7 @@ def get_queue_status(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None
if response.status_code == 200:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def _schedule_run_initial(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

deserialized = None

Expand Down Expand Up @@ -983,7 +983,7 @@ def schedule_run(
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerregistry.v2019_06_01_preview.models.Run]]
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
raw_result = self._schedule_run_initial(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -1031,7 +1031,7 @@ def get_build_source_upload_url(
~azure.mgmt.containerregistry.v2019_06_01_preview.models.SourceUploadDefinition
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorSchemaException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorSchemaException>`
:class:`ErrorResponseException<azure.mgmt.containerregistry.v2019_06_01_preview.models.ErrorResponseException>`
"""
api_version = "2019-06-01-preview"

Expand Down Expand Up @@ -1063,7 +1063,7 @@ def get_build_source_upload_url(
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorSchemaException(self._deserialize, response)
raise models.ErrorResponseException(self._deserialize, response)

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