diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/README.md b/sdk/deviceregistry/azure-mgmt-deviceregistry/README.md index 785eba4ed04c..87b5accf476a 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/README.md +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Deviceregistry Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/_meta.json b/sdk/deviceregistry/azure-mgmt-deviceregistry/_meta.json index 9dd89c8226c2..65562de00274 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/_meta.json +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/_meta.json @@ -1,6 +1,6 @@ { - "commit": "812060f2268dc35ed8866bcbaf94aa767cf87c8d", + "commit": "6e702986ee542ebd38d0ab2e2f2c00ab48a50b45", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/deviceregistry/DeviceRegistry.Management", - "@azure-tools/typespec-python": "0.38.4" + "@azure-tools/typespec-python": "0.42.3" } \ No newline at end of file diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_model_base.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_model_base.py index 3072ee252ed9..49d5c7259389 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_model_base.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_model_base.py @@ -2,8 +2,9 @@ # 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. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=protected-access, broad-except @@ -21,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError @@ -28,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -443,7 +440,7 @@ def clear(self) -> None: """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs. @@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_serialization.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_serialization.py index e2a20b1d534c..eb86ea23c965 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_serialization.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_serialization.py @@ -1,28 +1,10 @@ # pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -411,7 +393,7 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_version.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_version.py index 0ec13ea52bbf..be71c81bd282 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_version.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_operations.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_operations.py index 4fc1b5061e20..5ab629d26b1f 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_operations.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -57,13 +57,9 @@ ) from .._configuration import DeviceRegistryMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] class Operations: @@ -84,9 +80,6 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: """List the operations for the provider. @@ -146,7 +139,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -188,9 +181,6 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: """Returns the current status of an async operation. @@ -274,9 +264,6 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> _models.Asset: """Get a Asset. @@ -342,9 +329,6 @@ async def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> return deserialized # type: ignore - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _create_or_replace_initial( self, resource_group_name: str, asset_name: str, resource: Union[_models.Asset, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: @@ -499,9 +483,6 @@ async def begin_create_or_replace( """ @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_create_or_replace( self, resource_group_name: str, asset_name: str, resource: Union[_models.Asset, JSON, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.Asset]: @@ -572,9 +553,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _update_initial( self, resource_group_name: str, @@ -731,9 +709,6 @@ async def begin_update( """ @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_update( self, resource_group_name: str, @@ -808,9 +783,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _delete_initial(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -867,9 +839,6 @@ async def _delete_initial(self, resource_group_name: str, asset_name: str, **kwa return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_delete(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> AsyncLROPoller[None]: """Delete a Asset. @@ -927,9 +896,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Asset"]: """List Asset resources by resource group. @@ -994,7 +960,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Asset], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Asset], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1018,9 +984,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Asset"]: """List Asset resources by subscription ID. @@ -1081,7 +1044,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Asset], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Asset], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1123,9 +1086,6 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def get( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> _models.AssetEndpointProfile: @@ -1193,9 +1153,6 @@ async def get( return deserialized # type: ignore - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _create_or_replace_initial( self, resource_group_name: str, @@ -1357,9 +1314,6 @@ async def begin_create_or_replace( """ @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_create_or_replace( self, resource_group_name: str, @@ -1435,9 +1389,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _update_initial( self, resource_group_name: str, @@ -1597,9 +1548,6 @@ async def begin_update( """ @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_update( self, resource_group_name: str, @@ -1676,9 +1624,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def _delete_initial( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: @@ -1737,9 +1682,6 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) async def begin_delete( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -1799,9 +1741,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.AssetEndpointProfile"]: @@ -1869,7 +1808,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized["value"]) + list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1893,9 +1832,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AssetEndpointProfile"]: """List AssetEndpointProfile resources by subscription ID. @@ -1957,7 +1893,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized["value"]) + list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2001,9 +1937,7 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace_async @api_version_validation( method_added_on="2024-09-01-preview", - params_added_on={ - "2024-09-01-preview": ["base_url", "api_version", "subscription_id", "billing_container_name", "accept"] - }, + params_added_on={"2024-09-01-preview": ["api_version", "subscription_id", "billing_container_name", "accept"]}, ) async def get(self, billing_container_name: str, **kwargs: Any) -> _models.BillingContainer: """Get a BillingContainer. @@ -2069,7 +2003,7 @@ async def get(self, billing_container_name: str, **kwargs: Any) -> _models.Billi @distributed_trace @api_version_validation( method_added_on="2024-09-01-preview", - params_added_on={"2024-09-01-preview": ["base_url", "api_version", "subscription_id", "accept"]}, + params_added_on={"2024-09-01-preview": ["api_version", "subscription_id", "accept"]}, ) def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.BillingContainer"]: """List BillingContainer resources by subscription ID. @@ -2132,7 +2066,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.BillingContainer], deserialized["value"]) + list_of_elem = _deserialize(List[_models.BillingContainer], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_models.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_models.py index 1e48551e1d25..dcb778cc47a3 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_models.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_models.py @@ -21,8 +21,6 @@ class Resource(_model_base.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -52,9 +50,6 @@ class TrackedResource(Resource): """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -99,9 +94,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Asset(TrackedResource): """Asset definition. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -154,9 +146,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AssetEndpointProfile(TrackedResource): """Asset Endpoint Profile definition. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -209,9 +198,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AssetEndpointProfileProperties(_model_base.Model): """Defines the Asset Endpoint Profile properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar uuid: Globally unique, immutable, non-reusable id. :vartype uuid: str :ivar target_address: The local valid URI specifying the network address/DNS name of a @@ -298,8 +284,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AssetEndpointProfileStatus(_model_base.Model): """Defines the asset endpoint profile status properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar errors: Array object to transfer and persist errors that originate from the Edge. :vartype errors: list[~azure.mgmt.deviceregistry.models.AssetEndpointProfileStatusError] """ @@ -311,8 +295,6 @@ class AssetEndpointProfileStatus(_model_base.Model): class AssetEndpointProfileStatusError(_model_base.Model): """Defines the asset endpoint profile status error properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code for classification of errors (ex: 400, 404, 500, etc.). :vartype code: int :ivar message: Human readable helpful error message to provide additional context for error @@ -423,9 +405,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AssetProperties(_model_base.Model): """Defines the asset properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar uuid: Globally unique, immutable, non-reusable id. :vartype uuid: str :ivar enabled: Enabled/Disabled status of the asset. @@ -606,8 +585,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class AssetStatus(_model_base.Model): """Defines the asset status properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar errors: Array object to transfer and persist errors that originate from the Edge. :vartype errors: list[~azure.mgmt.deviceregistry.models.AssetStatusError] :ivar version: A read only incremental counter indicating the number of times the configuration @@ -637,9 +614,6 @@ class AssetStatus(_model_base.Model): class AssetStatusDataset(_model_base.Model): """Defines the asset status dataset properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the dataset. Must be unique within the status.datasets array. This name is used to correlate between the spec and status dataset information. Required. :vartype name: str @@ -659,8 +633,6 @@ class AssetStatusDataset(_model_base.Model): class AssetStatusError(_model_base.Model): """Defines the asset status error properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code for classification of errors (ex: 400, 404, 500, etc.). :vartype code: int :ivar message: Human readable helpful error message to provide additional context for error @@ -678,9 +650,6 @@ class AssetStatusError(_model_base.Model): class AssetStatusEvent(_model_base.Model): """Defines the asset status event properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the event. Must be unique within the status.events array. This name is used to correlate between the spec and status event information. Required. :vartype name: str @@ -872,7 +841,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Authentication(_model_base.Model): """Definition of the client authentication mechanism to the server. - :ivar method: Defines the method to authenticate the user of the client at the server. Required. Known values are: "Anonymous", "Certificate", and "UsernamePassword". :vartype method: str or ~azure.mgmt.deviceregistry.models.AuthenticationMethod @@ -924,8 +892,6 @@ class ProxyResource(Resource): """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -944,8 +910,6 @@ class BillingContainer(ProxyResource): """billingContainer Model as Azure resource whose sole purpose is to keep track of billables resources under a subscription. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str @@ -991,8 +955,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class BillingContainerProperties(_model_base.Model): """Defines the billingContainer properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.deviceregistry.models.ProvisioningState @@ -1008,7 +970,6 @@ class BillingContainerProperties(_model_base.Model): class DataPointBase(_model_base.Model): """Defines the data point properties. - :ivar name: The name of the data point. Required. :vartype name: str :ivar data_source: The address of the source of the data in the asset (e.g. URL) so that a @@ -1054,7 +1015,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class DataPoint(DataPointBase): """Defines the data point properties. - :ivar name: The name of the data point. Required. :vartype name: str :ivar data_source: The address of the source of the data in the asset (e.g. URL) so that a @@ -1100,7 +1060,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Dataset(_model_base.Model): """Defines the dataset properties. - :ivar name: Name of the dataset. Required. :vartype name: str :ivar dataset_configuration: Stringified JSON that contains connector-specific JSON string that @@ -1152,8 +1111,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ErrorAdditionalInfo(_model_base.Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -1169,8 +1126,6 @@ class ErrorAdditionalInfo(_model_base.Model): class ErrorDetail(_model_base.Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -1229,7 +1184,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class EventBase(_model_base.Model): """Defines the event properties. - :ivar name: The name of the event. Required. :vartype name: str :ivar event_notifier: The address of the notifier of the event in the asset (e.g. URL) so that @@ -1280,7 +1234,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Event(EventBase): """Defines the event properties. - :ivar name: The name of the event. Required. :vartype name: str :ivar event_notifier: The address of the notifier of the event in the asset (e.g. URL) so that @@ -1328,7 +1281,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ExtendedLocation(_model_base.Model): """The extended location. - :ivar type: The extended location type. Required. :vartype type: str :ivar name: The extended location name. Required. @@ -1362,9 +1314,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class MessageSchemaReference(_model_base.Model): """Defines the message schema reference properties. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar schema_registry_namespace: The message schema registry namespace. Required. :vartype schema_registry_namespace: str :ivar schema_name: The message schema name. Required. @@ -1384,8 +1333,6 @@ class MessageSchemaReference(_model_base.Model): class Operation(_model_base.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str @@ -1443,8 +1390,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class OperationDisplay(_model_base.Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -1476,9 +1421,6 @@ class OperationDisplay(_model_base.Model): class OperationStatusResult(_model_base.Model): """The current status of an async operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified ID for the async operation. :vartype id: str :ivar name: Name of the async operation. @@ -1622,7 +1564,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Topic(_model_base.Model): """Object that describes the topic information. - :ivar path: The topic path for messages published to an MQTT broker. Required. :vartype path: str :ivar retain: When set to 'Keep', messages published to an MQTT broker will have the retain @@ -1660,7 +1601,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class UsernamePasswordCredentials(_model_base.Model): """The credentials for authentication mode UsernamePassword. - :ivar username_secret_name: The name of the secret containing the username. Required. :vartype username_secret_name: str :ivar password_secret_name: The name of the secret containing the password. Required. @@ -1698,7 +1638,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class X509Credentials(_model_base.Model): """The x509 certificate for authentication mode Certificate. - :ivar certificate_secret_name: The name of the secret containing the certificate and private key (e.g. stored as .der/.pem or .der/.pfx). Required. :vartype certificate_secret_name: str diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_operations.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_operations.py index 2519b9c67207..90e16f1d27fb 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_operations.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,13 +38,9 @@ from .._serialization import Deserializer, Serializer from .._validation import api_version_validation -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -512,9 +508,6 @@ def __init__(self, *args, **kwargs): self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: """List the operations for the provider. @@ -574,7 +567,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -616,9 +609,6 @@ def __init__(self, *args, **kwargs): self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationStatusResult: """Returns the current status of an async operation. @@ -702,9 +692,6 @@ def __init__(self, *args, **kwargs): self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> _models.Asset: """Get a Asset. @@ -770,9 +757,6 @@ def get(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> _mode return deserialized # type: ignore - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _create_or_replace_initial( self, resource_group_name: str, asset_name: str, resource: Union[_models.Asset, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: @@ -927,9 +911,6 @@ def begin_create_or_replace( """ @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_create_or_replace( self, resource_group_name: str, asset_name: str, resource: Union[_models.Asset, JSON, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.Asset]: @@ -1000,9 +981,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _update_initial( self, resource_group_name: str, @@ -1159,9 +1137,6 @@ def begin_update( """ @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_update( self, resource_group_name: str, @@ -1236,9 +1211,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _delete_initial(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -1295,9 +1267,6 @@ def _delete_initial(self, resource_group_name: str, asset_name: str, **kwargs: A return deserialized # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_delete(self, resource_group_name: str, asset_name: str, **kwargs: Any) -> LROPoller[None]: """Delete a Asset. @@ -1355,9 +1324,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Asset"]: """List Asset resources by resource group. @@ -1422,7 +1388,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Asset], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Asset], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1446,9 +1412,6 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Asset"]: """List Asset resources by subscription ID. @@ -1509,7 +1472,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Asset], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Asset], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1551,9 +1514,6 @@ def __init__(self, *args, **kwargs): self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def get( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> _models.AssetEndpointProfile: @@ -1621,9 +1581,6 @@ def get( return deserialized # type: ignore - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _create_or_replace_initial( self, resource_group_name: str, @@ -1782,9 +1739,6 @@ def begin_create_or_replace( """ @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_create_or_replace( self, resource_group_name: str, @@ -1859,9 +1813,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _update_initial( self, resource_group_name: str, @@ -2018,9 +1969,6 @@ def begin_update( """ @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_update( self, resource_group_name: str, @@ -2096,9 +2044,6 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def _delete_initial( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> Iterator[bytes]: @@ -2157,9 +2102,6 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def begin_delete( self, resource_group_name: str, asset_endpoint_profile_name: str, **kwargs: Any ) -> LROPoller[None]: @@ -2219,9 +2161,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> Iterable["_models.AssetEndpointProfile"]: @@ -2288,7 +2227,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized["value"]) + list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2312,9 +2251,6 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - params_added_on={"2024-09-01-preview": ["base_url"]}, - ) def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AssetEndpointProfile"]: """List AssetEndpointProfile resources by subscription ID. @@ -2375,7 +2311,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized["value"]) + list_of_elem = _deserialize(List[_models.AssetEndpointProfile], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2419,9 +2355,7 @@ def __init__(self, *args, **kwargs): @distributed_trace @api_version_validation( method_added_on="2024-09-01-preview", - params_added_on={ - "2024-09-01-preview": ["base_url", "api_version", "subscription_id", "billing_container_name", "accept"] - }, + params_added_on={"2024-09-01-preview": ["api_version", "subscription_id", "billing_container_name", "accept"]}, ) def get(self, billing_container_name: str, **kwargs: Any) -> _models.BillingContainer: """Get a BillingContainer. @@ -2487,7 +2421,7 @@ def get(self, billing_container_name: str, **kwargs: Any) -> _models.BillingCont @distributed_trace @api_version_validation( method_added_on="2024-09-01-preview", - params_added_on={"2024-09-01-preview": ["base_url", "api_version", "subscription_id", "accept"]}, + params_added_on={"2024-09-01-preview": ["api_version", "subscription_id", "accept"]}, ) def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.BillingContainer"]: """List BillingContainer resources by subscription ID. @@ -2549,7 +2483,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.BillingContainer], deserialized["value"]) + list_of_elem = _deserialize(List[_models.BillingContainer], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/azure/mgmt/deviceregistry/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/sdk_packaging.toml b/sdk/deviceregistry/azure-mgmt-deviceregistry/sdk_packaging.toml index 4a9347e91c9c..3f02d2a0962e 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/sdk_packaging.toml +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/sdk_packaging.toml @@ -3,7 +3,7 @@ package_name = "azure-mgmt-deviceregistry" package_nspkg = "azure-mgmt-nspkg" package_pprint_name = "Deviceregistry Management" package_doc_id = "" -is_stable = false +is_stable = true is_arm = true need_msrestazure = false need_azuremgmtcore = true diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/setup.py b/sdk/deviceregistry/azure-mgmt-deviceregistry/setup.py index 2ea6f92b7ed3..5bb48d9e5e92 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/setup.py +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/setup.py @@ -53,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -79,5 +78,5 @@ "azure-common>=1.1", "azure-mgmt-core>=1.3.2", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/deviceregistry/azure-mgmt-deviceregistry/tsp-location.yaml b/sdk/deviceregistry/azure-mgmt-deviceregistry/tsp-location.yaml index 9f4e014c4d8d..f9fa2951306b 100644 --- a/sdk/deviceregistry/azure-mgmt-deviceregistry/tsp-location.yaml +++ b/sdk/deviceregistry/azure-mgmt-deviceregistry/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/deviceregistry/DeviceRegistry.Management -commit: 812060f2268dc35ed8866bcbaf94aa767cf87c8d +commit: 6e702986ee542ebd38d0ab2e2f2c00ab48a50b45 repo: Azure/azure-rest-api-specs additionalDirectories: