Skip to content

Commit 043d043

Browse files
authored
[Automation] Generate SDK based on TypeSpec 0.27.4 (Azure#44164)
1 parent 2ceaeb2 commit 043d043

File tree

44 files changed

+2379
-346
lines changed

Some content is hidden

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

44 files changed

+2379
-346
lines changed

eng/emitter-package-lock.json

Lines changed: 2114 additions & 225 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/emitter-package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "dist/src/index.js",
33
"dependencies": {
4-
"@azure-tools/typespec-java": "0.27.3"
4+
"@azure-tools/typespec-java": "0.27.4"
55
},
66
"devDependencies": {
7-
"@azure-tools/typespec-azure-core": "0.50.0",
8-
"@azure-tools/typespec-azure-resource-manager": "0.50.0",
9-
"@azure-tools/typespec-autorest": "0.50.0",
10-
"@azure-tools/typespec-azure-rulesets": "0.50.0",
11-
"@azure-tools/typespec-client-generator-core": "0.50.3",
12-
"@typespec/compiler": "0.64.0",
13-
"@typespec/http": "0.64.0",
14-
"@typespec/openapi": "0.64.0",
15-
"@typespec/rest": "0.64.1",
16-
"@typespec/versioning": "0.64.0",
17-
"@typespec/xml": "0.64.0",
18-
"@azure-tools/typespec-liftr-base": "~0.7.0"
7+
"@azure-tools/typespec-azure-core": "0.51.0",
8+
"@azure-tools/typespec-azure-resource-manager": "0.51.0",
9+
"@azure-tools/typespec-autorest": "0.51.0",
10+
"@azure-tools/typespec-azure-rulesets": "0.51.0",
11+
"@azure-tools/typespec-client-generator-core": "0.51.0",
12+
"@typespec/compiler": "0.65.0",
13+
"@typespec/http": "0.65.0",
14+
"@typespec/openapi": "0.65.0",
15+
"@typespec/rest": "0.65.0",
16+
"@typespec/versioning": "0.65.0",
17+
"@typespec/xml": "0.65.0",
18+
"@azure-tools/typespec-liftr-base": "0.7.0"
1919
}
2020
}

sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/ComputeFleetManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.computefleet.fluent.ComputeFleetManagementClient;
2728
import com.azure.resourcemanager.computefleet.implementation.ComputeFleetManagementClientBuilder;
@@ -33,6 +34,7 @@
3334
import java.time.temporal.ChronoUnit;
3435
import java.util.ArrayList;
3536
import java.util.List;
37+
import java.util.Map;
3638
import java.util.Objects;
3739
import java.util.stream.Collectors;
3840

@@ -96,6 +98,9 @@ public static Configurable configure() {
9698
*/
9799
public static final class Configurable {
98100
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
101+
private static final String SDK_VERSION = "version";
102+
private static final Map<String, String> PROPERTIES
103+
= CoreUtils.getProperties("azure-resourcemanager-computefleet.properties");
99104

100105
private HttpClient httpClient;
101106
private HttpLogOptions httpLogOptions;
@@ -203,12 +208,14 @@ public ComputeFleetManager authenticate(TokenCredential credential, AzureProfile
203208
Objects.requireNonNull(credential, "'credential' cannot be null.");
204209
Objects.requireNonNull(profile, "'profile' cannot be null.");
205210

211+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
212+
206213
StringBuilder userAgentBuilder = new StringBuilder();
207214
userAgentBuilder.append("azsdk-java")
208215
.append("-")
209216
.append("com.azure.resourcemanager.computefleet")
210217
.append("/")
211-
.append("1.0.0-beta.1");
218+
.append(clientVersion);
212219
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
213220
userAgentBuilder.append(" (")
214221
.append(Configuration.getGlobalConfiguration().get("java.version"))

sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/UserAssignedIdentity.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
@Immutable
1818
public final class UserAssignedIdentity implements JsonSerializable<UserAssignedIdentity> {
1919
/*
20-
* The principal ID of the assigned identity.
20+
* The client ID of the assigned identity.
2121
*/
22-
private String principalId;
22+
private String clientId;
2323

2424
/*
25-
* The client ID of the assigned identity.
25+
* The principal ID of the assigned identity.
2626
*/
27-
private String clientId;
27+
private String principalId;
2828

2929
/**
3030
* Creates an instance of UserAssignedIdentity class.
@@ -33,21 +33,21 @@ public UserAssignedIdentity() {
3333
}
3434

3535
/**
36-
* Get the principalId property: The principal ID of the assigned identity.
36+
* Get the clientId property: The client ID of the assigned identity.
3737
*
38-
* @return the principalId value.
38+
* @return the clientId value.
3939
*/
40-
public String principalId() {
41-
return this.principalId;
40+
public String clientId() {
41+
return this.clientId;
4242
}
4343

4444
/**
45-
* Get the clientId property: The client ID of the assigned identity.
45+
* Get the principalId property: The principal ID of the assigned identity.
4646
*
47-
* @return the clientId value.
47+
* @return the principalId value.
4848
*/
49-
public String clientId() {
50-
return this.clientId;
49+
public String principalId() {
50+
return this.principalId;
5151
}
5252

5353
/**
@@ -82,10 +82,10 @@ public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOExce
8282
String fieldName = reader.getFieldName();
8383
reader.nextToken();
8484

85-
if ("principalId".equals(fieldName)) {
86-
deserializedUserAssignedIdentity.principalId = reader.getString();
87-
} else if ("clientId".equals(fieldName)) {
85+
if ("clientId".equals(fieldName)) {
8886
deserializedUserAssignedIdentity.clientId = reader.getString();
87+
} else if ("principalId".equals(fieldName)) {
88+
deserializedUserAssignedIdentity.principalId = reader.getString();
8989
} else {
9090
reader.skipChildren();
9191
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/ComputeScheduleManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.computeschedule.fluent.ComputeScheduleMgmtClient;
2728
import com.azure.resourcemanager.computeschedule.implementation.ComputeScheduleMgmtClientBuilder;
@@ -33,6 +34,7 @@
3334
import java.time.temporal.ChronoUnit;
3435
import java.util.ArrayList;
3536
import java.util.List;
37+
import java.util.Map;
3638
import java.util.Objects;
3739
import java.util.stream.Collectors;
3840

@@ -97,6 +99,9 @@ public static Configurable configure() {
9799
*/
98100
public static final class Configurable {
99101
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
102+
private static final String SDK_VERSION = "version";
103+
private static final Map<String, String> PROPERTIES
104+
= CoreUtils.getProperties("azure-resourcemanager-computeschedule.properties");
100105

101106
private HttpClient httpClient;
102107
private HttpLogOptions httpLogOptions;
@@ -204,12 +209,14 @@ public ComputeScheduleManager authenticate(TokenCredential credential, AzureProf
204209
Objects.requireNonNull(credential, "'credential' cannot be null.");
205210
Objects.requireNonNull(profile, "'profile' cannot be null.");
206211

212+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
213+
207214
StringBuilder userAgentBuilder = new StringBuilder();
208215
userAgentBuilder.append("azsdk-java")
209216
.append("-")
210217
.append("com.azure.resourcemanager.computeschedule")
211218
.append("/")
212-
.append("1.0.0-beta.1");
219+
.append(clientVersion);
213220
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
214221
userAgentBuilder.append(" (")
215222
.append(Configuration.getGlobalConfiguration().get("java.version"))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

sdk/connectedcache/azure-resourcemanager-connectedcache/src/main/java/com/azure/resourcemanager/connectedcache/ConnectedCacheManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.connectedcache.fluent.ConnectedCacheManagementClient;
2728
import com.azure.resourcemanager.connectedcache.implementation.CacheNodesOperationsImpl;
@@ -43,6 +44,7 @@
4344
import java.time.temporal.ChronoUnit;
4445
import java.util.ArrayList;
4546
import java.util.List;
47+
import java.util.Map;
4648
import java.util.Objects;
4749
import java.util.stream.Collectors;
4850

@@ -117,6 +119,9 @@ public static Configurable configure() {
117119
*/
118120
public static final class Configurable {
119121
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
122+
private static final String SDK_VERSION = "version";
123+
private static final Map<String, String> PROPERTIES
124+
= CoreUtils.getProperties("azure-resourcemanager-connectedcache.properties");
120125

121126
private HttpClient httpClient;
122127
private HttpLogOptions httpLogOptions;
@@ -224,12 +229,14 @@ public ConnectedCacheManager authenticate(TokenCredential credential, AzureProfi
224229
Objects.requireNonNull(credential, "'credential' cannot be null.");
225230
Objects.requireNonNull(profile, "'profile' cannot be null.");
226231

232+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
233+
227234
StringBuilder userAgentBuilder = new StringBuilder();
228235
userAgentBuilder.append("azsdk-java")
229236
.append("-")
230237
.append("com.azure.resourcemanager.connectedcache")
231238
.append("/")
232-
.append("1.0.0-beta.1");
239+
.append(clientVersion);
233240
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
234241
userAgentBuilder.append(" (")
235242
.append(Configuration.getGlobalConfiguration().get("java.version"))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=${project.version}

sdk/containerorchestratorruntime/azure-resourcemanager-containerorchestratorruntime/src/main/java/com/azure/resourcemanager/containerorchestratorruntime/ContainerOrchestratorRuntimeManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.containerorchestratorruntime.fluent.ContainerOrchestratorRuntimeMgmtClient;
2728
import com.azure.resourcemanager.containerorchestratorruntime.implementation.BgpPeersImpl;
@@ -39,6 +40,7 @@
3940
import java.time.temporal.ChronoUnit;
4041
import java.util.ArrayList;
4142
import java.util.List;
43+
import java.util.Map;
4244
import java.util.Objects;
4345
import java.util.stream.Collectors;
4446

@@ -109,6 +111,9 @@ public static Configurable configure() {
109111
*/
110112
public static final class Configurable {
111113
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
114+
private static final String SDK_VERSION = "version";
115+
private static final Map<String, String> PROPERTIES
116+
= CoreUtils.getProperties("azure-resourcemanager-containerorchestratorruntime.properties");
112117

113118
private HttpClient httpClient;
114119
private HttpLogOptions httpLogOptions;
@@ -216,12 +221,14 @@ public ContainerOrchestratorRuntimeManager authenticate(TokenCredential credenti
216221
Objects.requireNonNull(credential, "'credential' cannot be null.");
217222
Objects.requireNonNull(profile, "'profile' cannot be null.");
218223

224+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
225+
219226
StringBuilder userAgentBuilder = new StringBuilder();
220227
userAgentBuilder.append("azsdk-java")
221228
.append("-")
222229
.append("com.azure.resourcemanager.containerorchestratorruntime")
223230
.append("/")
224-
.append("1.0.0-beta.1");
231+
.append(clientVersion);
225232
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
226233
userAgentBuilder.append(" (")
227234
.append(Configuration.getGlobalConfiguration().get("java.version"))

0 commit comments

Comments
 (0)