Skip to content
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
6 changes: 3 additions & 3 deletions sdk/databox/azure-mgmt-databox/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "c4eb7d4facbb9312f435df8c8ffe5061bfb02890",
"commit": "296bf854973d97b1e509f36c894cee5fae7f2d62",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.0",
"@autorest/python@6.4.6",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/databox/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/databox/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.6 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/databox/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if xml_desc.get("attr", False):
if xml_ns:
ET.register_namespace(xml_prefix, xml_ns)
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
serialized.set(xml_name, new_attr) # type: ignore
continue
if xml_desc.get("text", False):
Expand Down Expand Up @@ -1273,7 +1273,7 @@ def _extract_name_from_internal_type(internal_type):
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
xml_ns = internal_type_xml_map.get("ns", None)
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
return xml_name


Expand All @@ -1297,7 +1297,7 @@ def xml_key_extractor(attr, attr_desc, data):
# Integrate namespace if necessary
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)

# If it's an attribute, that's simple
if xml_desc.get("attr", False):
Expand Down
7 changes: 3 additions & 4 deletions sdk/databox/azure-mgmt-databox/azure/mgmt/databox/_version.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# 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.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------

VERSION = "2.0.0b1"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -42,7 +36,7 @@ class DataBoxManagementClientConfiguration(Configuration): # pylint: disable=to

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DataBoxManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01")
api_version: str = kwargs.pop("api_version", "2018-01-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
self._config = DataBoxManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from .._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
Expand All @@ -42,7 +36,7 @@ class DataBoxManagementClientConfiguration(Configuration): # pylint: disable=to

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DataBoxManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01")
api_version: str = kwargs.pop("api_version", "2018-01-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
self._config = DataBoxManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse

Expand Down Expand Up @@ -43,10 +42,6 @@
build_update_request,
)

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -86,7 +81,7 @@ def list(self, skip_token: Optional[str] = None, **kwargs: Any) -> AsyncIterable
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[_models.JobResourceList] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -139,8 +134,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -174,7 +170,7 @@ def list_by_resource_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[_models.JobResourceList] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -228,8 +224,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -276,7 +273,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)

request = build_get_request(
Expand All @@ -292,8 +289,9 @@ async def get(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -327,7 +325,7 @@ async def _create_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.JobResource]] = kwargs.pop("cls", None)

Expand All @@ -354,8 +352,9 @@ async def _create_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -488,7 +487,7 @@ async def begin_create(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -547,7 +546,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[None] = kwargs.pop("cls", None)

request = build_delete_request(
Expand All @@ -562,8 +561,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -604,7 +604,7 @@ async def begin_delete(self, resource_group_name: str, job_name: str, **kwargs:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
Expand Down Expand Up @@ -663,7 +663,7 @@ async def _update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.JobResource]] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -691,8 +691,9 @@ async def _update_initial(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -840,7 +841,7 @@ async def begin_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -983,7 +984,7 @@ async def book_shipment_pick_up(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ShipmentPickUpResponse] = kwargs.pop("cls", None)

Expand All @@ -1010,8 +1011,9 @@ async def book_shipment_pick_up(
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -1127,7 +1129,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)

Expand All @@ -1154,8 +1156,9 @@ async def cancel( # pylint: disable=inconsistent-return-statements
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down Expand Up @@ -1193,7 +1196,7 @@ def list_credentials(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
cls: ClsType[_models.UnencryptedCredentialsList] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -1247,8 +1250,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Loading