diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md b/sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md index 711379066f03..9d5ef25bf784 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 2.0.0 (2025-04-29) + +### Breaking Changes + + - Deleted or renamed client operation group `NeonPostgresMgmtClient.models` + - Deleted or renamed model `ModelsOperations` + ## 1.0.0 (2025-04-21) ### Features Added diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/README.md b/sdk/neonpostgres/azure-mgmt-neonpostgres/README.md index 46b4ed1ef6f0..c3486515a5d9 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/README.md +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Neonpostgres Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/_meta.json b/sdk/neonpostgres/azure-mgmt-neonpostgres/_meta.json index 6a1c89084169..8c831e9bea30 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/_meta.json +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/_meta.json @@ -1,6 +1,6 @@ { - "commit": "917ba27f78348899fba4cafb37fcf018f1987a8e", + "commit": "e9fb138ee5e23ba2cb04acf279c8cd86f76755a0", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/liftrneon/Neon.Postgres.Management", - "@azure-tools/typespec-python": "0.42.2" + "@azure-tools/typespec-python": "0.44.1" } \ No newline at end of file diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/apiview-properties.json b/sdk/neonpostgres/azure-mgmt-neonpostgres/apiview-properties.json index 33dfad20b8a1..5680c1e204d6 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/apiview-properties.json +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/apiview-properties.json @@ -42,44 +42,83 @@ "azure.mgmt.neonpostgres.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", "azure.mgmt.neonpostgres.models.SingleSignOnStates": "LiftrBase.SingleSignOnStates", "azure.mgmt.neonpostgres.models.EndpointType": "Neon.Postgres.Models.EndpointType", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get": "Neon.Postgres.Organizations.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_update": "Neon.Postgres.Organizations.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_delete": "Neon.Postgres.Organizations.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get": "Neon.Postgres.Projects.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_update": "Neon.Postgres.Projects.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.delete": "Neon.Postgres.Projects.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.list": "Neon.Postgres.Projects.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.get": "Neon.Postgres.Branches.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_update": "Neon.Postgres.Branches.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.delete": "Neon.Postgres.Branches.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.list": "Neon.Postgres.Branches.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.get": "Neon.Postgres.Computes.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_update": "Neon.Postgres.Computes.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.delete": "Neon.Postgres.Computes.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.list": "Neon.Postgres.Computes.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.get": "Neon.Postgres.NeonDatabases.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_update": "Neon.Postgres.NeonDatabases.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.delete": "Neon.Postgres.NeonDatabases.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.list": "Neon.Postgres.NeonDatabases.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.get": "Neon.Postgres.NeonRoles.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_update": "Neon.Postgres.NeonRoles.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.delete": "Neon.Postgres.NeonRoles.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.list": "Neon.Postgres.NeonRoles.list", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.get": "Neon.Postgres.Endpoints.get", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_update": "Neon.Postgres.Endpoints.update", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.delete": "Neon.Postgres.Endpoints.delete", - "azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.list": "Neon.Postgres.Endpoints.list" + "azure.mgmt.neonpostgres.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.neonpostgres.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.get": "Neon.Postgres.Organizations.get", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.get": "Neon.Postgres.Organizations.get", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_update": "Neon.Postgres.Organizations.update", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_update": "Neon.Postgres.Organizations.update", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_delete": "Neon.Postgres.Organizations.delete", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_delete": "Neon.Postgres.Organizations.delete", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription", + "azure.mgmt.neonpostgres.operations.OrganizationsOperations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions", + "azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.get": "Neon.Postgres.Projects.get", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.get": "Neon.Postgres.Projects.get", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.begin_update": "Neon.Postgres.Projects.update", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.begin_update": "Neon.Postgres.Projects.update", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.delete": "Neon.Postgres.Projects.delete", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.delete": "Neon.Postgres.Projects.delete", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.list": "Neon.Postgres.Projects.list", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.list": "Neon.Postgres.Projects.list", + "azure.mgmt.neonpostgres.operations.ProjectsOperations.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri", + "azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri", + "azure.mgmt.neonpostgres.operations.BranchesOperations.get": "Neon.Postgres.Branches.get", + "azure.mgmt.neonpostgres.aio.operations.BranchesOperations.get": "Neon.Postgres.Branches.get", + "azure.mgmt.neonpostgres.operations.BranchesOperations.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.BranchesOperations.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate", + "azure.mgmt.neonpostgres.operations.BranchesOperations.begin_update": "Neon.Postgres.Branches.update", + "azure.mgmt.neonpostgres.aio.operations.BranchesOperations.begin_update": "Neon.Postgres.Branches.update", + "azure.mgmt.neonpostgres.operations.BranchesOperations.delete": "Neon.Postgres.Branches.delete", + "azure.mgmt.neonpostgres.aio.operations.BranchesOperations.delete": "Neon.Postgres.Branches.delete", + "azure.mgmt.neonpostgres.operations.BranchesOperations.list": "Neon.Postgres.Branches.list", + "azure.mgmt.neonpostgres.aio.operations.BranchesOperations.list": "Neon.Postgres.Branches.list", + "azure.mgmt.neonpostgres.operations.ComputesOperations.get": "Neon.Postgres.Computes.get", + "azure.mgmt.neonpostgres.aio.operations.ComputesOperations.get": "Neon.Postgres.Computes.get", + "azure.mgmt.neonpostgres.operations.ComputesOperations.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.ComputesOperations.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate", + "azure.mgmt.neonpostgres.operations.ComputesOperations.begin_update": "Neon.Postgres.Computes.update", + "azure.mgmt.neonpostgres.aio.operations.ComputesOperations.begin_update": "Neon.Postgres.Computes.update", + "azure.mgmt.neonpostgres.operations.ComputesOperations.delete": "Neon.Postgres.Computes.delete", + "azure.mgmt.neonpostgres.aio.operations.ComputesOperations.delete": "Neon.Postgres.Computes.delete", + "azure.mgmt.neonpostgres.operations.ComputesOperations.list": "Neon.Postgres.Computes.list", + "azure.mgmt.neonpostgres.aio.operations.ComputesOperations.list": "Neon.Postgres.Computes.list", + "azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.get": "Neon.Postgres.NeonDatabases.get", + "azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.get": "Neon.Postgres.NeonDatabases.get", + "azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate", + "azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.begin_update": "Neon.Postgres.NeonDatabases.update", + "azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.begin_update": "Neon.Postgres.NeonDatabases.update", + "azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.delete": "Neon.Postgres.NeonDatabases.delete", + "azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.delete": "Neon.Postgres.NeonDatabases.delete", + "azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.list": "Neon.Postgres.NeonDatabases.list", + "azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.list": "Neon.Postgres.NeonDatabases.list", + "azure.mgmt.neonpostgres.operations.NeonRolesOperations.get": "Neon.Postgres.NeonRoles.get", + "azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.get": "Neon.Postgres.NeonRoles.get", + "azure.mgmt.neonpostgres.operations.NeonRolesOperations.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate", + "azure.mgmt.neonpostgres.operations.NeonRolesOperations.begin_update": "Neon.Postgres.NeonRoles.update", + "azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.begin_update": "Neon.Postgres.NeonRoles.update", + "azure.mgmt.neonpostgres.operations.NeonRolesOperations.delete": "Neon.Postgres.NeonRoles.delete", + "azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.delete": "Neon.Postgres.NeonRoles.delete", + "azure.mgmt.neonpostgres.operations.NeonRolesOperations.list": "Neon.Postgres.NeonRoles.list", + "azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.list": "Neon.Postgres.NeonRoles.list", + "azure.mgmt.neonpostgres.operations.EndpointsOperations.get": "Neon.Postgres.Endpoints.get", + "azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.get": "Neon.Postgres.Endpoints.get", + "azure.mgmt.neonpostgres.operations.EndpointsOperations.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate", + "azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate", + "azure.mgmt.neonpostgres.operations.EndpointsOperations.begin_update": "Neon.Postgres.Endpoints.update", + "azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.begin_update": "Neon.Postgres.Endpoints.update", + "azure.mgmt.neonpostgres.operations.EndpointsOperations.delete": "Neon.Postgres.Endpoints.delete", + "azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.delete": "Neon.Postgres.Endpoints.delete", + "azure.mgmt.neonpostgres.operations.EndpointsOperations.list": "Neon.Postgres.Endpoints.list", + "azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.list": "Neon.Postgres.Endpoints.list" } } \ No newline at end of file diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_client.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_client.py index 7352f11880dc..041666e4b97f 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_client.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_client.py @@ -7,21 +7,22 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from ._configuration import NeonPostgresMgmtClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( BranchesOperations, ComputesOperations, EndpointsOperations, - ModelsOperations, NeonDatabasesOperations, NeonRolesOperations, Operations, @@ -36,8 +37,6 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes """NeonPostgresMgmtClient. - :ivar models: ModelsOperations operations - :vartype models: azure.mgmt.neonpostgres.operations.ModelsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.neonpostgres.operations.Operations :ivar organizations: OrganizationsOperations operations @@ -58,7 +57,7 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. @@ -68,16 +67,22 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = NeonPostgresMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -96,12 +101,11 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize) self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/__init__.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_model_base.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/model_base.py similarity index 98% rename from sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_model_base.py rename to sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/model_base.py index 065b17f67c46..49d5c7259389 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_model_base.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/model_base.py @@ -22,6 +22,7 @@ from datetime import datetime, date, time, timedelta, timezone from json import JSONEncoder import xml.etree.ElementTree as ET +from collections.abc import MutableMapping from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError @@ -29,11 +30,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping - _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -348,7 +344,7 @@ def _get_model(module_name: str, model_name: str): _UNSET = object() -class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object +class _MyMutableMapping(MutableMapping[str, typing.Any]): def __init__(self, data: typing.Dict[str, typing.Any]) -> None: self._data = data @@ -408,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any: return default @typing.overload - def pop(self, key: str) -> typing.Any: ... + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ @typing.overload - def pop(self, key: str, default: _T) -> _T: ... + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -444,7 +440,7 @@ def clear(self) -> None: """ self._data.clear() - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ """ Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs. @@ -455,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: def setdefault(self, key: str, default: None = None) -> None: ... @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: """ @@ -645,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - return super().__new__(cls) # pylint: disable=no-value-for-parameter + return super().__new__(cls) def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: @@ -681,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_serialization.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/serialization.py similarity index 100% rename from sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_serialization.py rename to sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_utils/serialization.py diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_version.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_version.py index 0ec13ea52bbf..8f2350dd3b0c 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_version.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_client.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_client.py index 98a430bde872..074eedd64146 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_client.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/_client.py @@ -7,21 +7,22 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import NeonPostgresMgmtClientConfiguration from .operations import ( BranchesOperations, ComputesOperations, EndpointsOperations, - ModelsOperations, NeonDatabasesOperations, NeonRolesOperations, Operations, @@ -36,8 +37,6 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes """NeonPostgresMgmtClient. - :ivar models: ModelsOperations operations - :vartype models: azure.mgmt.neonpostgres.aio.operations.ModelsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.neonpostgres.aio.operations.Operations :ivar organizations: OrganizationsOperations operations @@ -58,7 +57,7 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service host. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. @@ -68,16 +67,22 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: _endpoint = "{endpoint}" + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = NeonPostgresMgmtClientConfiguration( - credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -96,12 +101,13 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize) self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/__init__.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/__init__.py index 2828a5d7896d..6e7dd0fed8a3 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/__init__.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/__init__.py @@ -12,7 +12,6 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore from ._operations import Operations # type: ignore from ._operations import OrganizationsOperations # type: ignore from ._operations import ProjectsOperations # type: ignore @@ -27,7 +26,6 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", "Operations", "OrganizationsOperations", "ProjectsOperations", diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_operations.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_operations.py index b193d5581019..1f7afe7d8ae4 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_operations.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/aio/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -34,8 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from ..._serialization import Deserializer, Serializer +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer from ..._validation import api_version_validation from ...operations._operations import ( build_branches_create_or_update_request, @@ -80,31 +80,9 @@ ) from .._configuration import NeonPostgresMgmtClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - 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 - - -class ModelsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.neonpostgres.aio.NeonPostgresMgmtClient`'s - :attr:`models` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NeonPostgresMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") +JSON = MutableMapping[str, Any] class Operations: diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_models.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_models.py index bde11f26369a..996ce08e092d 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_models.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/models/_models.py @@ -11,14 +11,13 @@ import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload -from .. import _model_base -from .._model_base import rest_field +from .._utils.model_base import Model as _Model, rest_field if TYPE_CHECKING: from .. import models as _models -class Attributes(_model_base.Model): +class Attributes(_Model): """Additional attributes specific to Neon Resources. :ivar name: Name of the attribute. Required. @@ -51,7 +50,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resource(_model_base.Model): +class Resource(_Model): """Common fields that are returned in the response for all Azure Resource Manager resources. :ivar id: Fully qualified resource ID for the resource. Ex - @@ -138,7 +137,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class BranchProperties(_model_base.Model): +class BranchProperties(_Model): """Properties specific to Branch. :ivar entity_id: Unique identifier for the entity. @@ -234,7 +233,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CompanyDetails(_model_base.Model): +class CompanyDetails(_Model): """Company details for an organization. :ivar company_name: Company name. @@ -336,7 +335,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ComputeProperties(_model_base.Model): +class ComputeProperties(_Model): """Properties specific to Compute. :ivar entity_id: Unique identifier for the entity. @@ -409,7 +408,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ConnectionUriProperties(_model_base.Model): +class ConnectionUriProperties(_Model): """Connection uri parameters for the associated database. :ivar project_id: Project Id associated with this connection. @@ -470,7 +469,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class DefaultEndpointSettings(_model_base.Model): +class DefaultEndpointSettings(_Model): """Default Endpoint Settings for the project. :ivar autoscaling_limit_min_cu: Minimum compute units for autoscaling. Required. @@ -548,7 +547,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class EndpointProperties(_model_base.Model): +class EndpointProperties(_Model): """Properties specific to Endpoints. :ivar entity_id: Unique identifier for the entity. @@ -618,7 +617,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_model_base.Model): +class ErrorAdditionalInfo(_Model): """The resource management error additional info. :ivar type: The additional info type. @@ -633,7 +632,7 @@ class ErrorAdditionalInfo(_model_base.Model): """The additional info.""" -class ErrorDetail(_model_base.Model): +class ErrorDetail(_Model): """The error detail. :ivar code: The error code. @@ -662,7 +661,7 @@ class ErrorDetail(_model_base.Model): """The error additional info.""" -class ErrorResponse(_model_base.Model): +class ErrorResponse(_Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. @@ -691,7 +690,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MarketplaceDetails(_model_base.Model): +class MarketplaceDetails(_Model): """Marketplace details for an organization. :ivar subscription_id: SaaS subscription id for the the marketplace offer. @@ -779,7 +778,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class NeonDatabaseProperties(_model_base.Model): +class NeonDatabaseProperties(_Model): """Properties specific to Databases. :ivar entity_id: Unique identifier for the entity. @@ -883,7 +882,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class NeonRoleProperties(_model_base.Model): +class NeonRoleProperties(_Model): """Properties specific to Roles. :ivar entity_id: Unique identifier for the entity. @@ -953,7 +952,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OfferDetails(_model_base.Model): +class OfferDetails(_Model): """Offer details for the marketplace that is selected by the user. :ivar publisher_id: Publisher Id for the marketplace offer. Required. @@ -1006,7 +1005,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_model_base.Model): +class Operation(_Model): """Details of a REST API operation, returned from the Resource Provider Operations API. :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -1063,7 +1062,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_model_base.Model): +class OperationDisplay(_Model): """Localized display information for and operation. :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft @@ -1094,7 +1093,7 @@ class OperationDisplay(_model_base.Model): views.""" -class OrganizationProperties(_model_base.Model): +class OrganizationProperties(_Model): """Properties specific to Neon Organization resource. :ivar marketplace_details: Marketplace details of the resource. Required. @@ -1114,7 +1113,7 @@ class OrganizationProperties(_model_base.Model): """ marketplace_details: "_models.MarketplaceDetails" = rest_field( - name="marketplaceDetails", visibility=["read", "create"] + name="marketplaceDetails", visibility=["read", "create", "update"] ) """Marketplace details of the resource. Required.""" user_details: "_models.UserDetails" = rest_field( @@ -1253,7 +1252,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PartnerOrganizationProperties(_model_base.Model): +class PartnerOrganizationProperties(_Model): """Properties specific to Partner's organization. :ivar organization_id: Organization Id in partner's system. @@ -1297,7 +1296,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PgVersion(_model_base.Model): +class PgVersion(_Model): """PostgreSQL Version model. :ivar version: The major PostgreSQL version number. @@ -1325,7 +1324,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PgVersionsResult(_model_base.Model): +class PgVersionsResult(_Model): """Response model for PostgreSQL versions. :ivar versions: List of PostgreSQL versions. Required. @@ -1394,7 +1393,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ProjectProperties(_model_base.Model): +class ProjectProperties(_Model): """Properties specific to Project. :ivar entity_id: Unique identifier for the entity. @@ -1504,7 +1503,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SingleSignOnProperties(_model_base.Model): +class SingleSignOnProperties(_Model): """Properties specific to Single Sign On Resource. :ivar single_sign_on_state: State of the Single Sign On for the organization. Known values are: @@ -1558,7 +1557,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_model_base.Model): +class SystemData(_Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. @@ -1625,7 +1624,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class UserDetails(_model_base.Model): +class UserDetails(_Model): """User details for an organization. :ivar first_name: First name of the user. diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/__init__.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/__init__.py index 2828a5d7896d..6e7dd0fed8a3 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/__init__.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/__init__.py @@ -12,7 +12,6 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore from ._operations import Operations # type: ignore from ._operations import OrganizationsOperations # type: ignore from ._operations import ProjectsOperations # type: ignore @@ -27,7 +26,6 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", "Operations", "OrganizationsOperations", "ProjectsOperations", diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_operations.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_operations.py index f0b305ce4e54..fd304748f8d7 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_operations.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/operations/_operations.py @@ -6,9 +6,9 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase import json -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -34,17 +34,13 @@ from .. import models as _models from .._configuration import NeonPostgresMgmtClientConfiguration -from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from .._serialization import Deserializer, Serializer +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer from .._validation import api_version_validation -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -1385,24 +1381,6 @@ def build_endpoints_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class ModelsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.neonpostgres.NeonPostgresMgmtClient`'s - :attr:`models` attribute. - """ - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: NeonPostgresMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - class Operations: """ .. warning:: diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/generated_samples/organizations_update_maximum_set_gen.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/generated_samples/organizations_update_maximum_set_gen.py index 1790d80814d0..e0e7b36e3584 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/generated_samples/organizations_update_maximum_set_gen.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/generated_samples/organizations_update_maximum_set_gen.py @@ -43,6 +43,18 @@ def main(): "numberOfEmployees": 12, "officeAddress": "icirtoqmmozijk", }, + "marketplaceDetails": { + "offerDetails": { + "offerId": "bunyeeupoedueofwrzej", + "planId": "nlbfiwtslenfwek", + "planName": "ljbmgpkfqklaufacbpml", + "publisherId": "hporaxnopmolttlnkbarw", + "termId": "aedlchikwqckuploswthvshe", + "termUnit": "qbcq", + }, + "subscriptionId": "yxmkfivp", + "subscriptionStatus": "PendingFulfillmentStart", + }, "partnerOrganizationProperties": { "organizationId": "fynmpcbivqkwqdfhrmsyusjd", "organizationName": "entity-name", diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py b/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py index 090dc2220bcc..5652443359ad 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/setup.py @@ -53,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -77,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) diff --git a/sdk/neonpostgres/azure-mgmt-neonpostgres/tsp-location.yaml b/sdk/neonpostgres/azure-mgmt-neonpostgres/tsp-location.yaml index 6e07630208ba..b7aac9d60c9d 100644 --- a/sdk/neonpostgres/azure-mgmt-neonpostgres/tsp-location.yaml +++ b/sdk/neonpostgres/azure-mgmt-neonpostgres/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: 917ba27f78348899fba4cafb37fcf018f1987a8e +commit: e9fb138ee5e23ba2cb04acf279c8cd86f76755a0 repo: Azure/azure-rest-api-specs additionalDirectories: