Skip to content

Commit 821669f

Browse files
Merge remote-tracking branch 'upstream/main' into wangamber/transcription
2 parents d853705 + 9f0155e commit 821669f

File tree

196 files changed

+1914
-1873
lines changed

Some content is hidden

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

196 files changed

+1914
-1873
lines changed

eng/common/scripts/Verify-ChangeLogs.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ Set-StrictMode -Version 3
1111

1212
function ShouldVerifyChangeLog ($PkgArtifactDetails) {
1313
if ($PkgArtifactDetails) {
14-
if ($PkgArtifactDetails.PSObject.Properties["skipVerifyChangeLog"] -eq $true) {
15-
return $false
14+
if ($PkgArtifactDetails.PSObject.Properties.Name -contains "skipVerifyChangeLog") {
15+
if ($PkgArtifactDetails.skipVerifyChangeLog) {
16+
return $false
17+
}
1618
}
1719

1820
return $true

eng/emitter-package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/emitter-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"main": "dist/src/index.js",
33
"dependencies": {
4-
"@azure-tools/typespec-java": "0.37.1"
4+
"@azure-tools/typespec-java": "0.37.2"
55
},
66
"devDependencies": {
77
"@azure-tools/typespec-autorest": "0.62.0",

eng/scripts/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
3+
trigger:
4+
branches:
5+
include:
6+
- main
7+
- feature/*
8+
- release/*
9+
- hotfix/*
10+
paths:
11+
include:
12+
- eng/scripts/*
13+
exclude:
14+
- eng/scripts/typespec
15+
16+
pr:
17+
branches:
18+
include:
19+
- main
20+
- feature/*
21+
- release/*
22+
- hotfix/*
23+
paths:
24+
include:
25+
- eng/scripts/*
26+
27+
extends:
28+
template: /eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml
29+
parameters:
30+
TargetDirectory: eng/scripts/
31+
TargetTags: 'UnitTest'

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
}

0 commit comments

Comments
 (0)