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
8 changes: 4 additions & 4 deletions sdk/deviceregistry/azure-mgmt-deviceregistry/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "1f6e89637068d59b5ae935de9a88d5742d12f8e6",
"commit": "8aa48edd31e21dbb1bc880f640041de6548aa8ad",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/[email protected].7",
"@autorest/[email protected].16",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/deviceregistry/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/[email protected].7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/deviceregistry/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/[email protected].16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/deviceregistry/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -40,6 +41,10 @@
build_update_request,
)

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -79,7 +84,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AssetEnd
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AssetEndpointProfileListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -163,7 +168,7 @@ def list_by_resource_group(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AssetEndpointProfileListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -242,7 +247,7 @@ async def get(
:rtype: ~azure.mgmt.deviceregistry.models.AssetEndpointProfile
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -293,7 +298,7 @@ async def _create_or_replace_initial(
resource: Union[_models.AssetEndpointProfile, IO[bytes]],
**kwargs: Any
) -> _models.AssetEndpointProfile:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -491,10 +496,10 @@ async def _update_initial(
self,
resource_group_name: str,
asset_endpoint_profile_name: str,
properties: Union[_models.AssetEndpointProfileUpdate, IO[bytes]],
properties: Union[_models.AssetEndpointProfile, IO[bytes]],
**kwargs: Any
) -> Optional[_models.AssetEndpointProfile]:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand All @@ -515,7 +520,7 @@ async def _update_initial(
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "AssetEndpointProfileUpdate")
_json = self._serialize.body(properties, "AssetEndpointProfile")

_request = build_update_request(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -562,7 +567,7 @@ async def begin_update(
self,
resource_group_name: str,
asset_endpoint_profile_name: str,
properties: _models.AssetEndpointProfileUpdate,
properties: _models.AssetEndpointProfile,
*,
content_type: str = "application/json",
**kwargs: Any
Expand All @@ -575,7 +580,7 @@ async def begin_update(
:param asset_endpoint_profile_name: Asset Endpoint Profile name parameter. Required.
:type asset_endpoint_profile_name: str
:param properties: The resource properties to be updated. Required.
:type properties: ~azure.mgmt.deviceregistry.models.AssetEndpointProfileUpdate
:type properties: ~azure.mgmt.deviceregistry.models.AssetEndpointProfile
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand Down Expand Up @@ -620,7 +625,7 @@ async def begin_update(
self,
resource_group_name: str,
asset_endpoint_profile_name: str,
properties: Union[_models.AssetEndpointProfileUpdate, IO[bytes]],
properties: Union[_models.AssetEndpointProfile, IO[bytes]],
**kwargs: Any
) -> AsyncLROPoller[_models.AssetEndpointProfile]:
"""Update a AssetEndpointProfile.
Expand All @@ -630,9 +635,9 @@ async def begin_update(
:type resource_group_name: str
:param asset_endpoint_profile_name: Asset Endpoint Profile name parameter. Required.
:type asset_endpoint_profile_name: str
:param properties: The resource properties to be updated. Is either a
AssetEndpointProfileUpdate type or a IO[bytes] type. Required.
:type properties: ~azure.mgmt.deviceregistry.models.AssetEndpointProfileUpdate or IO[bytes]
:param properties: The resource properties to be updated. Is either a AssetEndpointProfile type
or a IO[bytes] type. Required.
:type properties: ~azure.mgmt.deviceregistry.models.AssetEndpointProfile or IO[bytes]
:return: An instance of AsyncLROPoller that returns either AssetEndpointProfile or the result
of cls(response)
:rtype:
Expand Down Expand Up @@ -690,7 +695,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import sys
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -40,6 +41,10 @@
build_update_request,
)

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -77,7 +82,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Asset"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AssetListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -157,7 +162,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AssetListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -234,7 +239,7 @@ async def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) ->
:rtype: ~azure.mgmt.deviceregistry.models.Asset
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -281,7 +286,7 @@ async def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) ->
async def _create_or_replace_initial(
self, resource_group_name: str, asset_name: str, resource: Union[_models.Asset, IO[bytes]], **kwargs: Any
) -> _models.Asset:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -466,13 +471,9 @@ def get_long_running_output(pipeline_response):
)

async def _update_initial(
self,
resource_group_name: str,
asset_name: str,
properties: Union[_models.AssetUpdate, IO[bytes]],
**kwargs: Any
self, resource_group_name: str, asset_name: str, properties: Union[_models.Asset, IO[bytes]], **kwargs: Any
) -> Optional[_models.Asset]:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand All @@ -493,7 +494,7 @@ async def _update_initial(
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "AssetUpdate")
_json = self._serialize.body(properties, "Asset")

_request = build_update_request(
resource_group_name=resource_group_name,
Expand Down Expand Up @@ -540,7 +541,7 @@ async def begin_update(
self,
resource_group_name: str,
asset_name: str,
properties: _models.AssetUpdate,
properties: _models.Asset,
*,
content_type: str = "application/json",
**kwargs: Any
Expand All @@ -553,7 +554,7 @@ async def begin_update(
:param asset_name: Asset name parameter. Required.
:type asset_name: str
:param properties: The resource properties to be updated. Required.
:type properties: ~azure.mgmt.deviceregistry.models.AssetUpdate
:type properties: ~azure.mgmt.deviceregistry.models.Asset
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand Down Expand Up @@ -591,11 +592,7 @@ async def begin_update(

@distributed_trace_async
async def begin_update(
self,
resource_group_name: str,
asset_name: str,
properties: Union[_models.AssetUpdate, IO[bytes]],
**kwargs: Any
self, resource_group_name: str, asset_name: str, properties: Union[_models.Asset, IO[bytes]], **kwargs: Any
) -> AsyncLROPoller[_models.Asset]:
"""Update a Asset.

Expand All @@ -604,9 +601,9 @@ async def begin_update(
:type resource_group_name: str
:param asset_name: Asset name parameter. Required.
:type asset_name: str
:param properties: The resource properties to be updated. Is either a AssetUpdate type or a
IO[bytes] type. Required.
:type properties: ~azure.mgmt.deviceregistry.models.AssetUpdate or IO[bytes]
:param properties: The resource properties to be updated. Is either a Asset type or a IO[bytes]
type. Required.
:type properties: ~azure.mgmt.deviceregistry.models.Asset or IO[bytes]
:return: An instance of AsyncLROPoller that returns either Asset or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.deviceregistry.models.Asset]
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -662,7 +659,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, asset_name: str, **kwargs: Any
) -> None:
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, Callable, Dict, Optional, TypeVar
import sys
from typing import Any, Callable, Dict, Optional, Type, TypeVar

from azure.core.exceptions import (
ClientAuthenticationError,
Expand All @@ -27,6 +28,10 @@
from ..._vendor import _convert_request
from ...operations._operation_status_operations import build_get_request

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -62,7 +67,7 @@ async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.
:rtype: ~azure.mgmt.deviceregistry.models.OperationStatusResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,6 +30,10 @@
from ..._vendor import _convert_request
from ...operations._operations import build_list_request

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -66,7 +71,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None)

error_map = {
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
from ._models_py3 import AssetEndpointProfile
from ._models_py3 import AssetEndpointProfileListResult
from ._models_py3 import AssetEndpointProfileProperties
from ._models_py3 import AssetEndpointProfileUpdate
from ._models_py3 import AssetEndpointProfileUpdateProperties
from ._models_py3 import AssetListResult
from ._models_py3 import AssetProperties
from ._models_py3 import AssetStatus
from ._models_py3 import AssetStatusError
from ._models_py3 import AssetUpdate
from ._models_py3 import AssetUpdateProperties
from ._models_py3 import DataPoint
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
Expand All @@ -33,13 +29,9 @@
from ._models_py3 import SystemData
from ._models_py3 import TrackedResource
from ._models_py3 import TransportAuthentication
from ._models_py3 import TransportAuthenticationUpdate
from ._models_py3 import UserAuthentication
from ._models_py3 import UserAuthenticationUpdate
from ._models_py3 import UsernamePasswordCredentials
from ._models_py3 import UsernamePasswordCredentialsUpdate
from ._models_py3 import X509Credentials
from ._models_py3 import X509CredentialsUpdate

from ._device_registry_mgmt_client_enums import ActionType
from ._device_registry_mgmt_client_enums import CreatedByType
Expand All @@ -57,14 +49,10 @@
"AssetEndpointProfile",
"AssetEndpointProfileListResult",
"AssetEndpointProfileProperties",
"AssetEndpointProfileUpdate",
"AssetEndpointProfileUpdateProperties",
"AssetListResult",
"AssetProperties",
"AssetStatus",
"AssetStatusError",
"AssetUpdate",
"AssetUpdateProperties",
"DataPoint",
"ErrorAdditionalInfo",
"ErrorDetail",
Expand All @@ -80,13 +68,9 @@
"SystemData",
"TrackedResource",
"TransportAuthentication",
"TransportAuthenticationUpdate",
"UserAuthentication",
"UserAuthenticationUpdate",
"UsernamePasswordCredentials",
"UsernamePasswordCredentialsUpdate",
"X509Credentials",
"X509CredentialsUpdate",
"ActionType",
"CreatedByType",
"DataPointsObservabilityMode",
Expand Down
Loading