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/mongocluster/azure-mgmt-mongocluster/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "f93850874010501f216ceadf19459402efd16d9e",
"commit": "9c243d7f39e96402c94facc2ceb591e13a4f62b4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/mongocluster/DocumentDB.MongoCluster.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 @@ -27,11 +27,10 @@
)

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


class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyword
class MongoClusterMgmtClient:
"""The Microsoft Azure management API provides create, read, update, and delete functionality for
Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.

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 MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for MongoClusterMgmtClient.

Note that all parameters used to create this instance are saved as instance
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 @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
)

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


class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyword
class MongoClusterMgmtClient:
"""The Microsoft Azure management API provides create, read, update, and delete functionality for
Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.

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 MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for MongoClusterMgmtClient.

Note that all parameters used to create this instance are saved as instance
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 @@ -75,7 +61,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 @@ -114,7 +100,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 @@ -218,7 +204,7 @@ async def get(self, resource_group_name: str, mongo_cluster_name: str, **kwargs:
:rtype: ~azure.mgmt.mongocluster.models.MongoCluster
: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 @@ -281,7 +267,7 @@ async def _create_or_update_initial(
resource: Union[_models.MongoCluster, 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 @@ -520,7 +506,7 @@ async def _update_initial(
properties: Union[_models.MongoClusterUpdate, 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 @@ -756,7 +742,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, mongo_cluster_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 @@ -891,7 +877,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy

cls: ClsType[List[_models.MongoCluster]] = 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 @@ -979,7 +965,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.MongoCluster"]:

cls: ClsType[List[_models.MongoCluster]] = 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 @@ -1070,7 +1056,7 @@ async def list_connection_strings(
:rtype: ~azure.mgmt.mongocluster.models.ListConnectionStringsResult
: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 @@ -1204,7 +1190,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.mongocluster.models.CheckNameAvailabilityResponse
: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 @@ -1287,7 +1273,7 @@ async def _promote_initial(
body: Union[_models.PromoteReplicaRequest, 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 @@ -1552,7 +1538,7 @@ async def get(
:rtype: ~azure.mgmt.mongocluster.models.FirewallRule
: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 @@ -1617,7 +1603,7 @@ async def _create_or_update_initial(
resource: Union[_models.FirewallRule, 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 @@ -1863,7 +1849,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, mongo_cluster_name: str, firewall_rule_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 @@ -2006,7 +1992,7 @@ def list_by_mongo_cluster(

cls: ClsType[List[_models.FirewallRule]] = 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 @@ -2121,7 +2107,7 @@ def list_by_mongo_cluster(

cls: ClsType[List[_models.PrivateEndpointConnectionResource]] = 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 @@ -2216,7 +2202,7 @@ async def get(
:rtype: ~azure.mgmt.mongocluster.models.PrivateEndpointConnectionResource
: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 @@ -2281,7 +2267,7 @@ async def _create_initial(
resource: Union[_models.PrivateEndpointConnectionResource, 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 @@ -2540,7 +2526,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, mongo_cluster_name: str, private_endpoint_connection_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 @@ -2703,7 +2689,7 @@ def list_by_mongo_cluster(

cls: ClsType[List[_models.PrivateLinkResource]] = 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 @@ -2827,7 +2813,7 @@ def list_by_parent(

cls: ClsType[List[_models.Replica]] = 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# coding=utf-8
# pylint: disable=too-many-lines
# 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.
Expand All @@ -14,7 +14,6 @@
from .._model_base import rest_field

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from .. import models as _models


Expand Down
Loading