Skip to content

Commit d461328

Browse files
author
SDKAuto
committed
CodeGen from PR 30799 in Azure/azure-rest-api-specs
Merge dfc6362be80a7114c83d28d73e8c17446ffc7363 into dce461bb4e89238f383f0a165d95859f54638fd6
1 parent a852079 commit d461328

31 files changed

+132
-177
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "e6fde2ac19d0202f0e72217a3e0f9edb63dba273",
2+
"commit": "bf769c40da6f81caee348c6bfcb4eae2331b3296",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/codesigning/CodeSigning.Management",
5-
"@azure-tools/typespec-python": "0.33.0"
5+
"@azure-tools/typespec-python": "0.35.1"
66
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
from .operations import CertificateProfilesOperations, CodeSigningAccountsOperations, Operations
2121

2222
if TYPE_CHECKING:
23-
# pylint: disable=unused-import,ungrouped-imports
2423
from azure.core.credentials import TokenCredential
2524

2625

27-
class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-keyword
26+
class TrustedSigningMgmtClient:
2827
"""Code Signing resource provider api.
2928
3029
:ivar operations: Operations operations
@@ -41,9 +40,8 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
4140
:type subscription_id: str
4241
:param base_url: Service host. Default value is "https://management.azure.com".
4342
:type base_url: str
44-
:keyword api_version: The API version to use for this operation. Default value is
45-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
46-
behavior.
43+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
44+
Note that overriding this default value may result in unsupported behavior.
4745
:paramtype api_version: str
4846
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4947
Retry-After header is present.

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for TrustedSigningMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -30,9 +29,8 @@ class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instanc
3029
:type subscription_id: str
3130
:param base_url: Service host. Default value is "https://management.azure.com".
3231
:type base_url: str
33-
:keyword api_version: The API version to use for this operation. Default value is
34-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
35-
behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
33+
Note that overriding this default value may result in unsupported behavior.
3634
:paramtype api_version: str
3735
"""
3836

@@ -43,7 +41,7 @@ def __init__(
4341
base_url: str = "https://management.azure.com",
4442
**kwargs: Any
4543
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2024-02-05-preview")
44+
api_version: str = kwargs.pop("api_version", "2024-11-15")
4745

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=too-many-lines
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators):
636637
return mapped_cls._deserialize(data, exist_discriminators)
637638

638639
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
639-
"""Return a dict that can be JSONify using json.dump.
640+
"""Return a dict that can be turned into json using json.dump.
640641
641642
:keyword bool exclude_readonly: Whether to remove the readonly properties.
642643
:returns: A dict JSON compatible object
@@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An
733734
)
734735

735736

736-
def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912
737+
def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches
737738
annotation: typing.Any,
738739
module: typing.Optional[str],
739740
rf: typing.Optional["_RestField"] = None,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=too-many-lines
21
# --------------------------------------------------------------------------
32
#
43
# Copyright (c) Microsoft Corporation. All rights reserved.

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
from .operations import CertificateProfilesOperations, CodeSigningAccountsOperations, Operations
2121

2222
if TYPE_CHECKING:
23-
# pylint: disable=unused-import,ungrouped-imports
2423
from azure.core.credentials_async import AsyncTokenCredential
2524

2625

27-
class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-keyword
26+
class TrustedSigningMgmtClient:
2827
"""Code Signing resource provider api.
2928
3029
:ivar operations: Operations operations
@@ -41,9 +40,8 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
4140
:type subscription_id: str
4241
:param base_url: Service host. Default value is "https://management.azure.com".
4342
:type base_url: str
44-
:keyword api_version: The API version to use for this operation. Default value is
45-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
46-
behavior.
43+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
44+
Note that overriding this default value may result in unsupported behavior.
4745
:paramtype api_version: str
4846
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4947
Retry-After header is present.

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from .._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials_async import AsyncTokenCredential
1918

2019

21-
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for TrustedSigningMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -30,9 +29,8 @@ class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instanc
3029
:type subscription_id: str
3130
:param base_url: Service host. Default value is "https://management.azure.com".
3231
:type base_url: str
33-
:keyword api_version: The API version to use for this operation. Default value is
34-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
35-
behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
33+
Note that overriding this default value may result in unsupported behavior.
3634
:paramtype api_version: str
3735
"""
3836

@@ -43,7 +41,7 @@ def __init__(
4341
base_url: str = "https://management.azure.com",
4442
**kwargs: Any
4543
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2024-02-05-preview")
44+
api_version: str = kwargs.pop("api_version", "2024-11-15")
4745

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

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/aio/operations/_operations.py

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=too-many-lines,too-many-statements
1+
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9,21 +9,7 @@
99
from io import IOBase
1010
import json
1111
import sys
12-
from typing import (
13-
Any,
14-
AsyncIterable,
15-
AsyncIterator,
16-
Callable,
17-
Dict,
18-
IO,
19-
List,
20-
Optional,
21-
Type,
22-
TypeVar,
23-
Union,
24-
cast,
25-
overload,
26-
)
12+
from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload
2713
import urllib.parse
2814

2915
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -67,7 +53,7 @@
6753
if sys.version_info >= (3, 9):
6854
from collections.abc import MutableMapping
6955
else:
70-
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
56+
from typing import MutableMapping # type: ignore
7157
T = TypeVar("T")
7258
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
7359
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
@@ -103,7 +89,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
10389

10490
cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)
10591

106-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
92+
error_map: MutableMapping = {
10793
401: ClientAuthenticationError,
10894
404: ResourceNotFoundError,
10995
409: ResourceExistsError,
@@ -204,7 +190,7 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any)
204190
:rtype: ~azure.mgmt.trustedsigning.models.CodeSigningAccount
205191
:raises ~azure.core.exceptions.HttpResponseError:
206192
"""
207-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
193+
error_map: MutableMapping = {
208194
401: ClientAuthenticationError,
209195
404: ResourceNotFoundError,
210196
409: ResourceExistsError,
@@ -264,7 +250,7 @@ async def _create_initial(
264250
resource: Union[_models.CodeSigningAccount, JSON, IO[bytes]],
265251
**kwargs: Any
266252
) -> AsyncIterator[bytes]:
267-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
253+
error_map: MutableMapping = {
268254
401: ClientAuthenticationError,
269255
404: ResourceNotFoundError,
270256
409: ResourceExistsError,
@@ -497,7 +483,7 @@ async def _update_initial(
497483
properties: Union[_models.CodeSigningAccountPatch, JSON, IO[bytes]],
498484
**kwargs: Any
499485
) -> AsyncIterator[bytes]:
500-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
486+
error_map: MutableMapping = {
501487
401: ClientAuthenticationError,
502488
404: ResourceNotFoundError,
503489
409: ResourceExistsError,
@@ -726,7 +712,7 @@ def get_long_running_output(pipeline_response):
726712
)
727713

728714
async def _delete_initial(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
729-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
715+
error_map: MutableMapping = {
730716
401: ClientAuthenticationError,
731717
404: ResourceNotFoundError,
732718
409: ResourceExistsError,
@@ -856,7 +842,7 @@ def list_by_resource_group(
856842

857843
cls: ClsType[List[_models.CodeSigningAccount]] = kwargs.pop("cls", None)
858844

859-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
845+
error_map: MutableMapping = {
860846
401: ClientAuthenticationError,
861847
404: ResourceNotFoundError,
862848
409: ResourceExistsError,
@@ -942,7 +928,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.CodeSign
942928

943929
cls: ClsType[List[_models.CodeSigningAccount]] = kwargs.pop("cls", None)
944930

945-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
931+
error_map: MutableMapping = {
946932
401: ClientAuthenticationError,
947933
404: ResourceNotFoundError,
948934
409: ResourceExistsError,
@@ -1078,7 +1064,7 @@ async def check_name_availability(
10781064
:rtype: ~azure.mgmt.trustedsigning.models.CheckNameAvailabilityResult
10791065
:raises ~azure.core.exceptions.HttpResponseError:
10801066
"""
1081-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1067+
error_map: MutableMapping = {
10821068
401: ClientAuthenticationError,
10831069
404: ResourceNotFoundError,
10841070
409: ResourceExistsError,
@@ -1174,7 +1160,7 @@ async def get(
11741160
:rtype: ~azure.mgmt.trustedsigning.models.CertificateProfile
11751161
:raises ~azure.core.exceptions.HttpResponseError:
11761162
"""
1177-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1163+
error_map: MutableMapping = {
11781164
401: ClientAuthenticationError,
11791165
404: ResourceNotFoundError,
11801166
409: ResourceExistsError,
@@ -1236,7 +1222,7 @@ async def _create_initial(
12361222
resource: Union[_models.CertificateProfile, JSON, IO[bytes]],
12371223
**kwargs: Any
12381224
) -> AsyncIterator[bytes]:
1239-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1225+
error_map: MutableMapping = {
12401226
401: ClientAuthenticationError,
12411227
404: ResourceNotFoundError,
12421228
409: ResourceExistsError,
@@ -1479,7 +1465,7 @@ def get_long_running_output(pipeline_response):
14791465
async def _delete_initial(
14801466
self, resource_group_name: str, account_name: str, profile_name: str, **kwargs: Any
14811467
) -> AsyncIterator[bytes]:
1482-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1468+
error_map: MutableMapping = {
14831469
401: ClientAuthenticationError,
14841470
404: ResourceNotFoundError,
14851471
409: ResourceExistsError,
@@ -1617,7 +1603,7 @@ def list_by_code_signing_account(
16171603

16181604
cls: ClsType[List[_models.CertificateProfile]] = kwargs.pop("cls", None)
16191605

1620-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1606+
error_map: MutableMapping = {
16211607
401: ClientAuthenticationError,
16221608
404: ResourceNotFoundError,
16231609
409: ResourceExistsError,
@@ -1691,7 +1677,7 @@ async def get_next(next_link=None):
16911677
return AsyncItemPaged(get_next, extract_data)
16921678

16931679
@overload
1694-
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
1680+
async def revoke_certificate(
16951681
self,
16961682
resource_group_name: str,
16971683
account_name: str,
@@ -1721,7 +1707,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17211707
"""
17221708

17231709
@overload
1724-
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
1710+
async def revoke_certificate(
17251711
self,
17261712
resource_group_name: str,
17271713
account_name: str,
@@ -1751,7 +1737,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17511737
"""
17521738

17531739
@overload
1754-
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
1740+
async def revoke_certificate(
17551741
self,
17561742
resource_group_name: str,
17571743
account_name: str,
@@ -1781,7 +1767,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
17811767
"""
17821768

17831769
@distributed_trace_async
1784-
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
1770+
async def revoke_certificate(
17851771
self,
17861772
resource_group_name: str,
17871773
account_name: str,
@@ -1805,7 +1791,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
18051791
:rtype: None
18061792
:raises ~azure.core.exceptions.HttpResponseError:
18071793
"""
1808-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1794+
error_map: MutableMapping = {
18091795
401: ClientAuthenticationError,
18101796
404: ResourceNotFoundError,
18111797
409: ResourceExistsError,

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# --------------------------------------------------------------------------
88

99
from ._models import AccountSku
10+
from ._models import AccountSkuPatch
1011
from ._models import Certificate
1112
from ._models import CertificateProfile
1213
from ._models import CertificateProfileProperties
@@ -44,6 +45,7 @@
4445

4546
__all__ = [
4647
"AccountSku",
48+
"AccountSkuPatch",
4749
"Certificate",
4850
"CertificateProfile",
4951
"CertificateProfileProperties",

0 commit comments

Comments
 (0)