|
2 | 2 | // Licensed under the MIT License. |
3 | 3 | // Code generated by Microsoft (R) TypeSpec Code Generator. |
4 | 4 |
|
5 | | -package com.azure.resourcemanager.models.commontypes.managedidentity; |
| 5 | +package com.azure.resourcemanager.commonproperties; |
6 | 6 |
|
7 | 7 | import com.azure.core.credential.TokenCredential; |
8 | 8 | import com.azure.core.http.HttpClient; |
|
23 | 23 | import com.azure.core.management.profile.AzureProfile; |
24 | 24 | import com.azure.core.util.Configuration; |
25 | 25 | 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; |
30 | 30 | import java.time.Duration; |
31 | 31 | import java.time.temporal.ChronoUnit; |
32 | 32 | import java.util.ArrayList; |
|
35 | 35 | import java.util.stream.Collectors; |
36 | 36 |
|
37 | 37 | /** |
38 | | - * Entry point to ManagedIdentityManager. |
| 38 | + * Entry point to CommonPropertiesManager. |
39 | 39 | * Arm Managed Identity Provider management API. |
40 | 40 | */ |
41 | | -public final class ManagedIdentityManager { |
42 | | - private ManagedIdentityTrackedResources managedIdentityTrackedResources; |
| 41 | +public final class CommonPropertiesManager { |
| 42 | + private ManagedIdentities managedIdentities; |
43 | 43 |
|
44 | | - private final ManagedIdentityClient clientObject; |
| 44 | + private final CommonPropertiesClient clientObject; |
45 | 45 |
|
46 | | - private ManagedIdentityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { |
| 46 | + private CommonPropertiesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { |
47 | 47 | Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); |
48 | 48 | Objects.requireNonNull(profile, "'profile' cannot be null."); |
49 | | - this.clientObject = new ManagedIdentityClientBuilder().pipeline(httpPipeline) |
| 49 | + this.clientObject = new CommonPropertiesClientBuilder().pipeline(httpPipeline) |
50 | 50 | .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) |
51 | 51 | .subscriptionId(profile.getSubscriptionId()) |
52 | 52 | .defaultPollInterval(defaultPollInterval) |
53 | 53 | .buildClient(); |
54 | 54 | } |
55 | 55 |
|
56 | 56 | /** |
57 | | - * Creates an instance of ManagedIdentity service API entry point. |
| 57 | + * Creates an instance of CommonProperties service API entry point. |
58 | 58 | * |
59 | 59 | * @param credential the credential to use. |
60 | 60 | * @param profile the Azure profile for client. |
61 | | - * @return the ManagedIdentity service API instance. |
| 61 | + * @return the CommonProperties service API instance. |
62 | 62 | */ |
63 | | - public static ManagedIdentityManager authenticate(TokenCredential credential, AzureProfile profile) { |
| 63 | + public static CommonPropertiesManager authenticate(TokenCredential credential, AzureProfile profile) { |
64 | 64 | Objects.requireNonNull(credential, "'credential' cannot be null."); |
65 | 65 | Objects.requireNonNull(profile, "'profile' cannot be null."); |
66 | 66 | return configure().authenticate(credential, profile); |
67 | 67 | } |
68 | 68 |
|
69 | 69 | /** |
70 | | - * Creates an instance of ManagedIdentity service API entry point. |
| 70 | + * Creates an instance of CommonProperties service API entry point. |
71 | 71 | * |
72 | 72 | * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. |
73 | 73 | * @param profile the Azure profile for client. |
74 | | - * @return the ManagedIdentity service API instance. |
| 74 | + * @return the CommonProperties service API instance. |
75 | 75 | */ |
76 | | - public static ManagedIdentityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { |
| 76 | + public static CommonPropertiesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { |
77 | 77 | Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); |
78 | 78 | Objects.requireNonNull(profile, "'profile' cannot be null."); |
79 | | - return new ManagedIdentityManager(httpPipeline, profile, null); |
| 79 | + return new CommonPropertiesManager(httpPipeline, profile, null); |
80 | 80 | } |
81 | 81 |
|
82 | 82 | /** |
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. |
84 | 84 | * |
85 | 85 | * @return the Configurable instance allowing configurations. |
86 | 86 | */ |
87 | 87 | public static Configurable configure() { |
88 | | - return new ManagedIdentityManager.Configurable(); |
| 88 | + return new CommonPropertiesManager.Configurable(); |
89 | 89 | } |
90 | 90 |
|
91 | 91 | /** |
@@ -190,20 +190,20 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { |
190 | 190 | } |
191 | 191 |
|
192 | 192 | /** |
193 | | - * Creates an instance of ManagedIdentity service API entry point. |
| 193 | + * Creates an instance of CommonProperties service API entry point. |
194 | 194 | * |
195 | 195 | * @param credential the credential to use. |
196 | 196 | * @param profile the Azure profile for client. |
197 | | - * @return the ManagedIdentity service API instance. |
| 197 | + * @return the CommonProperties service API instance. |
198 | 198 | */ |
199 | | - public ManagedIdentityManager authenticate(TokenCredential credential, AzureProfile profile) { |
| 199 | + public CommonPropertiesManager authenticate(TokenCredential credential, AzureProfile profile) { |
200 | 200 | Objects.requireNonNull(credential, "'credential' cannot be null."); |
201 | 201 | Objects.requireNonNull(profile, "'profile' cannot be null."); |
202 | 202 |
|
203 | 203 | StringBuilder userAgentBuilder = new StringBuilder(); |
204 | 204 | userAgentBuilder.append("azsdk-java") |
205 | 205 | .append("-") |
206 | | - .append("com.azure.resourcemanager.models.commontypes.managedidentity") |
| 206 | + .append("com.azure.resourcemanager.commonproperties") |
207 | 207 | .append("/") |
208 | 208 | .append("1.0.0-beta.1"); |
209 | 209 | if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { |
@@ -247,30 +247,29 @@ public ManagedIdentityManager authenticate(TokenCredential credential, AzureProf |
247 | 247 | HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) |
248 | 248 | .policies(policies.toArray(new HttpPipelinePolicy[0])) |
249 | 249 | .build(); |
250 | | - return new ManagedIdentityManager(httpPipeline, profile, defaultPollInterval); |
| 250 | + return new CommonPropertiesManager(httpPipeline, profile, defaultPollInterval); |
251 | 251 | } |
252 | 252 | } |
253 | 253 |
|
254 | 254 | /** |
255 | | - * Gets the resource collection API of ManagedIdentityTrackedResources. It manages ManagedIdentityTrackedResource. |
| 255 | + * Gets the resource collection API of ManagedIdentities. It manages ManagedIdentityTrackedResource. |
256 | 256 | * |
257 | | - * @return Resource collection API of ManagedIdentityTrackedResources. |
| 257 | + * @return Resource collection API of ManagedIdentities. |
258 | 258 | */ |
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); |
263 | 262 | } |
264 | | - return managedIdentityTrackedResources; |
| 263 | + return managedIdentities; |
265 | 264 | } |
266 | 265 |
|
267 | 266 | /** |
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 |
269 | 268 | * implementation, based on Azure REST API. |
270 | 269 | * |
271 | | - * @return Wrapped service client ManagedIdentityClient. |
| 270 | + * @return Wrapped service client CommonPropertiesClient. |
272 | 271 | */ |
273 | | - public ManagedIdentityClient serviceClient() { |
| 272 | + public CommonPropertiesClient serviceClient() { |
274 | 273 | return this.clientObject; |
275 | 274 | } |
276 | 275 | } |
0 commit comments