From 017e09e48694ad97928492a5b016ed2882838637 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 00:07:17 +0000 Subject: [PATCH 1/6] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 7d6d5aaf2e0..d1aafd7509a 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index c2d82df8252..35aa2ee4829 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "~4.19.1", - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file From b0a5dfa63c001dcf7472b2d16227c63779498849 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 00:08:14 +0000 Subject: [PATCH 2/6] Update dependencies (2025-08-21 00:08:14) --- pnpm-lock.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b11217d5e6f..3cbef79ac02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1677,8 +1677,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.3.0 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz} version: 0.15.2 engines: {node: '>=20.0.0'} peerDependencies: @@ -6460,7 +6460,7 @@ snapshots: dependencies: '@typespec/compiler': 1.3.0(@types/node@24.1.0) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzMzU2Mi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm)': dependencies: '@azure-tools/typespec-autorest': 0.59.0(tlfj6gbglsbr5x2lirzpm33h7y) '@azure-tools/typespec-azure-core': 0.59.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/http@1.3.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/streams@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))))(@typespec/rest@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/http@1.3.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/streams@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))))) From 8510ff029bc39a977762123ffc8fe200409b7b6a Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 00:13:11 +0000 Subject: [PATCH 3/6] Regenerate for typespec-python (2025-08-21 00:13:11) --- .../apiview-properties.json | 2 + .../azure/core/lro/rpc/models/__init__.py | 7 ++ .../specs/azure/core/lro/rpc/models/_enums.py | 25 +++++ .../azure/core/lro/rpc/models/_models.py | 55 ++++++++++- .../apiview-properties.json | 3 + .../core/lro/standard/models/__init__.py | 9 ++ .../azure/core/lro/standard/models/_enums.py | 25 +++++ .../azure/core/lro/standard/models/_models.py | 96 ++++++++++++++++++- 8 files changed, 220 insertions(+), 2 deletions(-) create mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_enums.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_enums.py diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json index cf1e62133c4..d4a0dc431ee 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json @@ -3,6 +3,8 @@ "CrossLanguageDefinitionId": { "specs.azure.core.lro.rpc.models.GenerationOptions": "_Specs_.Azure.Core.Lro.Rpc.GenerationOptions", "specs.azure.core.lro.rpc.models.GenerationResult": "_Specs_.Azure.Core.Lro.Rpc.GenerationResult", + "specs.azure.core.lro.rpc.models.ResourceOperationStatusGenerationResponseGenerationResultError": "Azure.Core.ResourceOperationStatus", + "specs.azure.core.lro.rpc.models.OperationState": "Azure.Core.Foundations.OperationState", "specs.azure.core.lro.rpc.RpcClient.begin_long_running_rpc": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc", "specs.azure.core.lro.rpc.aio.RpcClient.begin_long_running_rpc": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc" } diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py index 557181480b2..b130d397700 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py @@ -16,6 +16,11 @@ from ._models import ( # type: ignore GenerationOptions, GenerationResult, + ResourceOperationStatusGenerationResponseGenerationResultError, +) + +from ._enums import ( # type: ignore + OperationState, ) from ._patch import __all__ as _patch_all from ._patch import * @@ -24,6 +29,8 @@ __all__ = [ "GenerationOptions", "GenerationResult", + "ResourceOperationStatusGenerationResponseGenerationResultError", + "OperationState", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_enums.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_enums.py new file mode 100644 index 00000000000..ee68da0a3e6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_enums.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum describing allowed operation states.""" + + NOT_STARTED = "NotStarted" + """The operation has not started.""" + RUNNING = "Running" + """The operation is in progress.""" + SUCCEEDED = "Succeeded" + """The operation has completed successfully.""" + FAILED = "Failed" + """The operation has failed.""" + CANCELED = "Canceled" + """The operation has been canceled by the user.""" diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py index be0900af492..cca9717ae53 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py @@ -7,10 +7,15 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -from typing import Any, Mapping, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload + +from azure.core.exceptions import ODataV4Format from .._utils.model_base import Model as _Model, rest_field +if TYPE_CHECKING: + from .. import models as _models + class GenerationOptions(_Model): """Options for the generation. @@ -66,3 +71,51 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) + + +class ResourceOperationStatusGenerationResponseGenerationResultError(_Model): # pylint: disable=name-too-long + """Provides status details for long running operations. + + :ivar id: The unique ID of the operation. Required. + :vartype id: str + :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", + "Succeeded", "Failed", and "Canceled". + :vartype status: str or ~specs.azure.core.lro.rpc.models.OperationState + :ivar error: Error object that describes the error when status is "Failed". + :vartype error: ~azure.core.ODataV4Format + :ivar result: The result of the operation. + :vartype result: ~specs.azure.core.lro.rpc.models.GenerationResult + """ + + id: str = rest_field(visibility=["read"]) + """The unique ID of the operation. Required.""" + status: Union[str, "_models.OperationState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", + \"Succeeded\", \"Failed\", and \"Canceled\".""" + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error object that describes the error when status is \"Failed\".""" + result: Optional["_models.GenerationResult"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The result of the operation.""" + + @overload + def __init__( + self, + *, + status: Union[str, "_models.OperationState"], + error: Optional[ODataV4Format] = None, + result: Optional["_models.GenerationResult"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json index d0fff925362..9dc66b6a10a 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json @@ -2,7 +2,10 @@ "CrossLanguagePackageId": "_Specs_.Azure.Core.Lro.Standard", "CrossLanguageDefinitionId": { "specs.azure.core.lro.standard.models.ExportedUser": "_Specs_.Azure.Core.Lro.Standard.ExportedUser", + "specs.azure.core.lro.standard.models.OperationStatusError": "Azure.Core.Foundations.OperationStatus", + "specs.azure.core.lro.standard.models.ResourceOperationStatusUserExportedUserError": "Azure.Core.ResourceOperationStatus", "specs.azure.core.lro.standard.models.User": "_Specs_.Azure.Core.Lro.Standard.User", + "specs.azure.core.lro.standard.models.OperationState": "Azure.Core.Foundations.OperationState", "specs.azure.core.lro.standard.StandardClient.begin_create_or_replace": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", "specs.azure.core.lro.standard.aio.StandardClient.begin_create_or_replace": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", "specs.azure.core.lro.standard.StandardClient.begin_delete": "_Specs_.Azure.Core.Lro.Standard.delete", diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py index ee2a65b6535..82d3df7e7d2 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py @@ -15,15 +15,24 @@ from ._models import ( # type: ignore ExportedUser, + OperationStatusError, + ResourceOperationStatusUserExportedUserError, User, ) + +from ._enums import ( # type: ignore + OperationState, +) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "ExportedUser", + "OperationStatusError", + "ResourceOperationStatusUserExportedUserError", "User", + "OperationState", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_enums.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_enums.py new file mode 100644 index 00000000000..ee68da0a3e6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_enums.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum describing allowed operation states.""" + + NOT_STARTED = "NotStarted" + """The operation has not started.""" + RUNNING = "Running" + """The operation is in progress.""" + SUCCEEDED = "Succeeded" + """The operation has completed successfully.""" + FAILED = "Failed" + """The operation has failed.""" + CANCELED = "Canceled" + """The operation has been canceled by the user.""" diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py index 9de7f18d22b..4913320ffd6 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py @@ -7,10 +7,15 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -from typing import Any, Mapping, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload + +from azure.core.exceptions import ODataV4Format from .._utils.model_base import Model as _Model, rest_field +if TYPE_CHECKING: + from .. import models as _models + class ExportedUser(_Model): """The exported user data. @@ -45,6 +50,95 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class OperationStatusError(_Model): + """Provides status details for long running operations. + + :ivar id: The unique ID of the operation. Required. + :vartype id: str + :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", + "Succeeded", "Failed", and "Canceled". + :vartype status: str or ~specs.azure.core.lro.standard.models.OperationState + :ivar error: Error object that describes the error when status is "Failed". + :vartype error: ~azure.core.ODataV4Format + """ + + id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The unique ID of the operation. Required.""" + status: Union[str, "_models.OperationState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", + \"Succeeded\", \"Failed\", and \"Canceled\".""" + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error object that describes the error when status is \"Failed\".""" + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + status: Union[str, "_models.OperationState"], + error: Optional[ODataV4Format] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceOperationStatusUserExportedUserError(_Model): # pylint: disable=name-too-long + """Provides status details for long running operations. + + :ivar id: The unique ID of the operation. Required. + :vartype id: str + :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", + "Succeeded", "Failed", and "Canceled". + :vartype status: str or ~specs.azure.core.lro.standard.models.OperationState + :ivar error: Error object that describes the error when status is "Failed". + :vartype error: ~azure.core.ODataV4Format + :ivar result: The result of the operation. + :vartype result: ~specs.azure.core.lro.standard.models.ExportedUser + """ + + id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The unique ID of the operation. Required.""" + status: Union[str, "_models.OperationState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", + \"Succeeded\", \"Failed\", and \"Canceled\".""" + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Error object that describes the error when status is \"Failed\".""" + result: Optional["_models.ExportedUser"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The result of the operation.""" + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + status: Union[str, "_models.OperationState"], + error: Optional[ODataV4Format] = None, + result: Optional["_models.ExportedUser"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class User(_Model): """Details about a user. From d4173e0974836d45efe782531aa99925cc27fffe Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 08:02:32 +0000 Subject: [PATCH 4/6] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index d1aafd7509a..169bbfaee8d 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 35aa2ee4829..c0109f1b6bc 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "~4.19.1", - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From a541924210755a4ccaebd728ac81c97408833632 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 08:03:35 +0000 Subject: [PATCH 5/6] Update dependencies (2025-08-21 08:03:34) --- pnpm-lock.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3cbef79ac02..08a66777d2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1677,8 +1677,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.3.0 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz} version: 0.15.2 engines: {node: '>=20.0.0'} peerDependencies: @@ -6460,7 +6460,7 @@ snapshots: dependencies: '@typespec/compiler': 1.3.0(@types/node@24.1.0) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTIzOTM5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTI0NDM3OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.2.tgz(6gtvfxfythggrmyik6oqzxhslm)': dependencies: '@azure-tools/typespec-autorest': 0.59.0(tlfj6gbglsbr5x2lirzpm33h7y) '@azure-tools/typespec-azure-core': 0.59.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/http@1.3.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/streams@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))))(@typespec/rest@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/http@1.3.0(@typespec/compiler@1.3.0(@types/node@24.1.0))(@typespec/streams@0.73.0(@typespec/compiler@1.3.0(@types/node@24.1.0))))) From 29fc9665ba8dd9310206747faacd4fce966a8726 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 21 Aug 2025 08:08:42 +0000 Subject: [PATCH 6/6] Regenerate for typespec-python (2025-08-21 08:08:42) --- .../apiview-properties.json | 2 - .../azure/core/lro/rpc/models/__init__.py | 7 -- .../azure/core/lro/rpc/models/_models.py | 55 +---------- .../apiview-properties.json | 3 - .../core/lro/standard/models/__init__.py | 9 -- .../azure/core/lro/standard/models/_models.py | 96 +------------------ 6 files changed, 2 insertions(+), 170 deletions(-) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json index d4a0dc431ee..cf1e62133c4 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/apiview-properties.json @@ -3,8 +3,6 @@ "CrossLanguageDefinitionId": { "specs.azure.core.lro.rpc.models.GenerationOptions": "_Specs_.Azure.Core.Lro.Rpc.GenerationOptions", "specs.azure.core.lro.rpc.models.GenerationResult": "_Specs_.Azure.Core.Lro.Rpc.GenerationResult", - "specs.azure.core.lro.rpc.models.ResourceOperationStatusGenerationResponseGenerationResultError": "Azure.Core.ResourceOperationStatus", - "specs.azure.core.lro.rpc.models.OperationState": "Azure.Core.Foundations.OperationState", "specs.azure.core.lro.rpc.RpcClient.begin_long_running_rpc": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc", "specs.azure.core.lro.rpc.aio.RpcClient.begin_long_running_rpc": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc" } diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py index b130d397700..557181480b2 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/__init__.py @@ -16,11 +16,6 @@ from ._models import ( # type: ignore GenerationOptions, GenerationResult, - ResourceOperationStatusGenerationResponseGenerationResultError, -) - -from ._enums import ( # type: ignore - OperationState, ) from ._patch import __all__ as _patch_all from ._patch import * @@ -29,8 +24,6 @@ __all__ = [ "GenerationOptions", "GenerationResult", - "ResourceOperationStatusGenerationResponseGenerationResultError", - "OperationState", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py index cca9717ae53..be0900af492 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/models/_models.py @@ -7,15 +7,10 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload - -from azure.core.exceptions import ODataV4Format +from typing import Any, Mapping, overload from .._utils.model_base import Model as _Model, rest_field -if TYPE_CHECKING: - from .. import models as _models - class GenerationOptions(_Model): """Options for the generation. @@ -71,51 +66,3 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) - - -class ResourceOperationStatusGenerationResponseGenerationResultError(_Model): # pylint: disable=name-too-long - """Provides status details for long running operations. - - :ivar id: The unique ID of the operation. Required. - :vartype id: str - :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", - "Succeeded", "Failed", and "Canceled". - :vartype status: str or ~specs.azure.core.lro.rpc.models.OperationState - :ivar error: Error object that describes the error when status is "Failed". - :vartype error: ~azure.core.ODataV4Format - :ivar result: The result of the operation. - :vartype result: ~specs.azure.core.lro.rpc.models.GenerationResult - """ - - id: str = rest_field(visibility=["read"]) - """The unique ID of the operation. Required.""" - status: Union[str, "_models.OperationState"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", - \"Succeeded\", \"Failed\", and \"Canceled\".""" - error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Error object that describes the error when status is \"Failed\".""" - result: Optional["_models.GenerationResult"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The result of the operation.""" - - @overload - def __init__( - self, - *, - status: Union[str, "_models.OperationState"], - error: Optional[ODataV4Format] = None, - result: Optional["_models.GenerationResult"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json index 9dc66b6a10a..d0fff925362 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/apiview-properties.json @@ -2,10 +2,7 @@ "CrossLanguagePackageId": "_Specs_.Azure.Core.Lro.Standard", "CrossLanguageDefinitionId": { "specs.azure.core.lro.standard.models.ExportedUser": "_Specs_.Azure.Core.Lro.Standard.ExportedUser", - "specs.azure.core.lro.standard.models.OperationStatusError": "Azure.Core.Foundations.OperationStatus", - "specs.azure.core.lro.standard.models.ResourceOperationStatusUserExportedUserError": "Azure.Core.ResourceOperationStatus", "specs.azure.core.lro.standard.models.User": "_Specs_.Azure.Core.Lro.Standard.User", - "specs.azure.core.lro.standard.models.OperationState": "Azure.Core.Foundations.OperationState", "specs.azure.core.lro.standard.StandardClient.begin_create_or_replace": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", "specs.azure.core.lro.standard.aio.StandardClient.begin_create_or_replace": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", "specs.azure.core.lro.standard.StandardClient.begin_delete": "_Specs_.Azure.Core.Lro.Standard.delete", diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py index 82d3df7e7d2..ee2a65b6535 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/__init__.py @@ -15,24 +15,15 @@ from ._models import ( # type: ignore ExportedUser, - OperationStatusError, - ResourceOperationStatusUserExportedUserError, User, ) - -from ._enums import ( # type: ignore - OperationState, -) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ "ExportedUser", - "OperationStatusError", - "ResourceOperationStatusUserExportedUserError", "User", - "OperationState", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py index 4913320ffd6..9de7f18d22b 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/models/_models.py @@ -7,15 +7,10 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload - -from azure.core.exceptions import ODataV4Format +from typing import Any, Mapping, overload from .._utils.model_base import Model as _Model, rest_field -if TYPE_CHECKING: - from .. import models as _models - class ExportedUser(_Model): """The exported user data. @@ -50,95 +45,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationStatusError(_Model): - """Provides status details for long running operations. - - :ivar id: The unique ID of the operation. Required. - :vartype id: str - :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", - "Succeeded", "Failed", and "Canceled". - :vartype status: str or ~specs.azure.core.lro.standard.models.OperationState - :ivar error: Error object that describes the error when status is "Failed". - :vartype error: ~azure.core.ODataV4Format - """ - - id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The unique ID of the operation. Required.""" - status: Union[str, "_models.OperationState"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", - \"Succeeded\", \"Failed\", and \"Canceled\".""" - error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Error object that describes the error when status is \"Failed\".""" - - @overload - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - status: Union[str, "_models.OperationState"], - error: Optional[ODataV4Format] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ResourceOperationStatusUserExportedUserError(_Model): # pylint: disable=name-too-long - """Provides status details for long running operations. - - :ivar id: The unique ID of the operation. Required. - :vartype id: str - :ivar status: The status of the operation. Required. Known values are: "NotStarted", "Running", - "Succeeded", "Failed", and "Canceled". - :vartype status: str or ~specs.azure.core.lro.standard.models.OperationState - :ivar error: Error object that describes the error when status is "Failed". - :vartype error: ~azure.core.ODataV4Format - :ivar result: The result of the operation. - :vartype result: ~specs.azure.core.lro.standard.models.ExportedUser - """ - - id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The unique ID of the operation. Required.""" - status: Union[str, "_models.OperationState"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The status of the operation. Required. Known values are: \"NotStarted\", \"Running\", - \"Succeeded\", \"Failed\", and \"Canceled\".""" - error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Error object that describes the error when status is \"Failed\".""" - result: Optional["_models.ExportedUser"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The result of the operation.""" - - @overload - def __init__( - self, - *, - id: str, # pylint: disable=redefined-builtin - status: Union[str, "_models.OperationState"], - error: Optional[ODataV4Format] = None, - result: Optional["_models.ExportedUser"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class User(_Model): """Details about a user.