Skip to content

Commit 85beb87

Browse files
[Redis] Migrate SDK to TypeSpec (#48659)
* Regenerate Redis SDK from TypeSpec, add revapi suppressions - Regenerated SDK code from TypeSpec - Added module-info.java opens for implementation.models - Added revapi suppressions for: - Read-only model constructors made private - Read-only model setters removed - OperationStatusResult setters visibility reduced - Pageable ListResult classes moved to implementation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Regenerate Redis SDK with alternateType fix for percentComplete Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Regenerate Redis SDK - all revapi checks pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore changelog from main, update tsp-location.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update tsp-location.yaml to specs PR commit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * commit on main * record * fix tsp-location --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 539445c commit 85beb87

148 files changed

Lines changed: 4637 additions & 3138 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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,38 @@
13371337
"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)"
13381338
},
13391339
"justification": "Pageable models moved to implementation package. Unlikely used by user."
1340+
},
1341+
{
1342+
"code": "java.method.visibilityReduced",
1343+
"old" : {
1344+
"matcher": "regex",
1345+
"match": "method void com\\.azure\\.resourcemanager\\.redis\\.models\\.(OperationDisplay|RedisInstanceDetails|RedisLinkedServer)::\\<init\\>\\(\\)"
1346+
},
1347+
"justification": "Output-only immutable models' constructors are now private."
1348+
},
1349+
{
1350+
"code": "java.method.removed",
1351+
"old" : {
1352+
"matcher": "regex",
1353+
"match": "method .* com\\.azure\\.resourcemanager\\.redis\\.models\\.OperationDisplay\\:\\:with.*\\(.*\\).*"
1354+
},
1355+
"justification": "Output-only immutable models' setters are removed if no explicit usage."
1356+
},
1357+
{
1358+
"code": "java.method.visibilityReduced",
1359+
"old" : {
1360+
"matcher": "regex",
1361+
"match": "method .* com\\.azure\\.resourcemanager\\.redis\\.models\\.OperationStatusResult\\:\\:with.*\\(.*\\).*"
1362+
},
1363+
"justification": "Output-only immutable models' setters are now package-private if it's being used by child class."
1364+
},
1365+
{
1366+
"code": "java.class.removed",
1367+
"old" : {
1368+
"matcher": "regex",
1369+
"match": "class com\\.azure\\.resourcemanager\\.redis\\.models\\.(OperationListResult|RedisListResult|RedisCacheAccessPolicyAssignmentList|RedisFirewallRuleListResult|RedisPatchScheduleListResult|RedisCacheAccessPolicyList|PrivateLinkResourceListResult|NotificationListResponse|PrivateEndpointConnectionListResult|RedisLinkedServerWithPropertiesList)"
1370+
},
1371+
"justification": "Pageable models moved to implementation package. Unlikely used by user."
13401372
}
13411373
]
13421374
}

sdk/redis/azure-resourcemanager-redis/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-redis</artifactId>
21-
<version>2.53.1</version>
21+
<version>2.54.0-beta.1</version>
2222
</dependency>
2323
```
2424
[//]: # ({x-version-update-end})

sdk/redis/azure-resourcemanager-redis/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/redis/azure-resourcemanager-redis",
5-
"Tag": "java/redis/azure-resourcemanager-redis_4829c91ebd"
5+
"Tag": "java/redis/azure-resourcemanager-redis_c14ea1781b"
66
}

sdk/redis/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/fluent/AccessPoliciesClient.java

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
44

55
package com.azure.resourcemanager.redis.fluent;
66

@@ -22,6 +22,67 @@
2222
* An instance of this class provides access to all the operations defined in AccessPoliciesClient.
2323
*/
2424
public interface AccessPoliciesClient {
25+
/**
26+
* Gets the detailed information about an access policy of a redis cache.
27+
*
28+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
29+
* @param cacheName The name of the Redis cache.
30+
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
31+
* @throws IllegalArgumentException thrown if parameters fail the validation.
32+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
33+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
34+
* @return the detailed information about an access policy of a redis cache along with {@link Response} on
35+
* successful completion of {@link Mono}.
36+
*/
37+
@ServiceMethod(returns = ReturnType.SINGLE)
38+
Mono<Response<RedisCacheAccessPolicyInner>> getWithResponseAsync(String resourceGroupName, String cacheName,
39+
String accessPolicyName);
40+
41+
/**
42+
* Gets the detailed information about an access policy of a redis cache.
43+
*
44+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
45+
* @param cacheName The name of the Redis cache.
46+
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
47+
* @throws IllegalArgumentException thrown if parameters fail the validation.
48+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
49+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
50+
* @return the detailed information about an access policy of a redis cache on successful completion of
51+
* {@link Mono}.
52+
*/
53+
@ServiceMethod(returns = ReturnType.SINGLE)
54+
Mono<RedisCacheAccessPolicyInner> getAsync(String resourceGroupName, String cacheName, String accessPolicyName);
55+
56+
/**
57+
* Gets the detailed information about an access policy of a redis cache.
58+
*
59+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
60+
* @param cacheName The name of the Redis cache.
61+
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
62+
* @param context The context to associate with this operation.
63+
* @throws IllegalArgumentException thrown if parameters fail the validation.
64+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
65+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
66+
* @return the detailed information about an access policy of a redis cache along with {@link Response}.
67+
*/
68+
@ServiceMethod(returns = ReturnType.SINGLE)
69+
Response<RedisCacheAccessPolicyInner> getWithResponse(String resourceGroupName, String cacheName,
70+
String accessPolicyName, Context context);
71+
72+
/**
73+
* Gets the detailed information about an access policy of a redis cache.
74+
*
75+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
76+
* @param cacheName The name of the Redis cache.
77+
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
78+
* @throws IllegalArgumentException thrown if parameters fail the validation.
79+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
80+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
81+
* @return the detailed information about an access policy of a redis cache.
82+
*/
83+
@ServiceMethod(returns = ReturnType.SINGLE)
84+
RedisCacheAccessPolicyInner get(String resourceGroupName, String cacheName, String accessPolicyName);
85+
2586
/**
2687
* Adds an access policy to the redis cache.
2788
*
@@ -238,67 +299,6 @@ SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String
238299
@ServiceMethod(returns = ReturnType.SINGLE)
239300
void delete(String resourceGroupName, String cacheName, String accessPolicyName, Context context);
240301

241-
/**
242-
* Gets the detailed information about an access policy of a redis cache.
243-
*
244-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
245-
* @param cacheName The name of the Redis cache.
246-
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
247-
* @throws IllegalArgumentException thrown if parameters fail the validation.
248-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
249-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
250-
* @return the detailed information about an access policy of a redis cache along with {@link Response} on
251-
* successful completion of {@link Mono}.
252-
*/
253-
@ServiceMethod(returns = ReturnType.SINGLE)
254-
Mono<Response<RedisCacheAccessPolicyInner>> getWithResponseAsync(String resourceGroupName, String cacheName,
255-
String accessPolicyName);
256-
257-
/**
258-
* Gets the detailed information about an access policy of a redis cache.
259-
*
260-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
261-
* @param cacheName The name of the Redis cache.
262-
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
263-
* @throws IllegalArgumentException thrown if parameters fail the validation.
264-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
265-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
266-
* @return the detailed information about an access policy of a redis cache on successful completion of
267-
* {@link Mono}.
268-
*/
269-
@ServiceMethod(returns = ReturnType.SINGLE)
270-
Mono<RedisCacheAccessPolicyInner> getAsync(String resourceGroupName, String cacheName, String accessPolicyName);
271-
272-
/**
273-
* Gets the detailed information about an access policy of a redis cache.
274-
*
275-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
276-
* @param cacheName The name of the Redis cache.
277-
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
278-
* @param context The context to associate with this operation.
279-
* @throws IllegalArgumentException thrown if parameters fail the validation.
280-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
281-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
282-
* @return the detailed information about an access policy of a redis cache along with {@link Response}.
283-
*/
284-
@ServiceMethod(returns = ReturnType.SINGLE)
285-
Response<RedisCacheAccessPolicyInner> getWithResponse(String resourceGroupName, String cacheName,
286-
String accessPolicyName, Context context);
287-
288-
/**
289-
* Gets the detailed information about an access policy of a redis cache.
290-
*
291-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
292-
* @param cacheName The name of the Redis cache.
293-
* @param accessPolicyName The name of the access policy that is being added to the Redis cache.
294-
* @throws IllegalArgumentException thrown if parameters fail the validation.
295-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
296-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
297-
* @return the detailed information about an access policy of a redis cache.
298-
*/
299-
@ServiceMethod(returns = ReturnType.SINGLE)
300-
RedisCacheAccessPolicyInner get(String resourceGroupName, String cacheName, String accessPolicyName);
301-
302302
/**
303303
* Gets the list of access policies associated with this redis cache.
304304
*

0 commit comments

Comments
 (0)