Skip to content

Commit 57b8843

Browse files
[Compute] Migrate SDK to generate from TypeSpec (#48646)
1 parent 4dff0cf commit 57b8843

1,125 files changed

Lines changed: 38798 additions & 24456 deletions

File tree

Some content is hidden

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

eng/lintingconfigs/revapi/track2/revapi.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,46 @@
12971297
"match": "class com\\.azure\\.resourcemanager\\.containerinstance\\.models\\.(CachedImagesListResult|CapabilitiesListResult|ContainerGroupListResult|OperationListResult|UsageListResult)"
12981298
},
12991299
"justification": "Pageable models moved to implementation package. Unlikely used by user."
1300+
},
1301+
{
1302+
"code": "java.method.visibilityReduced",
1303+
"old" : {
1304+
"matcher": "regex",
1305+
"match": "method void com\\.azure\\.resourcemanager\\.compute\\.models\\..*\\:\\:\\<init\\>\\(\\)"
1306+
},
1307+
"justification": "Output-only immutable models constructors are now private."
1308+
},
1309+
{
1310+
"code": "java.method.visibilityReduced",
1311+
"old" : {
1312+
"matcher": "regex",
1313+
"match": "method .* com\\.azure\\.resourcemanager\\.compute\\.models\\..*\\:\\:with.*\\(.*\\).*"
1314+
},
1315+
"justification": "Output-only immutable models setters are now package-private if being used by child class."
1316+
},
1317+
{
1318+
"code": "java.method.removed",
1319+
"old" : {
1320+
"matcher": "regex",
1321+
"match": "method .* com\\.azure\\.resourcemanager\\.compute\\.models\\..*\\:\\:with.*\\(.*\\).*"
1322+
},
1323+
"justification": "Output-only immutable models setters are removed if no explicit usage."
1324+
},
1325+
{
1326+
"code": "java.class.removed",
1327+
"old" : {
1328+
"matcher": "regex",
1329+
"match": "class com\\.azure\\.resourcemanager\\.compute\\.models\\.(AvailabilitySetListResult|CapacityReservationGroupListResult|CapacityReservationListResult|CloudServiceListResult|CloudServiceRoleListResult|DedicatedHostGroupListResult|DedicatedHostListResult|DedicatedHostSizeListResult|ImageListResult|ListUsagesResult|OSFamilyListResult|OSVersionListResult|OperationListResult|PrivateEndpointConnectionListResult|ProximityPlacementGroupListResult|ResourceSkusResult|RestorePointCollectionListResult|RoleInstanceListResult|RunCommandListResult|SshPublicKeysGroupListResult|UpdateDomainListResult|VirtualMachineListResult|VirtualMachineRunCommandsListResult|VirtualMachineScaleSetExtensionListResult|VirtualMachineScaleSetListResult|VirtualMachineScaleSetListSkusResult|VirtualMachineScaleSetListWithLinkResult|VirtualMachineScaleSetVMListResult|VirtualMachineSizeListResult)"
1330+
},
1331+
"justification": "Pageable models moved to implementation package. Unlikely used by user."
1332+
},
1333+
{
1334+
"code": "java.class.removed",
1335+
"old" : {
1336+
"matcher": "regex",
1337+
"match": "class com\\.azure\\.resourcemanager\\.compute\\.models\\.(CommunityGalleryImageList|CommunityGalleryImageVersionList|DiskAccessList|DiskEncryptionSetList|DiskList|DiskRestorePointList|GalleryApplicationList|GalleryApplicationVersionList|GalleryImageList|GalleryImageVersionList|GalleryInVMAccessControlProfileList|GalleryInVMAccessControlProfileVersionList|GalleryList|GalleryScriptList|GalleryScriptVersionList|GallerySoftDeletedResourceList|ResourceUriList|SharedGalleryImageList|SharedGalleryImageVersionList|SharedGalleryList|SnapshotList|VirtualMachineScaleSetListOSUpgradeHistory)"
1338+
},
1339+
"justification": "Pageable models moved to implementation package. Unlikely used by user."
13001340
}
13011341
]
13021342
}

sdk/compute/azure-resourcemanager-compute/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
### Breaking Changes
88

9+
#### Changes to `ComputeManagementClient` Class
10+
11+
- Moved `ComputeManager.serviceClient().getCloudServiceRoleInstances()` to `ComputeManager.cloudServiceClient().getCloudServiceRoleInstances()`.
12+
- Moved `ComputeManager.serviceClient().getCloudServiceRoles()` to `ComputeManager.cloudServiceClient().getCloudServiceRoles()`.
13+
- Moved `ComputeManager.serviceClient().getCloudServices()` to `ComputeManager.cloudServiceClient().getCloudServices()`.
14+
- Moved `ComputeManager.serviceClient().getCloudServicesUpdateDomains()` to `ComputeManager.cloudServiceClient().getCloudServicesUpdateDomains()`.
15+
- Moved `ComputeManager.serviceClient().getCloudServiceOperatingSystems()` to `ComputeManager.cloudServiceClient().getCloudServiceOperatingSystems()`.
16+
917
### Bugs Fixed
1018

1119
### Other Changes

sdk/compute/azure-resourcemanager-compute/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
1818
<dependency>
1919
<groupId>com.azure.resourcemanager</groupId>
2020
<artifactId>azure-resourcemanager-compute</artifactId>
21-
<version>2.56.2</version>
21+
<version>2.57.0-beta.1</version>
2222
</dependency>
2323
```
2424
[//]: # ({x-version-update-end})

sdk/compute/azure-resourcemanager-compute/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/compute/azure-resourcemanager-compute",
5-
"Tag": "java/compute/azure-resourcemanager-compute_6a5861292e"
5+
"Tag": "java/compute/azure-resourcemanager-compute_219836a32c"
66
}

sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/ComputeManager.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
import com.azure.core.http.HttpPipeline;
88
import com.azure.core.management.profile.AzureProfile;
99
import com.azure.resourcemanager.authorization.AuthorizationManager;
10+
import com.azure.resourcemanager.compute.fluent.CloudServiceManagementClient;
1011
import com.azure.resourcemanager.compute.fluent.ComputeManagementClient;
1112
import com.azure.resourcemanager.compute.implementation.AvailabilitySetsImpl;
13+
import com.azure.resourcemanager.compute.implementation.CloudServiceManagementClientBuilder;
1214
import com.azure.resourcemanager.compute.implementation.ComputeManagementClientBuilder;
1315
import com.azure.resourcemanager.compute.implementation.ComputeSkusImpl;
1416
import com.azure.resourcemanager.compute.implementation.ComputeUsagesImpl;
@@ -53,6 +55,7 @@ public final class ComputeManager extends Manager<ComputeManagementClient> {
5355
private final StorageManager storageManager;
5456
private final NetworkManager networkManager;
5557
private final AuthorizationManager authorizationManager;
58+
private final CloudServiceManagementClient cloudServiceClient;
5659

5760
// The collections
5861
private AvailabilitySets availabilitySets;
@@ -97,6 +100,15 @@ public AuthorizationManager authorizationManager() {
97100
return authorizationManager;
98101
}
99102

103+
/**
104+
* Gets the cloud service client.
105+
*
106+
* @return the cloud service client
107+
*/
108+
public CloudServiceManagementClient cloudServiceClient() {
109+
return cloudServiceClient;
110+
}
111+
100112
/**
101113
* Get a Configurable instance that can be used to create ComputeManager with optional configuration.
102114
*
@@ -161,6 +173,10 @@ private ComputeManager(HttpPipeline httpPipeline, AzureProfile profile) {
161173
storageManager = StorageManager.authenticate(httpPipeline, profile);
162174
networkManager = NetworkManager.authenticate(httpPipeline, profile);
163175
authorizationManager = AuthorizationManager.authenticate(httpPipeline, profile);
176+
cloudServiceClient = new CloudServiceManagementClientBuilder().pipeline(httpPipeline)
177+
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
178+
.subscriptionId(profile.getSubscriptionId())
179+
.buildClient();
164180
}
165181

166182
/**

0 commit comments

Comments
 (0)