Skip to content

Commit 21d5d72

Browse files
author
SDKAuto
committed
CodeGen from PR 33881 in Azure/azure-rest-api-specs
Merge 75eee67128e57fc00f25eca195679e8db7cf2e96 into 4ee934e52d72abab89bd0cc706b3f7bf8818729d
1 parent 8b96068 commit 21d5d72

File tree

82 files changed

+19264
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+19264
-677
lines changed

sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md

Lines changed: 118 additions & 0 deletions
Large diffs are not rendered by default.

sdk/neonpostgres/azure-mgmt-neonpostgres/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "4e3820497caa29ed0efada28a38cb4292cea9d55",
2+
"commit": "89947eccd80af5d47393e716ec19c5c22b02d818",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/liftrneon/Neon.Postgres.Management",
5-
"@azure-tools/typespec-python": "0.36.1"
5+
"@azure-tools/typespec-python": "0.42.2"
66
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"CrossLanguagePackageId": "Neon.Postgres",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.neonpostgres.models.Attributes": "Neon.Postgres.Models.Attributes",
5+
"azure.mgmt.neonpostgres.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
6+
"azure.mgmt.neonpostgres.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
7+
"azure.mgmt.neonpostgres.models.Branch": "Neon.Postgres.Branch",
8+
"azure.mgmt.neonpostgres.models.BranchProperties": "Neon.Postgres.Models.BranchProperties",
9+
"azure.mgmt.neonpostgres.models.CompanyDetails": "LiftrBase.CompanyDetails",
10+
"azure.mgmt.neonpostgres.models.Compute": "Neon.Postgres.Compute",
11+
"azure.mgmt.neonpostgres.models.ComputeProperties": "Neon.Postgres.Models.ComputeProperties",
12+
"azure.mgmt.neonpostgres.models.ConnectionUriProperties": "Neon.Postgres.Models.ConnectionUriProperties",
13+
"azure.mgmt.neonpostgres.models.DefaultEndpointSettings": "Neon.Postgres.Models.DefaultEndpointSettings",
14+
"azure.mgmt.neonpostgres.models.Endpoint": "Neon.Postgres.Endpoint",
15+
"azure.mgmt.neonpostgres.models.EndpointProperties": "Neon.Postgres.Models.EndpointProperties",
16+
"azure.mgmt.neonpostgres.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
17+
"azure.mgmt.neonpostgres.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
18+
"azure.mgmt.neonpostgres.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
19+
"azure.mgmt.neonpostgres.models.MarketplaceDetails": "LiftrBase.MarketplaceDetails",
20+
"azure.mgmt.neonpostgres.models.NeonDatabase": "Neon.Postgres.NeonDatabase",
21+
"azure.mgmt.neonpostgres.models.NeonDatabaseProperties": "Neon.Postgres.Models.NeonDatabaseProperties",
22+
"azure.mgmt.neonpostgres.models.NeonRole": "Neon.Postgres.NeonRole",
23+
"azure.mgmt.neonpostgres.models.NeonRoleProperties": "Neon.Postgres.Models.NeonRoleProperties",
24+
"azure.mgmt.neonpostgres.models.OfferDetails": "LiftrBase.OfferDetails",
25+
"azure.mgmt.neonpostgres.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
26+
"azure.mgmt.neonpostgres.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
27+
"azure.mgmt.neonpostgres.models.OrganizationProperties": "LiftrBase.Data.OrganizationProperties",
28+
"azure.mgmt.neonpostgres.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
29+
"azure.mgmt.neonpostgres.models.OrganizationResource": "Neon.Postgres.OrganizationResource",
30+
"azure.mgmt.neonpostgres.models.PartnerOrganizationProperties": "LiftrBase.Data.PartnerOrganizationProperties",
31+
"azure.mgmt.neonpostgres.models.PgVersion": "Neon.Postgres.Models.PgVersion",
32+
"azure.mgmt.neonpostgres.models.PgVersionsResult": "Neon.Postgres.Models.PgVersionsResult",
33+
"azure.mgmt.neonpostgres.models.Project": "Neon.Postgres.Project",
34+
"azure.mgmt.neonpostgres.models.ProjectProperties": "Neon.Postgres.Models.ProjectProperties",
35+
"azure.mgmt.neonpostgres.models.SingleSignOnProperties": "LiftrBase.SingleSignOnProperties",
36+
"azure.mgmt.neonpostgres.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
37+
"azure.mgmt.neonpostgres.models.UserDetails": "LiftrBase.UserDetails",
38+
"azure.mgmt.neonpostgres.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
39+
"azure.mgmt.neonpostgres.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
40+
"azure.mgmt.neonpostgres.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
41+
"azure.mgmt.neonpostgres.models.MarketplaceSubscriptionStatus": "LiftrBase.MarketplaceSubscriptionStatus",
42+
"azure.mgmt.neonpostgres.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState",
43+
"azure.mgmt.neonpostgres.models.SingleSignOnStates": "LiftrBase.SingleSignOnStates",
44+
"azure.mgmt.neonpostgres.models.EndpointType": "Neon.Postgres.Models.EndpointType",
45+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
46+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get": "Neon.Postgres.Organizations.get",
47+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate",
48+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_update": "Neon.Postgres.Organizations.update",
49+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_delete": "Neon.Postgres.Organizations.delete",
50+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup",
51+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription",
52+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions",
53+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get": "Neon.Postgres.Projects.get",
54+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate",
55+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_update": "Neon.Postgres.Projects.update",
56+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.delete": "Neon.Postgres.Projects.delete",
57+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.list": "Neon.Postgres.Projects.list",
58+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri",
59+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.get": "Neon.Postgres.Branches.get",
60+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate",
61+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_update": "Neon.Postgres.Branches.update",
62+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.delete": "Neon.Postgres.Branches.delete",
63+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.list": "Neon.Postgres.Branches.list",
64+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.get": "Neon.Postgres.Computes.get",
65+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate",
66+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_update": "Neon.Postgres.Computes.update",
67+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.delete": "Neon.Postgres.Computes.delete",
68+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.list": "Neon.Postgres.Computes.list",
69+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.get": "Neon.Postgres.NeonDatabases.get",
70+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate",
71+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_update": "Neon.Postgres.NeonDatabases.update",
72+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.delete": "Neon.Postgres.NeonDatabases.delete",
73+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.list": "Neon.Postgres.NeonDatabases.list",
74+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.get": "Neon.Postgres.NeonRoles.get",
75+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate",
76+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_update": "Neon.Postgres.NeonRoles.update",
77+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.delete": "Neon.Postgres.NeonRoles.delete",
78+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.list": "Neon.Postgres.NeonRoles.list",
79+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.get": "Neon.Postgres.Endpoints.get",
80+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate",
81+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_update": "Neon.Postgres.Endpoints.update",
82+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.delete": "Neon.Postgres.Endpoints.delete",
83+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.list": "Neon.Postgres.Endpoints.list"
84+
}
85+
}

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

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,51 @@
1717

1818
from ._configuration import NeonPostgresMgmtClientConfiguration
1919
from ._serialization import Deserializer, Serializer
20-
from .operations import Operations, OrganizationsOperations
20+
from .operations import (
21+
BranchesOperations,
22+
ComputesOperations,
23+
EndpointsOperations,
24+
ModelsOperations,
25+
NeonDatabasesOperations,
26+
NeonRolesOperations,
27+
Operations,
28+
OrganizationsOperations,
29+
ProjectsOperations,
30+
)
2131

2232
if TYPE_CHECKING:
2333
from azure.core.credentials import TokenCredential
2434

2535

26-
class NeonPostgresMgmtClient:
36+
class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes
2737
"""NeonPostgresMgmtClient.
2838
39+
:ivar models: ModelsOperations operations
40+
:vartype models: azure.mgmt.neonpostgres.operations.ModelsOperations
2941
:ivar operations: Operations operations
3042
:vartype operations: azure.mgmt.neonpostgres.operations.Operations
3143
:ivar organizations: OrganizationsOperations operations
3244
:vartype organizations: azure.mgmt.neonpostgres.operations.OrganizationsOperations
45+
:ivar projects: ProjectsOperations operations
46+
:vartype projects: azure.mgmt.neonpostgres.operations.ProjectsOperations
47+
:ivar branches: BranchesOperations operations
48+
:vartype branches: azure.mgmt.neonpostgres.operations.BranchesOperations
49+
:ivar computes: ComputesOperations operations
50+
:vartype computes: azure.mgmt.neonpostgres.operations.ComputesOperations
51+
:ivar neon_databases: NeonDatabasesOperations operations
52+
:vartype neon_databases: azure.mgmt.neonpostgres.operations.NeonDatabasesOperations
53+
:ivar neon_roles: NeonRolesOperations operations
54+
:vartype neon_roles: azure.mgmt.neonpostgres.operations.NeonRolesOperations
55+
:ivar endpoints: EndpointsOperations operations
56+
:vartype endpoints: azure.mgmt.neonpostgres.operations.EndpointsOperations
3357
:param credential: Credential used to authenticate requests to the service. Required.
3458
:type credential: ~azure.core.credentials.TokenCredential
3559
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3660
:type subscription_id: str
3761
:param base_url: Service host. Default value is "https://management.azure.com".
3862
:type base_url: str
39-
:keyword api_version: The API version to use for this operation. Default value is
40-
"2024-08-01-preview". Note that overriding this default value may result in unsupported
41-
behavior.
63+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
64+
Note that overriding this default value may result in unsupported behavior.
4265
:paramtype api_version: str
4366
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4467
Retry-After header is present.
@@ -78,8 +101,15 @@ def __init__(
78101
self._serialize = Serializer()
79102
self._deserialize = Deserializer()
80103
self._serialize.client_side_validation = False
104+
self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize)
81105
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
82106
self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize)
107+
self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize)
108+
self.branches = BranchesOperations(self._client, self._config, self._serialize, self._deserialize)
109+
self.computes = ComputesOperations(self._client, self._config, self._serialize, self._deserialize)
110+
self.neon_databases = NeonDatabasesOperations(self._client, self._config, self._serialize, self._deserialize)
111+
self.neon_roles = NeonRolesOperations(self._client, self._config, self._serialize, self._deserialize)
112+
self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
83113

84114
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
85115
"""Runs the network request through the client's chained policies.

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ class NeonPostgresMgmtClientConfiguration: # pylint: disable=too-many-instance-
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is
33-
"2024-08-01-preview". Note that overriding this default value may result in unsupported
34-
behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
33+
Note that overriding this default value may result in unsupported behavior.
3534
:paramtype api_version: str
3635
"""
3736

@@ -42,7 +41,7 @@ def __init__(
4241
base_url: str = "https://management.azure.com",
4342
**kwargs: Any
4443
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-08-01-preview")
44+
api_version: str = kwargs.pop("api_version", "2025-03-01")
4645

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

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

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -373,15 +374,34 @@ def __ne__(self, other: typing.Any) -> bool:
373374
return not self.__eq__(other)
374375

375376
def keys(self) -> typing.KeysView[str]:
377+
"""
378+
:returns: a set-like object providing a view on D's keys
379+
:rtype: ~typing.KeysView
380+
"""
376381
return self._data.keys()
377382

378383
def values(self) -> typing.ValuesView[typing.Any]:
384+
"""
385+
:returns: an object providing a view on D's values
386+
:rtype: ~typing.ValuesView
387+
"""
379388
return self._data.values()
380389

381390
def items(self) -> typing.ItemsView[str, typing.Any]:
391+
"""
392+
:returns: set-like object providing a view on D's items
393+
:rtype: ~typing.ItemsView
394+
"""
382395
return self._data.items()
383396

384397
def get(self, key: str, default: typing.Any = None) -> typing.Any:
398+
"""
399+
Get the value for key if key is in the dictionary, else default.
400+
:param str key: The key to look up.
401+
:param any default: The value to return if key is not in the dictionary. Defaults to None
402+
:returns: D[k] if k in D, else d.
403+
:rtype: any
404+
"""
385405
try:
386406
return self[key]
387407
except KeyError:
@@ -397,17 +417,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397417
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398418

399419
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
420+
"""
421+
Removes specified key and return the corresponding value.
422+
:param str key: The key to pop.
423+
:param any default: The value to return if key is not in the dictionary
424+
:returns: The value corresponding to the key.
425+
:rtype: any
426+
:raises KeyError: If key is not found and default is not given.
427+
"""
400428
if default is _UNSET:
401429
return self._data.pop(key)
402430
return self._data.pop(key, default)
403431

404432
def popitem(self) -> typing.Tuple[str, typing.Any]:
433+
"""
434+
Removes and returns some (key, value) pair
435+
:returns: The (key, value) pair.
436+
:rtype: tuple
437+
:raises KeyError: if D is empty.
438+
"""
405439
return self._data.popitem()
406440

407441
def clear(self) -> None:
442+
"""
443+
Remove all items from D.
444+
"""
408445
self._data.clear()
409446

410447
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
448+
"""
449+
Updates D from mapping/iterable E and F.
450+
:param any args: Either a mapping object or an iterable of key-value pairs.
451+
"""
411452
self._data.update(*args, **kwargs)
412453

413454
@typing.overload
@@ -417,6 +458,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417458
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418459

419460
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
461+
"""
462+
Same as calling D.get(k, d), and setting D[k]=d if k not found
463+
:param str key: The key to look up.
464+
:param any default: The value to set if key is not in the dictionary
465+
:returns: D[k] if k in D, else d.
466+
:rtype: any
467+
"""
420468
if default is _UNSET:
421469
return self._data.setdefault(key)
422470
return self._data.setdefault(key, default)
@@ -754,7 +802,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
754802
except AttributeError:
755803
model_name = annotation
756804
if module is not None:
757-
annotation = _get_model(module, model_name)
805+
annotation = _get_model(module, model_name) # type: ignore
758806

759807
try:
760808
if module and _is_model(annotation):
@@ -894,6 +942,35 @@ def _deserialize(
894942
return _deserialize_with_callable(deserializer, value)
895943

896944

945+
def _failsafe_deserialize(
946+
deserializer: typing.Any,
947+
value: typing.Any,
948+
module: typing.Optional[str] = None,
949+
rf: typing.Optional["_RestField"] = None,
950+
format: typing.Optional[str] = None,
951+
) -> typing.Any:
952+
try:
953+
return _deserialize(deserializer, value, module, rf, format)
954+
except DeserializationError:
955+
_LOGGER.warning(
956+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
957+
)
958+
return None
959+
960+
961+
def _failsafe_deserialize_xml(
962+
deserializer: typing.Any,
963+
value: typing.Any,
964+
) -> typing.Any:
965+
try:
966+
return _deserialize_xml(deserializer, value)
967+
except DeserializationError:
968+
_LOGGER.warning(
969+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
970+
)
971+
return None
972+
973+
897974
class _RestField:
898975
def __init__(
899976
self,

0 commit comments

Comments
 (0)