Skip to content

Commit 397a697

Browse files
Deviceupdate rename updates subclient (#44223)
* Add .NET emitter to Device Update for IoT Hub tspconfig * Rename DeviceUpdate sub-client to DeviceUpdates for C# only to avoid namespace collision The C# namespace is Azure.IoT.DeviceUpdate; a sub-client named 'DeviceUpdate' collides with the namespace's last segment, so the C# emitter renames the namespace to Azure.IoT._DeviceUpdate. Scope the rename to 'DeviceUpdates' for C# only via @@clientLocation scope 'csharp'; all other languages keep the original 'DeviceUpdate' name ('!csharp'), preserving the already-shipped public client/operation-group names in Java, Python, and JS. DeviceManagement is unaffected. --------- Co-authored-by: Lawrence Onyango <laonyango@microsoft.com>
1 parent 9791566 commit 397a697

1 file changed

Lines changed: 105 additions & 11 deletions

File tree

  • specification/deviceupdate/data-plane/duiothub

specification/deviceupdate/data-plane/duiothub/client.tsp

Lines changed: 105 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,114 @@ using DeviceUpdateClient;
1111
"logCollectionId"
1212
);
1313

14-
@@clientLocation(DeviceUpdateOperationGroup.listUpdates, "DeviceUpdate");
15-
@@clientLocation(DeviceUpdateOperationGroup.importUpdate, "DeviceUpdate");
16-
@@clientLocation(DeviceUpdateOperationGroup.getUpdate, "DeviceUpdate");
17-
@@clientLocation(DeviceUpdateOperationGroup.deleteUpdate, "DeviceUpdate");
18-
@@clientLocation(DeviceUpdateOperationGroup.listProviders, "DeviceUpdate");
19-
@@clientLocation(DeviceUpdateOperationGroup.listNames, "DeviceUpdate");
20-
@@clientLocation(DeviceUpdateOperationGroup.listVersions, "DeviceUpdate");
21-
@@clientLocation(DeviceUpdateOperationGroup.listFiles, "DeviceUpdate");
22-
@@clientLocation(DeviceUpdateOperationGroup.getFile, "DeviceUpdate");
14+
// The C# namespace is `Azure.IoT.DeviceUpdate`; a sub-client literally named
15+
// `DeviceUpdate` collides with the namespace's last segment, so the C# emitter
16+
// disambiguates by renaming the namespace to `Azure.IoT._DeviceUpdate`. Use
17+
// `DeviceUpdates` for C# only to avoid the collision; all other languages keep
18+
// the original `DeviceUpdate` name (no collision there, and it preserves the
19+
// already-shipped public client/operation-group name).
20+
@@clientLocation(
21+
DeviceUpdateOperationGroup.listUpdates,
22+
"DeviceUpdates",
23+
"csharp"
24+
);
25+
@@clientLocation(
26+
DeviceUpdateOperationGroup.listUpdates,
27+
"DeviceUpdate",
28+
"!csharp"
29+
);
30+
@@clientLocation(
31+
DeviceUpdateOperationGroup.importUpdate,
32+
"DeviceUpdates",
33+
"csharp"
34+
);
35+
@@clientLocation(
36+
DeviceUpdateOperationGroup.importUpdate,
37+
"DeviceUpdate",
38+
"!csharp"
39+
);
40+
@@clientLocation(
41+
DeviceUpdateOperationGroup.getUpdate,
42+
"DeviceUpdates",
43+
"csharp"
44+
);
45+
@@clientLocation(
46+
DeviceUpdateOperationGroup.getUpdate,
47+
"DeviceUpdate",
48+
"!csharp"
49+
);
50+
@@clientLocation(
51+
DeviceUpdateOperationGroup.deleteUpdate,
52+
"DeviceUpdates",
53+
"csharp"
54+
);
55+
@@clientLocation(
56+
DeviceUpdateOperationGroup.deleteUpdate,
57+
"DeviceUpdate",
58+
"!csharp"
59+
);
60+
@@clientLocation(
61+
DeviceUpdateOperationGroup.listProviders,
62+
"DeviceUpdates",
63+
"csharp"
64+
);
65+
@@clientLocation(
66+
DeviceUpdateOperationGroup.listProviders,
67+
"DeviceUpdate",
68+
"!csharp"
69+
);
70+
@@clientLocation(
71+
DeviceUpdateOperationGroup.listNames,
72+
"DeviceUpdates",
73+
"csharp"
74+
);
75+
@@clientLocation(
76+
DeviceUpdateOperationGroup.listNames,
77+
"DeviceUpdate",
78+
"!csharp"
79+
);
80+
@@clientLocation(
81+
DeviceUpdateOperationGroup.listVersions,
82+
"DeviceUpdates",
83+
"csharp"
84+
);
85+
@@clientLocation(
86+
DeviceUpdateOperationGroup.listVersions,
87+
"DeviceUpdate",
88+
"!csharp"
89+
);
90+
@@clientLocation(
91+
DeviceUpdateOperationGroup.listFiles,
92+
"DeviceUpdates",
93+
"csharp"
94+
);
95+
@@clientLocation(
96+
DeviceUpdateOperationGroup.listFiles,
97+
"DeviceUpdate",
98+
"!csharp"
99+
);
100+
@@clientLocation(DeviceUpdateOperationGroup.getFile, "DeviceUpdates", "csharp");
101+
@@clientLocation(DeviceUpdateOperationGroup.getFile, "DeviceUpdate", "!csharp");
102+
@@clientLocation(
103+
DeviceUpdateOperationGroup.listOperationStatuses,
104+
"DeviceUpdates",
105+
"csharp"
106+
);
23107
@@clientLocation(
24108
DeviceUpdateOperationGroup.listOperationStatuses,
25-
"DeviceUpdate"
109+
"DeviceUpdate",
110+
"!csharp"
111+
);
112+
@@clientLocation(
113+
DeviceUpdateOperationGroup.getOperationStatus,
114+
"DeviceUpdates",
115+
"csharp"
116+
);
117+
@@clientLocation(
118+
DeviceUpdateOperationGroup.getOperationStatus,
119+
"DeviceUpdate",
120+
"!csharp"
26121
);
27-
@@clientLocation(DeviceUpdateOperationGroup.getOperationStatus, "DeviceUpdate");
28122

29123
@@clientLocation(
30124
DeviceManagementOperationGroup.listDeviceClasses,

0 commit comments

Comments
 (0)