Skip to content

Commit 2db8405

Browse files
author
SDKAuto
committed
CodeGen from PR 33499 in Azure/azure-rest-api-specs
Merge 5d9d513bd6ba1ae4361b9e37af4d36103955100b into 45924e49834c4e01c0713e6b7ca21f94be17e396
1 parent e16a937 commit 2db8405

File tree

78 files changed

+1221
-779
lines changed

Some content is hidden

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

78 files changed

+1221
-779
lines changed

sdk/iotoperations/azure-mgmt-iotoperations/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Release History
22

3+
## 1.1.0 (2025-03-26)
4+
5+
### Features Added
6+
7+
- Model `InstanceProperties` added property `features`
8+
- Added model `InstanceFeature`
9+
- Added enum `InstanceFeatureMode`
10+
- Method `InstanceProperties.__init__` has a new overload `def __init__(self: None, schema_registry_ref: _models.SchemaRegistryRef, description: Optional[str], features: Optional[Dict[str, _models.InstanceFeature]])`
11+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
12+
- Method `InstanceFeature.__init__` has a new overload `def __init__(self: None, mode: Optional[Union[str, _models.InstanceFeatureMode]], settings: Optional[Dict[str, Union[str, _models.OperationalMode]]])`
13+
- Method `InstanceFeature.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
14+
315
## 1.0.0 (2024-12-16)
416

517
### Other Changes

sdk/iotoperations/azure-mgmt-iotoperations/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "ab67c148ec716a0d0075770742d54468f128c72e",
2+
"commit": "afa0ce71f4d84ae244d89d182be274e40cc66dcc",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/iotoperations/IoTOperations.Management",
5-
"@azure-tools/typespec-python": "0.37.0"
5+
"@azure-tools/typespec-python": "0.41.0"
66
}

sdk/iotoperations/azure-mgmt-iotoperations/apiview-properties.json

Lines changed: 178 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
6262
:type subscription_id: str
6363
:param base_url: Service host. Default value is "https://management.azure.com".
6464
:type base_url: str
65-
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
65+
:keyword api_version: The API version to use for this operation. Default value is "2025-04-01".
6666
Note that overriding this default value may result in unsupported behavior.
6767
:paramtype api_version: str
6868
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class IoTOperationsMgmtClientConfiguration: # pylint: disable=too-many-instance
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
32+
:keyword api_version: The API version to use for this operation. Default value is "2025-04-01".
3333
Note that overriding this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
@@ -41,7 +41,7 @@ def __init__(
4141
base_url: str = "https://management.azure.com",
4242
**kwargs: Any
4343
) -> None:
44-
api_version: str = kwargs.pop("api_version", "2024-11-01")
44+
api_version: str = kwargs.pop("api_version", "2025-04-01")
4545

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

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool:
373373
return not self.__eq__(other)
374374

375375
def keys(self) -> typing.KeysView[str]:
376+
"""
377+
:returns: a set-like object providing a view on D's keys
378+
:rtype: ~typing.KeysView
379+
"""
376380
return self._data.keys()
377381

378382
def values(self) -> typing.ValuesView[typing.Any]:
383+
"""
384+
:returns: an object providing a view on D's values
385+
:rtype: ~typing.ValuesView
386+
"""
379387
return self._data.values()
380388

381389
def items(self) -> typing.ItemsView[str, typing.Any]:
390+
"""
391+
:returns: set-like object providing a view on D's items
392+
:rtype: ~typing.ItemsView
393+
"""
382394
return self._data.items()
383395

384396
def get(self, key: str, default: typing.Any = None) -> typing.Any:
397+
"""
398+
Get the value for key if key is in the dictionary, else default.
399+
:param str key: The key to look up.
400+
:param any default: The value to return if key is not in the dictionary. Defaults to None
401+
:returns: D[k] if k in D, else d.
402+
:rtype: any
403+
"""
385404
try:
386405
return self[key]
387406
except KeyError:
@@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397416
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398417

399418
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419+
"""
420+
Removes specified key and return the corresponding value.
421+
:param str key: The key to pop.
422+
:param any default: The value to return if key is not in the dictionary
423+
:returns: The value corresponding to the key.
424+
:rtype: any
425+
:raises KeyError: If key is not found and default is not given.
426+
"""
400427
if default is _UNSET:
401428
return self._data.pop(key)
402429
return self._data.pop(key, default)
403430

404431
def popitem(self) -> typing.Tuple[str, typing.Any]:
432+
"""
433+
Removes and returns some (key, value) pair
434+
:returns: The (key, value) pair.
435+
:rtype: tuple
436+
:raises KeyError: if D is empty.
437+
"""
405438
return self._data.popitem()
406439

407440
def clear(self) -> None:
441+
"""
442+
Remove all items from D.
443+
"""
408444
self._data.clear()
409445

410446
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
447+
"""
448+
Updates D from mapping/iterable E and F.
449+
:param any args: Either a mapping object or an iterable of key-value pairs.
450+
"""
411451
self._data.update(*args, **kwargs)
412452

413453
@typing.overload
@@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417457
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418458

419459
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460+
"""
461+
Same as calling D.get(k, d), and setting D[k]=d if k not found
462+
:param str key: The key to look up.
463+
:param any default: The value to set if key is not in the dictionary
464+
:returns: D[k] if k in D, else d.
465+
:rtype: any
466+
"""
420467
if default is _UNSET:
421468
return self._data.setdefault(key)
422469
return self._data.setdefault(key, default)
@@ -910,6 +957,19 @@ def _failsafe_deserialize(
910957
return None
911958

912959

960+
def _failsafe_deserialize_xml(
961+
deserializer: typing.Any,
962+
value: typing.Any,
963+
) -> typing.Any:
964+
try:
965+
return _deserialize_xml(deserializer, value)
966+
except DeserializationError:
967+
_LOGGER.warning(
968+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
969+
)
970+
return None
971+
972+
913973
class _RestField:
914974
def __init__(
915975
self,

0 commit comments

Comments
 (0)