Skip to content

Commit 9f0155e

Browse files
[AutoPR azure-resourcemanager-netapp]-generated-from-SDK Generation - Java-5627710 (#47414)
* Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: 'fa4de8af2faa4a809027619c6ec8ed45b1e0a761' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5627710 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: '2ec4c94bd944ea1230297b26ba6bbfa94becdcce' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5631309 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Configurations: 'specification/netapp/resource-manager/Microsoft.NetApp/NetApp/tspconfig.yaml', API Version: 2025-09-01-preview, SDK Release Type: beta, and CommitSHA: '29c080bf3c463cb98a563e959cacf6d7f128fcad' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5637666 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --------- Co-authored-by: Weidong Xu <[email protected]>
1 parent 795bfab commit 9f0155e

File tree

193 files changed

+1972
-1866
lines changed

Some content is hidden

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

193 files changed

+1972
-1866
lines changed

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 2.1.0-beta.1 (2025-11-28)
3+
## 2.1.0-beta.1 (2025-12-04)
44

55
- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

@@ -238,6 +238,8 @@
238238

239239
* `models.ElasticBackupVaultProperties` was added
240240

241+
* `models.CachePropertiesExportPolicy` was added
242+
241243
* `models.ElasticBackupPolicy$DefinitionStages` was added
242244

243245
* `models.ElasticNfsv4Access` was added
@@ -376,46 +378,46 @@
376378

377379
#### `models.Volume$Definition` was modified
378380

379-
* `withLdapServerType(models.LdapServerType)` was added
380381
* `withBreakthroughMode(models.BreakthroughMode)` was added
381382
* `withLargeVolumeType(models.LargeVolumeType)` was added
382383
* `withLanguage(models.VolumeLanguage)` was added
384+
* `withLdapServerType(models.LdapServerType)` was added
383385

384386
#### `models.ReplicationObject` was modified
385387

386-
* `mirrorState()` was added
388+
* `relationshipStatus()` was added
387389
* `externalReplicationSetupInfo()` was added
388390
* `externalReplicationSetupStatus()` was added
389-
* `relationshipStatus()` was added
391+
* `mirrorState()` was added
390392

391393
#### `models.NetAppAccountPatch` was modified
392394

393-
* `ldapConfiguration()` was added
394395
* `withLdapConfiguration(models.LdapConfiguration)` was added
396+
* `ldapConfiguration()` was added
395397

396398
#### `models.NetAppAccount$Update` was modified
397399

398400
* `withLdapConfiguration(models.LdapConfiguration)` was added
399401

400402
#### `models.VolumeGroupVolumeProperties` was modified
401403

402-
* `language()` was added
403404
* `withLargeVolumeType(models.LargeVolumeType)` was added
404-
* `withBreakthroughMode(models.BreakthroughMode)` was added
405+
* `ldapServerType()` was added
406+
* `largeVolumeType()` was added
405407
* `withLanguage(models.VolumeLanguage)` was added
406408
* `breakthroughMode()` was added
407-
* `ldapServerType()` was added
409+
* `language()` was added
410+
* `withBreakthroughMode(models.BreakthroughMode)` was added
408411
* `withLdapServerType(models.LdapServerType)` was added
409-
* `largeVolumeType()` was added
410412

411413
#### `models.Volume` was modified
412414

413-
* `largeVolumeType()` was added
415+
* `listQuotaReport(com.azure.core.util.Context)` was added
414416
* `language()` was added
417+
* `largeVolumeType()` was added
418+
* `breakthroughMode()` was added
415419
* `listQuotaReport()` was added
416420
* `ldapServerType()` was added
417-
* `breakthroughMode()` was added
418-
* `listQuotaReport(com.azure.core.util.Context)` was added
419421

420422
#### `models.VolumePropertiesDataProtection` was modified
421423

@@ -424,23 +426,23 @@
424426

425427
#### `NetAppFilesManager` was modified
426428

427-
* `elasticAccounts()` was added
428-
* `ransomwareReports()` was added
429429
* `buckets()` was added
430-
* `elasticSnapshotPolicies()` was added
431430
* `activeDirectoryConfigs()` was added
431+
* `elasticCapacityPools()` was added
432+
* `elasticAccounts()` was added
432433
* `caches()` was added
433-
* `elasticBackupVaults()` was added
434434
* `elasticBackupPolicies()` was added
435-
* `elasticCapacityPools()` was added
435+
* `ransomwareReports()` was added
436+
* `elasticSnapshotPolicies()` was added
436437
* `elasticVolumes()` was added
437-
* `elasticSnapshots()` was added
438438
* `elasticBackups()` was added
439+
* `elasticBackupVaults()` was added
440+
* `elasticSnapshots()` was added
439441

440442
#### `models.VolumePatchPropertiesDataProtection` was modified
441443

442-
* `ransomwareProtection()` was added
443444
* `withRansomwareProtection(models.RansomwareProtectionPatchSettings)` was added
445+
* `ransomwareProtection()` was added
444446

445447
#### `models.Volumes` was modified
446448

sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ public final class CachesPoolChangeSamples {
15421542
### Caches_Update
15431543

15441544
```java
1545-
import com.azure.resourcemanager.netapp.models.CacheUpdate;
1545+
import com.azure.resourcemanager.netapp.models.Cache;
15461546
import com.azure.resourcemanager.netapp.models.CacheUpdateProperties;
15471547

15481548
/**
@@ -1558,10 +1558,10 @@ public final class CachesUpdateSamples {
15581558
* @param manager Entry point to NetAppFilesManager.
15591559
*/
15601560
public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) {
1561-
manager.caches()
1562-
.update("myRG", "account1", "pool1", "cache1",
1563-
new CacheUpdate().withProperties(new CacheUpdateProperties().withSize(214748364800L)),
1564-
com.azure.core.util.Context.NONE);
1561+
Cache resource = manager.caches()
1562+
.getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE)
1563+
.getValue();
1564+
resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply();
15651565
}
15661566
}
15671567
```

sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ CacheInner createOrUpdate(String resourceGroupName, String accountName, String p
136136
* @return the {@link SyncPoller} for polling of cache resource.
137137
*/
138138
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
139-
SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName,
140-
String cacheName, CacheUpdate body);
139+
SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName,
140+
String poolName, String cacheName, CacheUpdate body);
141141

142142
/**
143143
* Patch the specified Cache.
@@ -154,8 +154,8 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String
154154
* @return the {@link SyncPoller} for polling of cache resource.
155155
*/
156156
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
157-
SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName,
158-
String cacheName, CacheUpdate body, Context context);
157+
SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName,
158+
String poolName, String cacheName, CacheUpdate body, Context context);
159159

160160
/**
161161
* Patch the specified Cache.
@@ -168,9 +168,11 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String
168168
* @throws IllegalArgumentException thrown if parameters fail the validation.
169169
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
170170
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
171+
* @return cache resource.
171172
*/
172173
@ServiceMethod(returns = ReturnType.SINGLE)
173-
void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body);
174+
CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName,
175+
CacheUpdate body);
174176

175177
/**
176178
* Patch the specified Cache.
@@ -184,9 +186,10 @@ SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String
184186
* @throws IllegalArgumentException thrown if parameters fail the validation.
185187
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
186188
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
189+
* @return cache resource.
187190
*/
188191
@ServiceMethod(returns = ReturnType.SINGLE)
189-
void update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body,
192+
CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body,
190193
Context context);
191194

192195
/**

sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import com.azure.resourcemanager.netapp.fluent.models.CacheInner;
1212
import com.azure.resourcemanager.netapp.models.Cache;
1313
import com.azure.resourcemanager.netapp.models.CacheProperties;
14+
import com.azure.resourcemanager.netapp.models.CacheUpdate;
15+
import com.azure.resourcemanager.netapp.models.CacheUpdateProperties;
1416
import com.azure.resourcemanager.netapp.models.PeeringPassphrases;
1517
import com.azure.resourcemanager.netapp.models.PoolChangeRequest;
1618
import java.util.Collections;
@@ -96,6 +98,8 @@ private com.azure.resourcemanager.netapp.NetAppFilesManager manager() {
9698

9799
private String cacheName;
98100

101+
private CacheUpdate updateBody;
102+
99103
public CacheImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) {
100104
this.resourceGroupName = resourceGroupName;
101105
this.accountName = accountName;
@@ -124,20 +128,21 @@ public Cache create(Context context) {
124128
}
125129

126130
public CacheImpl update() {
131+
this.updateBody = new CacheUpdate();
127132
return this;
128133
}
129134

130135
public Cache apply() {
131136
this.innerObject = serviceManager.serviceClient()
132137
.getCaches()
133-
.createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), Context.NONE);
138+
.update(resourceGroupName, accountName, poolName, cacheName, updateBody, Context.NONE);
134139
return this;
135140
}
136141

137142
public Cache apply(Context context) {
138143
this.innerObject = serviceManager.serviceClient()
139144
.getCaches()
140-
.createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), context);
145+
.update(resourceGroupName, accountName, poolName, cacheName, updateBody, context);
141146
return this;
142147
}
143148

@@ -199,12 +204,26 @@ public CacheImpl withProperties(CacheProperties properties) {
199204
}
200205

201206
public CacheImpl withTags(Map<String, String> tags) {
202-
this.innerModel().withTags(tags);
203-
return this;
207+
if (isInCreateMode()) {
208+
this.innerModel().withTags(tags);
209+
return this;
210+
} else {
211+
this.updateBody.withTags(tags);
212+
return this;
213+
}
204214
}
205215

206216
public CacheImpl withZones(List<String> zones) {
207217
this.innerModel().withZones(zones);
208218
return this;
209219
}
220+
221+
public CacheImpl withProperties(CacheUpdateProperties properties) {
222+
this.updateBody.withProperties(properties);
223+
return this;
224+
}
225+
226+
private boolean isInCreateMode() {
227+
return this.innerModel() == null || this.innerModel().id() == null;
228+
}
210229
}

sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -812,12 +812,12 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String
812812
* @return the {@link PollerFlux} for polling of cache resource.
813813
*/
814814
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
815-
private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(String resourceGroupName, String accountName,
816-
String poolName, String cacheName, CacheUpdate body) {
815+
private PollerFlux<PollResult<CacheInner>, CacheInner> beginUpdateAsync(String resourceGroupName,
816+
String accountName, String poolName, String cacheName, CacheUpdate body) {
817817
Mono<Response<Flux<ByteBuffer>>> mono
818818
= updateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body);
819-
return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
820-
this.client.getContext());
819+
return this.client.<CacheInner, CacheInner>getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class,
820+
CacheInner.class, this.client.getContext());
821821
}
822822

823823
/**
@@ -834,10 +834,11 @@ private PollerFlux<PollResult<Void>, Void> beginUpdateAsync(String resourceGroup
834834
* @return the {@link SyncPoller} for polling of cache resource.
835835
*/
836836
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
837-
public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName,
838-
String cacheName, CacheUpdate body) {
837+
public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName,
838+
String poolName, String cacheName, CacheUpdate body) {
839839
Response<BinaryData> response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body);
840-
return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE);
840+
return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class,
841+
Context.NONE);
841842
}
842843

843844
/**
@@ -855,11 +856,11 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName,
855856
* @return the {@link SyncPoller} for polling of cache resource.
856857
*/
857858
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
858-
public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName, String accountName, String poolName,
859-
String cacheName, CacheUpdate body, Context context) {
859+
public SyncPoller<PollResult<CacheInner>, CacheInner> beginUpdate(String resourceGroupName, String accountName,
860+
String poolName, String cacheName, CacheUpdate body, Context context) {
860861
Response<BinaryData> response
861862
= updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context);
862-
return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context);
863+
return this.client.<CacheInner, CacheInner>getLroResult(response, CacheInner.class, CacheInner.class, context);
863864
}
864865

865866
/**
@@ -876,8 +877,8 @@ public SyncPoller<PollResult<Void>, Void> beginUpdate(String resourceGroupName,
876877
* @return cache resource on successful completion of {@link Mono}.
877878
*/
878879
@ServiceMethod(returns = ReturnType.SINGLE)
879-
private Mono<Void> updateAsync(String resourceGroupName, String accountName, String poolName, String cacheName,
880-
CacheUpdate body) {
880+
private Mono<CacheInner> updateAsync(String resourceGroupName, String accountName, String poolName,
881+
String cacheName, CacheUpdate body) {
881882
return beginUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last()
882883
.flatMap(this.client::getLroFinalResultOrError);
883884
}
@@ -893,11 +894,12 @@ private Mono<Void> updateAsync(String resourceGroupName, String accountName, Str
893894
* @throws IllegalArgumentException thrown if parameters fail the validation.
894895
* @throws ManagementException thrown if the request is rejected by server.
895896
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
897+
* @return cache resource.
896898
*/
897899
@ServiceMethod(returns = ReturnType.SINGLE)
898-
public void update(String resourceGroupName, String accountName, String poolName, String cacheName,
900+
public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName,
899901
CacheUpdate body) {
900-
beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult();
902+
return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult();
901903
}
902904

903905
/**
@@ -912,11 +914,12 @@ public void update(String resourceGroupName, String accountName, String poolName
912914
* @throws IllegalArgumentException thrown if parameters fail the validation.
913915
* @throws ManagementException thrown if the request is rejected by server.
914916
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
917+
* @return cache resource.
915918
*/
916919
@ServiceMethod(returns = ReturnType.SINGLE)
917-
public void update(String resourceGroupName, String accountName, String poolName, String cacheName,
920+
public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName,
918921
CacheUpdate body, Context context) {
919-
beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult();
922+
return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult();
920923
}
921924

922925
/**

sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.azure.resourcemanager.netapp.fluent.models.CacheInner;
1414
import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner;
1515
import com.azure.resourcemanager.netapp.models.Cache;
16-
import com.azure.resourcemanager.netapp.models.CacheUpdate;
1716
import com.azure.resourcemanager.netapp.models.Caches;
1817
import com.azure.resourcemanager.netapp.models.PeeringPassphrases;
1918
import com.azure.resourcemanager.netapp.models.PoolChangeRequest;
@@ -51,16 +50,6 @@ public Cache get(String resourceGroupName, String accountName, String poolName,
5150
}
5251
}
5352

54-
public void update(String resourceGroupName, String accountName, String poolName, String cacheName,
55-
CacheUpdate body) {
56-
this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body);
57-
}
58-
59-
public void update(String resourceGroupName, String accountName, String poolName, String cacheName,
60-
CacheUpdate body, Context context) {
61-
this.serviceClient().update(resourceGroupName, accountName, poolName, cacheName, body, context);
62-
}
63-
6453
public void delete(String resourceGroupName, String accountName, String poolName, String cacheName) {
6554
this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName);
6655
}

sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@ interface WithTags {
273273
*/
274274
interface WithProperties {
275275
/**
276-
* Specifies the properties property: Cache properties.
276+
* Specifies the properties property: The resource-specific properties for this resource..
277277
*
278-
* @param properties Cache properties.
278+
* @param properties The resource-specific properties for this resource.
279279
* @return the next definition stage.
280280
*/
281-
Update withProperties(CacheProperties properties);
281+
Update withProperties(CacheUpdateProperties properties);
282282
}
283283
}
284284

0 commit comments

Comments
 (0)