Skip to content

Commit f997ceb

Browse files
[liftrmongodb] Add C# clientName renames for tier/region models (#44201)
* [liftrmongodb] Add C# clientName renames for tier/region models Rename RegionsByTierResponse, TierLimitReachedResponse, TierRegions, and ProjectLimitStatus to MongoDBAtlas*-prefixed C# names. The two Response models also adopt the 'Result' suffix to satisfy the AZC0030 analyzer. Client-only (csharp) renames; the wire contract is unchanged. * [liftrmongodb] Use PascalCase ClusterTier member names (Free/Flex) for csharp * [liftrmongodb] Rename backups property to IsBackupsEnabled for csharp Add @@clientName rename for ClusterProperties.backups -> IsBackupsEnabled to satisfy BOOL001 (.NET bool properties need Is/Has/Can prefix). Wire name and nullability unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3b81a9c commit f997ceb

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

  • specification/liftrmongodb/MongoDB.Atlas.Management

specification/liftrmongodb/MongoDB.Atlas.Management/client.tsp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,40 @@ using MongoDB.Atlas;
5555
"csharp"
5656
);
5757
@@clientName(MongoDB.Atlas.ClusterTier, "MongoDBAtlasClusterTier", "csharp");
58+
59+
// Emit PascalCase member names for the ClusterTier extensible enum to match the
60+
// JavaScript SDK convention (Free/Flex). The wire values ("FREE"/"FLEX") are
61+
// unchanged; this only affects the C# member identifiers. M10/M30 are already
62+
// PascalCase, so they need no rename.
63+
@@clientName(MongoDB.Atlas.ClusterTier.FREE, "Free", "csharp");
64+
@@clientName(MongoDB.Atlas.ClusterTier.FLEX, "Flex", "csharp");
65+
66+
// Boolean property: use the .NET "Is*" assertion-style name. The wire name
67+
// ("backups") and nullability (bool?) are unchanged; this only renames the
68+
// public C# property identifier.
69+
@@clientName(
70+
MongoDB.Atlas.ClusterProperties.backups,
71+
"IsBackupsEnabled",
72+
"csharp"
73+
);
74+
75+
// Tier and region preview models. Apply the MongoDBAtlas* prefix for naming
76+
// consistency, and rename the "Response" suffix to "Result" so the public model
77+
// names satisfy the AZC0030 analyzer. Client-only (csharp) renames; the wire
78+
// contract is unchanged.
79+
@@clientName(
80+
MongoDB.Atlas.RegionsByTierResponse,
81+
"MongoDBAtlasRegionsByTierResult",
82+
"csharp"
83+
);
84+
@@clientName(
85+
MongoDB.Atlas.TierLimitReachedResponse,
86+
"MongoDBAtlasTierLimitReachedResult",
87+
"csharp"
88+
);
89+
@@clientName(MongoDB.Atlas.TierRegions, "MongoDBAtlasTierRegions", "csharp");
90+
@@clientName(
91+
MongoDB.Atlas.ProjectLimitStatus,
92+
"MongoDBAtlasProjectLimitStatus",
93+
"csharp"
94+
);

0 commit comments

Comments
 (0)