Skip to content

Commit 68cc6a4

Browse files
author
SDKAuto
committed
CodeGen from PR 33311 in Azure/azure-rest-api-specs
Merge de1ee9ea66bf04c388ff7c5bb2dab34335014321 into 8101a5323ca718856b5d462446107fdeabf28c6d
1 parent 2f95178 commit 68cc6a4

File tree

73 files changed

+19244
-617
lines changed

Some content is hidden

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

73 files changed

+19244
-617
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "4e3820497caa29ed0efada28a38cb4292cea9d55",
2+
"commit": "d64f15c8860ba9000a923e27ce6da78ed3098bda",
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.39.1"
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: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +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
3963
: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
64+
"2025-03-01-preview". Note that overriding this default value may result in unsupported
4165
behavior.
4266
:paramtype api_version: str
4367
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -78,8 +102,15 @@ def __init__(
78102
self._serialize = Serializer()
79103
self._deserialize = Deserializer()
80104
self._serialize.client_side_validation = False
105+
self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize)
81106
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
82107
self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize)
108+
self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize)
109+
self.branches = BranchesOperations(self._client, self._config, self._serialize, self._deserialize)
110+
self.computes = ComputesOperations(self._client, self._config, self._serialize, self._deserialize)
111+
self.neon_databases = NeonDatabasesOperations(self._client, self._config, self._serialize, self._deserialize)
112+
self.neon_roles = NeonRolesOperations(self._client, self._config, self._serialize, self._deserialize)
113+
self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
83114

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class NeonPostgresMgmtClientConfiguration: # pylint: disable=too-many-instance-
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
3232
: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
33+
"2025-03-01-preview". Note that overriding this default value may result in unsupported
3434
behavior.
3535
:paramtype api_version: str
3636
"""
@@ -42,7 +42,7 @@ def __init__(
4242
base_url: str = "https://management.azure.com",
4343
**kwargs: Any
4444
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-08-01-preview")
45+
api_version: str = kwargs.pop("api_version", "2025-03-01-preview")
4646

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

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

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool:
373373
return not self.__eq__(other)
374374

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

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

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

384396
def get(self, key: str, default: typing.Any = None) -> typing.Any:
397+
"""
398+
Get the value for key if key is in the dictionary, else default.
399+
:param str key: The key to look up.
400+
:param any default: The value to return if key is not in the dictionary. Defaults to None
401+
:returns: D[k] if k in D, else d.
402+
:rtype: any
403+
"""
385404
try:
386405
return self[key]
387406
except KeyError:
@@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397416
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398417

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

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

407440
def clear(self) -> None:
441+
"""
442+
Remove all items from D.
443+
"""
408444
self._data.clear()
409445

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

413453
@typing.overload
@@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417457
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418458

419459
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460+
"""
461+
Same as calling D.get(k, d), and setting D[k]=d if k not found
462+
:param str key: The key to look up.
463+
:param any default: The value to set if key is not in the dictionary
464+
:returns: D[k] if k in D, else d.
465+
:rtype: any
466+
"""
420467
if default is _UNSET:
421468
return self._data.setdefault(key)
422469
return self._data.setdefault(key, default)
@@ -754,7 +801,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
754801
except AttributeError:
755802
model_name = annotation
756803
if module is not None:
757-
annotation = _get_model(module, model_name)
804+
annotation = _get_model(module, model_name) # type: ignore
758805

759806
try:
760807
if module and _is_model(annotation):
@@ -894,6 +941,35 @@ def _deserialize(
894941
return _deserialize_with_callable(deserializer, value)
895942

896943

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

0 commit comments

Comments
 (0)