Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/trustedsigning/azure-mgmt-trustedsigning/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "e6fde2ac19d0202f0e72217a3e0f9edb63dba273",
"commit": "bf769c40da6f81caee348c6bfcb4eae2331b3296",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/codesigning/CodeSigning.Management",
"@azure-tools/typespec-python": "0.33.0"
"@azure-tools/typespec-python": "0.35.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
from .operations import CertificateProfilesOperations, CodeSigningAccountsOperations, Operations

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


class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-keyword
class TrustedSigningMgmtClient:
"""Code Signing resource provider api.

:ivar operations: Operations operations
Expand All @@ -41,9 +40,8 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-02-05-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from ._version import VERSION

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


class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for TrustedSigningMgmtClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -30,9 +29,8 @@ class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instanc
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-02-05-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

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

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators):
return mapped_cls._deserialize(data, exist_discriminators)

def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
"""Return a dict that can be JSONify using json.dump.
"""Return a dict that can be turned into json using json.dump.

:keyword bool exclude_readonly: Whether to remove the readonly properties.
:returns: A dict JSON compatible object
Expand Down Expand Up @@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An
)


def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912
def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches
annotation: typing.Any,
module: typing.Optional[str],
rf: typing.Optional["_RestField"] = None,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
from .operations import CertificateProfilesOperations, CodeSigningAccountsOperations, Operations

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


class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-keyword
class TrustedSigningMgmtClient:
"""Code Signing resource provider api.

:ivar operations: Operations operations
Expand All @@ -41,9 +40,8 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-02-05-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from .._version import VERSION

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


class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for TrustedSigningMgmtClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -30,9 +29,8 @@ class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instanc
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-02-05-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-11-15".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

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

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pylint: disable=too-many-lines,too-many-statements
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -9,21 +9,7 @@
from io import IOBase
import json
import sys
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Callable,
Dict,
IO,
List,
Optional,
Type,
TypeVar,
Union,
cast,
overload,
)
from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload
import urllib.parse

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

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

error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -204,7 +190,7 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.trustedsigning.models.CodeSigningAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -264,7 +250,7 @@ async def _create_initial(
resource: Union[_models.CodeSigningAccount, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -497,7 +483,7 @@ async def _update_initial(
properties: Union[_models.CodeSigningAccountPatch, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -726,7 +712,7 @@ def get_long_running_output(pipeline_response):
)

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

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

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

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

error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1078,7 +1064,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.trustedsigning.models.CheckNameAvailabilityResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1174,7 +1160,7 @@ async def get(
:rtype: ~azure.mgmt.trustedsigning.models.CertificateProfile
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1236,7 +1222,7 @@ async def _create_initial(
resource: Union[_models.CertificateProfile, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1479,7 +1465,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, account_name: str, profile_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1617,7 +1603,7 @@ def list_by_code_signing_account(

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

error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1691,7 +1677,7 @@ async def get_next(next_link=None):
return AsyncItemPaged(get_next, extract_data)

@overload
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
async def revoke_certificate(
self,
resource_group_name: str,
account_name: str,
Expand Down Expand Up @@ -1721,7 +1707,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
"""

@overload
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
async def revoke_certificate(
self,
resource_group_name: str,
account_name: str,
Expand Down Expand Up @@ -1751,7 +1737,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
"""

@overload
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
async def revoke_certificate(
self,
resource_group_name: str,
account_name: str,
Expand Down Expand Up @@ -1781,7 +1767,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
"""

@distributed_trace_async
async def revoke_certificate( # pylint: disable=inconsistent-return-statements
async def revoke_certificate(
self,
resource_group_name: str,
account_name: str,
Expand All @@ -1805,7 +1791,7 @@ async def revoke_certificate( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# --------------------------------------------------------------------------

from ._models import AccountSku
from ._models import AccountSkuPatch
from ._models import Certificate
from ._models import CertificateProfile
from ._models import CertificateProfileProperties
Expand Down Expand Up @@ -44,6 +45,7 @@

__all__ = [
"AccountSku",
"AccountSkuPatch",
"Certificate",
"CertificateProfile",
"CertificateProfileProperties",
Expand Down
Loading