Skip to content

Commit d3f6a76

Browse files
author
SDKAuto
committed
CodeGen from PR 31602 in Azure/azure-rest-api-specs
Merge 6a2caf309c489a63a4382633d0754aa37b7a605c into 14f4f6b25fe74f90f4ee74fdac5cd7e05d419245
1 parent 67aa17f commit d3f6a76

File tree

82 files changed

+1969
-1839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1969
-1839
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "7d0134ad6d42786b1ff2d49a3cfb331b336c3099",
2+
"commit": "6f972618cea0df6aa7f681a325efe7ca2a9db9d0",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/iotoperations/IoTOperations.Management",
5-
"@azure-tools/typespec-python": "0.36.0"
5+
"@azure-tools/typespec-python": "0.36.4"
66
}

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import IoTOperationsMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import IoTOperationsMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
BrokerAuthorizationOperations,
2323
BrokerListenerOperations,
2424
BrokerOperations,
25+
BrokersOperations,
2526
DataflowEndpointOperations,
2627
DataflowOperations,
2728
DataflowProfileOperations,
29+
DataflowsOperations,
2830
InstanceOperations,
2931
Operations,
3032
)
@@ -36,6 +38,10 @@
3638
class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
3739
"""Microsoft.IoTOperations Resource Provider management API.
3840
41+
:ivar brokers: BrokersOperations operations
42+
:vartype brokers: azure.mgmt.iotoperations.operations.BrokersOperations
43+
:ivar dataflows: DataflowsOperations operations
44+
:vartype dataflows: azure.mgmt.iotoperations.operations.DataflowsOperations
3945
:ivar operations: Operations operations
4046
:vartype operations: azure.mgmt.iotoperations.operations.Operations
4147
:ivar instance: InstanceOperations operations
@@ -63,7 +69,7 @@ class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
6369
:param base_url: Service host. Default value is "https://management.azure.com".
6470
:type base_url: str
6571
:keyword api_version: The API version to use for this operation. Default value is
66-
"2024-09-15-preview". Note that overriding this default value may result in unsupported
72+
"2025-01-01-preview". Note that overriding this default value may result in unsupported
6773
behavior.
6874
:paramtype api_version: str
6975
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -104,6 +110,8 @@ def __init__(
104110
self._serialize = Serializer()
105111
self._deserialize = Deserializer()
106112
self._serialize.client_side_validation = False
113+
self.brokers = BrokersOperations(self._client, self._config, self._serialize, self._deserialize)
114+
self.dataflows = DataflowsOperations(self._client, self._config, self._serialize, self._deserialize)
107115
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
108116
self.instance = InstanceOperations(self._client, self._config, self._serialize, self._deserialize)
109117
self.broker = BrokerOperations(self._client, self._config, self._serialize, self._deserialize)

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IoTOperationsMgmtClientConfiguration: # pylint: disable=too-many-instance
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
3232
:keyword api_version: The API version to use for this operation. Default value is
33-
"2024-09-15-preview". Note that overriding this default value may result in unsupported
33+
"2025-01-01-preview". Note that overriding this default value may result in unsupported
3434
behavior.
3535
:paramtype api_version: str
3636
"""
@@ -42,7 +42,7 @@ def __init__(
4242
base_url: str = "https://management.azure.com",
4343
**kwargs: Any
4444
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-09-15-preview")
45+
api_version: str = kwargs.pop("api_version", "2025-01-01-preview")
4646

4747
if credential is None:
4848
raise ValueError("Parameter 'credential' must not be None.")

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_model_base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
# --------------------------------------------------------------------------
8-
# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines
8+
# pylint: disable=protected-access, broad-except
99

1010
import copy
1111
import calendar
@@ -574,7 +574,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
574574
def copy(self) -> "Model":
575575
return Model(self.__dict__)
576576

577-
def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: disable=unused-argument
577+
def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
578578
if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated:
579579
# we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping',
580580
# 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object'
@@ -585,8 +585,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di
585585
annotations = {
586586
k: v
587587
for mro_class in mros
588-
if hasattr(mro_class, "__annotations__") # pylint: disable=no-member
589-
for k, v in mro_class.__annotations__.items() # pylint: disable=no-member
588+
if hasattr(mro_class, "__annotations__")
589+
for k, v in mro_class.__annotations__.items()
590590
}
591591
for attr, rf in attr_to_rest_field.items():
592592
rf._module = cls.__module__
@@ -601,8 +601,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di
601601

602602
def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
603603
for base in cls.__bases__:
604-
if hasattr(base, "__mapping__"): # pylint: disable=no-member
605-
base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member
604+
if hasattr(base, "__mapping__"):
605+
base.__mapping__[discriminator or cls.__name__] = cls # type: ignore
606606

607607
@classmethod
608608
def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]:
@@ -613,7 +613,7 @@ def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField
613613

614614
@classmethod
615615
def _deserialize(cls, data, exist_discriminators):
616-
if not hasattr(cls, "__mapping__"): # pylint: disable=no-member
616+
if not hasattr(cls, "__mapping__"):
617617
return cls(data)
618618
discriminator = cls._get_discriminator(exist_discriminators)
619619
if discriminator is None:
@@ -633,7 +633,7 @@ def _deserialize(cls, data, exist_discriminators):
633633
discriminator_value = data.find(xml_name).text # pyright: ignore
634634
else:
635635
discriminator_value = data.get(discriminator._rest_name)
636-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
636+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
637637
return mapped_cls._deserialize(data, exist_discriminators)
638638

639639
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/_serialization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=too-many-lines
12
# --------------------------------------------------------------------------
23
#
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -506,7 +507,6 @@ def _flatten_subtype(cls, key, objects):
506507
def _classify(cls, response, objects):
507508
"""Check the class _subtype_map for any child classes.
508509
We want to ignore any inherited _subtype_maps.
509-
Remove the polymorphic key from the initial data.
510510
511511
:param dict response: The initial data
512512
:param dict objects: The class objects
@@ -518,7 +518,7 @@ def _classify(cls, response, objects):
518518

519519
if not isinstance(response, ET.Element):
520520
rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
521-
subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
521+
subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
522522
else:
523523
subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
524524
if subtype_value:

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import IoTOperationsMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import IoTOperationsMgmtClient # type: ignore
1016

1117
try:
1218
from ._patch import __all__ as _patch_all
13-
from ._patch import * # pylint: disable=unused-wildcard-import
19+
from ._patch import *
1420
except ImportError:
1521
_patch_all = []
1622
from ._patch import patch_sdk as _patch_sdk

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
BrokerAuthorizationOperations,
2323
BrokerListenerOperations,
2424
BrokerOperations,
25+
BrokersOperations,
2526
DataflowEndpointOperations,
2627
DataflowOperations,
2728
DataflowProfileOperations,
29+
DataflowsOperations,
2830
InstanceOperations,
2931
Operations,
3032
)
@@ -36,6 +38,10 @@
3638
class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
3739
"""Microsoft.IoTOperations Resource Provider management API.
3840
41+
:ivar brokers: BrokersOperations operations
42+
:vartype brokers: azure.mgmt.iotoperations.aio.operations.BrokersOperations
43+
:ivar dataflows: DataflowsOperations operations
44+
:vartype dataflows: azure.mgmt.iotoperations.aio.operations.DataflowsOperations
3945
:ivar operations: Operations operations
4046
:vartype operations: azure.mgmt.iotoperations.aio.operations.Operations
4147
:ivar instance: InstanceOperations operations
@@ -63,7 +69,7 @@ class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
6369
:param base_url: Service host. Default value is "https://management.azure.com".
6470
:type base_url: str
6571
:keyword api_version: The API version to use for this operation. Default value is
66-
"2024-09-15-preview". Note that overriding this default value may result in unsupported
72+
"2025-01-01-preview". Note that overriding this default value may result in unsupported
6773
behavior.
6874
:paramtype api_version: str
6975
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -104,6 +110,8 @@ def __init__(
104110
self._serialize = Serializer()
105111
self._deserialize = Deserializer()
106112
self._serialize.client_side_validation = False
113+
self.brokers = BrokersOperations(self._client, self._config, self._serialize, self._deserialize)
114+
self.dataflows = DataflowsOperations(self._client, self._config, self._serialize, self._deserialize)
107115
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
108116
self.instance = InstanceOperations(self._client, self._config, self._serialize, self._deserialize)
109117
self.broker = BrokerOperations(self._client, self._config, self._serialize, self._deserialize)

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IoTOperationsMgmtClientConfiguration: # pylint: disable=too-many-instance
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
3232
:keyword api_version: The API version to use for this operation. Default value is
33-
"2024-09-15-preview". Note that overriding this default value may result in unsupported
33+
"2025-01-01-preview". Note that overriding this default value may result in unsupported
3434
behavior.
3535
:paramtype api_version: str
3636
"""
@@ -42,7 +42,7 @@ def __init__(
4242
base_url: str = "https://management.azure.com",
4343
**kwargs: Any
4444
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-09-15-preview")
45+
api_version: str = kwargs.pop("api_version", "2025-01-01-preview")
4646

4747
if credential is None:
4848
raise ValueError("Parameter 'credential' must not be None.")

sdk/iotoperations/azure-mgmt-iotoperations/azure/mgmt/iotoperations/aio/operations/__init__.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,32 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._operations import Operations
10-
from ._operations import InstanceOperations
11-
from ._operations import BrokerOperations
12-
from ._operations import BrokerListenerOperations
13-
from ._operations import BrokerAuthenticationOperations
14-
from ._operations import BrokerAuthorizationOperations
15-
from ._operations import DataflowProfileOperations
16-
from ._operations import DataflowOperations
17-
from ._operations import DataflowEndpointOperations
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._operations import BrokersOperations # type: ignore
16+
from ._operations import DataflowsOperations # type: ignore
17+
from ._operations import Operations # type: ignore
18+
from ._operations import InstanceOperations # type: ignore
19+
from ._operations import BrokerOperations # type: ignore
20+
from ._operations import BrokerListenerOperations # type: ignore
21+
from ._operations import BrokerAuthenticationOperations # type: ignore
22+
from ._operations import BrokerAuthorizationOperations # type: ignore
23+
from ._operations import DataflowProfileOperations # type: ignore
24+
from ._operations import DataflowOperations # type: ignore
25+
from ._operations import DataflowEndpointOperations # type: ignore
1826

1927
from ._patch import __all__ as _patch_all
20-
from ._patch import * # pylint: disable=unused-wildcard-import
28+
from ._patch import *
2129
from ._patch import patch_sdk as _patch_sdk
2230

2331
__all__ = [
32+
"BrokersOperations",
33+
"DataflowsOperations",
2434
"Operations",
2535
"InstanceOperations",
2636
"BrokerOperations",

0 commit comments

Comments
 (0)