Skip to content

Commit 3fb71cb

Browse files
authored
tsp arm, sync tests (#2965)
* bump core * sync tests * bump specs
1 parent c7a698a commit 3fb71cb

File tree

74 files changed

+471
-476
lines changed

Some content is hidden

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

74 files changed

+471
-476
lines changed

core

Submodule core updated 429 files

typespec-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"testserver-run": "npx cadl-ranch serve ./node_modules/@azure-tools/cadl-ranch-specs/http --coverageFile ./cadl-ranch-coverage-java.json"
1010
},
1111
"dependencies": {
12-
"@azure-tools/cadl-ranch-specs": "0.37.6",
12+
"@azure-tools/cadl-ranch-specs": "0.38.0",
1313
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.22.1.tgz"
1414
},
1515
"devDependencies": {
Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

5-
package com.azure.resourcemanager.models.commontypes.managedidentity;
5+
package com.azure.resourcemanager.commonproperties;
66

77
import com.azure.core.credential.TokenCredential;
88
import com.azure.core.http.HttpClient;
@@ -23,10 +23,10 @@
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
2525
import com.azure.core.util.logging.ClientLogger;
26-
import com.azure.resourcemanager.models.commontypes.managedidentity.fluent.ManagedIdentityClient;
27-
import com.azure.resourcemanager.models.commontypes.managedidentity.implementation.ManagedIdentityClientBuilder;
28-
import com.azure.resourcemanager.models.commontypes.managedidentity.implementation.ManagedIdentityTrackedResourcesImpl;
29-
import com.azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResources;
26+
import com.azure.resourcemanager.commonproperties.fluent.CommonPropertiesClient;
27+
import com.azure.resourcemanager.commonproperties.implementation.CommonPropertiesClientBuilder;
28+
import com.azure.resourcemanager.commonproperties.implementation.ManagedIdentitiesImpl;
29+
import com.azure.resourcemanager.commonproperties.models.ManagedIdentities;
3030
import java.time.Duration;
3131
import java.time.temporal.ChronoUnit;
3232
import java.util.ArrayList;
@@ -35,57 +35,57 @@
3535
import java.util.stream.Collectors;
3636

3737
/**
38-
* Entry point to ManagedIdentityManager.
38+
* Entry point to CommonPropertiesManager.
3939
* Arm Managed Identity Provider management API.
4040
*/
41-
public final class ManagedIdentityManager {
42-
private ManagedIdentityTrackedResources managedIdentityTrackedResources;
41+
public final class CommonPropertiesManager {
42+
private ManagedIdentities managedIdentities;
4343

44-
private final ManagedIdentityClient clientObject;
44+
private final CommonPropertiesClient clientObject;
4545

46-
private ManagedIdentityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
46+
private CommonPropertiesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
4747
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
4848
Objects.requireNonNull(profile, "'profile' cannot be null.");
49-
this.clientObject = new ManagedIdentityClientBuilder().pipeline(httpPipeline)
49+
this.clientObject = new CommonPropertiesClientBuilder().pipeline(httpPipeline)
5050
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
5151
.subscriptionId(profile.getSubscriptionId())
5252
.defaultPollInterval(defaultPollInterval)
5353
.buildClient();
5454
}
5555

5656
/**
57-
* Creates an instance of ManagedIdentity service API entry point.
57+
* Creates an instance of CommonProperties service API entry point.
5858
*
5959
* @param credential the credential to use.
6060
* @param profile the Azure profile for client.
61-
* @return the ManagedIdentity service API instance.
61+
* @return the CommonProperties service API instance.
6262
*/
63-
public static ManagedIdentityManager authenticate(TokenCredential credential, AzureProfile profile) {
63+
public static CommonPropertiesManager authenticate(TokenCredential credential, AzureProfile profile) {
6464
Objects.requireNonNull(credential, "'credential' cannot be null.");
6565
Objects.requireNonNull(profile, "'profile' cannot be null.");
6666
return configure().authenticate(credential, profile);
6767
}
6868

6969
/**
70-
* Creates an instance of ManagedIdentity service API entry point.
70+
* Creates an instance of CommonProperties service API entry point.
7171
*
7272
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
7373
* @param profile the Azure profile for client.
74-
* @return the ManagedIdentity service API instance.
74+
* @return the CommonProperties service API instance.
7575
*/
76-
public static ManagedIdentityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
76+
public static CommonPropertiesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
7777
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
7878
Objects.requireNonNull(profile, "'profile' cannot be null.");
79-
return new ManagedIdentityManager(httpPipeline, profile, null);
79+
return new CommonPropertiesManager(httpPipeline, profile, null);
8080
}
8181

8282
/**
83-
* Gets a Configurable instance that can be used to create ManagedIdentityManager with optional configuration.
83+
* Gets a Configurable instance that can be used to create CommonPropertiesManager with optional configuration.
8484
*
8585
* @return the Configurable instance allowing configurations.
8686
*/
8787
public static Configurable configure() {
88-
return new ManagedIdentityManager.Configurable();
88+
return new CommonPropertiesManager.Configurable();
8989
}
9090

9191
/**
@@ -190,20 +190,20 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
190190
}
191191

192192
/**
193-
* Creates an instance of ManagedIdentity service API entry point.
193+
* Creates an instance of CommonProperties service API entry point.
194194
*
195195
* @param credential the credential to use.
196196
* @param profile the Azure profile for client.
197-
* @return the ManagedIdentity service API instance.
197+
* @return the CommonProperties service API instance.
198198
*/
199-
public ManagedIdentityManager authenticate(TokenCredential credential, AzureProfile profile) {
199+
public CommonPropertiesManager authenticate(TokenCredential credential, AzureProfile profile) {
200200
Objects.requireNonNull(credential, "'credential' cannot be null.");
201201
Objects.requireNonNull(profile, "'profile' cannot be null.");
202202

203203
StringBuilder userAgentBuilder = new StringBuilder();
204204
userAgentBuilder.append("azsdk-java")
205205
.append("-")
206-
.append("com.azure.resourcemanager.models.commontypes.managedidentity")
206+
.append("com.azure.resourcemanager.commonproperties")
207207
.append("/")
208208
.append("1.0.0-beta.1");
209209
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
@@ -247,30 +247,29 @@ public ManagedIdentityManager authenticate(TokenCredential credential, AzureProf
247247
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
248248
.policies(policies.toArray(new HttpPipelinePolicy[0]))
249249
.build();
250-
return new ManagedIdentityManager(httpPipeline, profile, defaultPollInterval);
250+
return new CommonPropertiesManager(httpPipeline, profile, defaultPollInterval);
251251
}
252252
}
253253

254254
/**
255-
* Gets the resource collection API of ManagedIdentityTrackedResources. It manages ManagedIdentityTrackedResource.
255+
* Gets the resource collection API of ManagedIdentities. It manages ManagedIdentityTrackedResource.
256256
*
257-
* @return Resource collection API of ManagedIdentityTrackedResources.
257+
* @return Resource collection API of ManagedIdentities.
258258
*/
259-
public ManagedIdentityTrackedResources managedIdentityTrackedResources() {
260-
if (this.managedIdentityTrackedResources == null) {
261-
this.managedIdentityTrackedResources
262-
= new ManagedIdentityTrackedResourcesImpl(clientObject.getManagedIdentityTrackedResources(), this);
259+
public ManagedIdentities managedIdentities() {
260+
if (this.managedIdentities == null) {
261+
this.managedIdentities = new ManagedIdentitiesImpl(clientObject.getManagedIdentities(), this);
263262
}
264-
return managedIdentityTrackedResources;
263+
return managedIdentities;
265264
}
266265

267266
/**
268-
* Gets wrapped service client ManagedIdentityClient providing direct access to the underlying auto-generated API
267+
* Gets wrapped service client CommonPropertiesClient providing direct access to the underlying auto-generated API
269268
* implementation, based on Azure REST API.
270269
*
271-
* @return Wrapped service client ManagedIdentityClient.
270+
* @return Wrapped service client CommonPropertiesClient.
272271
*/
273-
public ManagedIdentityClient serviceClient() {
272+
public CommonPropertiesClient serviceClient() {
274273
return this.clientObject;
275274
}
276275
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

5-
package com.azure.resourcemanager.models.commontypes.managedidentity.fluent;
5+
package com.azure.resourcemanager.commonproperties.fluent;
66

77
import com.azure.core.http.HttpPipeline;
88
import java.time.Duration;
99

1010
/**
11-
* The interface for ManagedIdentityClient class.
11+
* The interface for CommonPropertiesClient class.
1212
*/
13-
public interface ManagedIdentityClient {
13+
public interface CommonPropertiesClient {
1414
/**
1515
* Gets Service host.
1616
*
@@ -47,9 +47,9 @@ public interface ManagedIdentityClient {
4747
Duration getDefaultPollInterval();
4848

4949
/**
50-
* Gets the ManagedIdentityTrackedResourcesClient object to access its operations.
50+
* Gets the ManagedIdentitiesClient object to access its operations.
5151
*
52-
* @return the ManagedIdentityTrackedResourcesClient object.
52+
* @return the ManagedIdentitiesClient object.
5353
*/
54-
ManagedIdentityTrackedResourcesClient getManagedIdentityTrackedResources();
54+
ManagedIdentitiesClient getManagedIdentities();
5555
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

5-
package com.azure.resourcemanager.models.commontypes.managedidentity.fluent;
5+
package com.azure.resourcemanager.commonproperties.fluent;
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
99
import com.azure.core.http.rest.Response;
1010
import com.azure.core.util.Context;
11-
import com.azure.resourcemanager.models.commontypes.managedidentity.fluent.models.ManagedIdentityTrackedResourceInner;
11+
import com.azure.resourcemanager.commonproperties.fluent.models.ManagedIdentityTrackedResourceInner;
1212

1313
/**
14-
* An instance of this class provides access to all the operations defined in ManagedIdentityTrackedResourcesClient.
14+
* An instance of this class provides access to all the operations defined in ManagedIdentitiesClient.
1515
*/
16-
public interface ManagedIdentityTrackedResourcesClient {
16+
public interface ManagedIdentitiesClient {
1717
/**
1818
* Get a ManagedIdentityTrackedResource.
1919
*
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

5-
package com.azure.resourcemanager.models.commontypes.managedidentity.fluent.models;
5+
package com.azure.resourcemanager.commonproperties.fluent.models;
66

77
import com.azure.core.annotation.Fluent;
88
import com.azure.core.management.Resource;
99
import com.azure.core.management.SystemData;
1010
import com.azure.json.JsonReader;
1111
import com.azure.json.JsonToken;
1212
import com.azure.json.JsonWriter;
13-
import com.azure.resourcemanager.models.commontypes.managedidentity.models.ManagedIdentityTrackedResourceProperties;
14-
import com.azure.resourcemanager.models.commontypes.managedidentity.models.ManagedServiceIdentity;
13+
import com.azure.resourcemanager.commonproperties.models.ManagedIdentityTrackedResourceProperties;
14+
import com.azure.resourcemanager.commonproperties.models.ManagedServiceIdentity;
1515
import java.io.IOException;
1616
import java.util.Map;
1717

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
/**
6-
* Package containing the data models for ManagedIdentity.
6+
* Package containing the inner data models for CommonProperties.
77
* Arm Managed Identity Provider management API.
88
*/
9-
package com.azure.resourcemanager.models.commontypes.managedidentity.models;
9+
package com.azure.resourcemanager.commonproperties.fluent.models;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
/**
6-
* Package containing the classes for ManagedIdentity.
6+
* Package containing the service clients for CommonProperties.
77
* Arm Managed Identity Provider management API.
88
*/
9-
package com.azure.resourcemanager.models.commontypes.managedidentity;
9+
package com.azure.resourcemanager.commonproperties.fluent;
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License.
33
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

5-
package com.azure.resourcemanager.models.commontypes.managedidentity.implementation;
5+
package com.azure.resourcemanager.commonproperties.implementation;
66

77
import com.azure.core.annotation.ServiceClientBuilder;
88
import com.azure.core.http.HttpPipeline;
@@ -15,10 +15,10 @@
1515
import java.time.Duration;
1616

1717
/**
18-
* A builder for creating a new instance of the ManagedIdentityClientImpl type.
18+
* A builder for creating a new instance of the CommonPropertiesClientImpl type.
1919
*/
20-
@ServiceClientBuilder(serviceClients = { ManagedIdentityClientImpl.class })
21-
public final class ManagedIdentityClientBuilder {
20+
@ServiceClientBuilder(serviceClients = { CommonPropertiesClientImpl.class })
21+
public final class CommonPropertiesClientBuilder {
2222
/*
2323
* Service host
2424
*/
@@ -28,9 +28,9 @@ public final class ManagedIdentityClientBuilder {
2828
* Sets Service host.
2929
*
3030
* @param endpoint the endpoint value.
31-
* @return the ManagedIdentityClientBuilder.
31+
* @return the CommonPropertiesClientBuilder.
3232
*/
33-
public ManagedIdentityClientBuilder endpoint(String endpoint) {
33+
public CommonPropertiesClientBuilder endpoint(String endpoint) {
3434
this.endpoint = endpoint;
3535
return this;
3636
}
@@ -44,9 +44,9 @@ public ManagedIdentityClientBuilder endpoint(String endpoint) {
4444
* Sets The ID of the target subscription. The value must be an UUID.
4545
*
4646
* @param subscriptionId the subscriptionId value.
47-
* @return the ManagedIdentityClientBuilder.
47+
* @return the CommonPropertiesClientBuilder.
4848
*/
49-
public ManagedIdentityClientBuilder subscriptionId(String subscriptionId) {
49+
public CommonPropertiesClientBuilder subscriptionId(String subscriptionId) {
5050
this.subscriptionId = subscriptionId;
5151
return this;
5252
}
@@ -60,9 +60,9 @@ public ManagedIdentityClientBuilder subscriptionId(String subscriptionId) {
6060
* Sets The environment to connect to.
6161
*
6262
* @param environment the environment value.
63-
* @return the ManagedIdentityClientBuilder.
63+
* @return the CommonPropertiesClientBuilder.
6464
*/
65-
public ManagedIdentityClientBuilder environment(AzureEnvironment environment) {
65+
public CommonPropertiesClientBuilder environment(AzureEnvironment environment) {
6666
this.environment = environment;
6767
return this;
6868
}
@@ -76,9 +76,9 @@ public ManagedIdentityClientBuilder environment(AzureEnvironment environment) {
7676
* Sets The HTTP pipeline to send requests through.
7777
*
7878
* @param pipeline the pipeline value.
79-
* @return the ManagedIdentityClientBuilder.
79+
* @return the CommonPropertiesClientBuilder.
8080
*/
81-
public ManagedIdentityClientBuilder pipeline(HttpPipeline pipeline) {
81+
public CommonPropertiesClientBuilder pipeline(HttpPipeline pipeline) {
8282
this.pipeline = pipeline;
8383
return this;
8484
}
@@ -92,9 +92,9 @@ public ManagedIdentityClientBuilder pipeline(HttpPipeline pipeline) {
9292
* Sets The default poll interval for long-running operation.
9393
*
9494
* @param defaultPollInterval the defaultPollInterval value.
95-
* @return the ManagedIdentityClientBuilder.
95+
* @return the CommonPropertiesClientBuilder.
9696
*/
97-
public ManagedIdentityClientBuilder defaultPollInterval(Duration defaultPollInterval) {
97+
public CommonPropertiesClientBuilder defaultPollInterval(Duration defaultPollInterval) {
9898
this.defaultPollInterval = defaultPollInterval;
9999
return this;
100100
}
@@ -108,19 +108,19 @@ public ManagedIdentityClientBuilder defaultPollInterval(Duration defaultPollInte
108108
* Sets The serializer to serialize an object into a string.
109109
*
110110
* @param serializerAdapter the serializerAdapter value.
111-
* @return the ManagedIdentityClientBuilder.
111+
* @return the CommonPropertiesClientBuilder.
112112
*/
113-
public ManagedIdentityClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
113+
public CommonPropertiesClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
114114
this.serializerAdapter = serializerAdapter;
115115
return this;
116116
}
117117

118118
/**
119-
* Builds an instance of ManagedIdentityClientImpl with the provided parameters.
119+
* Builds an instance of CommonPropertiesClientImpl with the provided parameters.
120120
*
121-
* @return an instance of ManagedIdentityClientImpl.
121+
* @return an instance of CommonPropertiesClientImpl.
122122
*/
123-
public ManagedIdentityClientImpl buildClient() {
123+
public CommonPropertiesClientImpl buildClient() {
124124
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
125125
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
126126
HttpPipeline localPipeline = (pipeline != null)
@@ -131,7 +131,7 @@ public ManagedIdentityClientImpl buildClient() {
131131
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
132132
? serializerAdapter
133133
: SerializerFactory.createDefaultManagementSerializerAdapter();
134-
ManagedIdentityClientImpl client = new ManagedIdentityClientImpl(localPipeline, localSerializerAdapter,
134+
CommonPropertiesClientImpl client = new CommonPropertiesClientImpl(localPipeline, localSerializerAdapter,
135135
localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
136136
return client;
137137
}

0 commit comments

Comments
 (0)