Skip to content

Commit e6a9328

Browse files
authored
mgmt, local generation for Storage - 2025-01-01 (#46366)
* generate codes * update changelog * update test case * update assets.json * remove unused model and update assets.json * rollback fixed test case and update assets.json
1 parent 19cac43 commit e6a9328

File tree

136 files changed

+2079
-347
lines changed

Some content is hidden

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

136 files changed

+2079
-347
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
"dir": "azure-resourcemanager-storage",
266266
"source": "specification/storage/resource-manager/readme.md",
267267
"package": "com.azure.resourcemanager.storage",
268-
"args": "--tag=package-2024-01 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity --enable-sync-stack=false"
268+
"args": "--tag=package-2025-01 --modelerfour.lenient-model-deduplication --rename-model=AllowedMethods:CorsRuleAllowedMethodsItem,AccountType:ActiveDirectoryPropertiesAccountType --property-include-always=EncryptionIdentity.encryptionUserAssignedIdentity --enable-sync-stack=false"
269269
},
270270
"storage-hybrid": {
271271
"dir": "../resourcemanagerhybrid/azure-resourcemanager-storage",

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
## 2.54.0-beta.1 (Unreleased)
44

5-
### Features Added
6-
7-
### Breaking Changes
5+
### Other Changes
86

9-
### Bugs Fixed
7+
#### Dependency Updates
108

11-
### Other Changes
9+
- Updated `api-version` to `2025-01-01`.
1210

1311
## 2.53.1 (2025-08-05)
1412

sdk/resourcemanager/azure-resourcemanager-storage/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/resourcemanager/azure-resourcemanager-storage",
5-
"Tag": "java/resourcemanager/azure-resourcemanager-storage_3df9762af1"
5+
"Tag": "java/resourcemanager/azure-resourcemanager-storage_db3498f65d"
66
}

sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/SkuInformationInner.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.azure.resourcemanager.storage.models.Kind;
1414
import com.azure.resourcemanager.storage.models.Restriction;
1515
import com.azure.resourcemanager.storage.models.SkuCapability;
16+
import com.azure.resourcemanager.storage.models.SkuInformationLocationInfoItem;
1617
import com.azure.resourcemanager.storage.models.SkuName;
1718
import com.azure.resourcemanager.storage.models.SkuTier;
1819
import java.io.IOException;
@@ -50,6 +51,11 @@ public final class SkuInformationInner implements JsonSerializable<SkuInformatio
5051
*/
5152
private List<String> locations;
5253

54+
/*
55+
* The locationInfo property.
56+
*/
57+
private List<SkuInformationLocationInfoItem> locationInfo;
58+
5359
/*
5460
* The capability information in the specified SKU, including file encryption, network ACLs, change notification,
5561
* etc.
@@ -126,6 +132,26 @@ public List<String> locations() {
126132
return this.locations;
127133
}
128134

135+
/**
136+
* Get the locationInfo property: The locationInfo property.
137+
*
138+
* @return the locationInfo value.
139+
*/
140+
public List<SkuInformationLocationInfoItem> locationInfo() {
141+
return this.locationInfo;
142+
}
143+
144+
/**
145+
* Set the locationInfo property: The locationInfo property.
146+
*
147+
* @param locationInfo the locationInfo value to set.
148+
* @return the SkuInformationInner object itself.
149+
*/
150+
public SkuInformationInner withLocationInfo(List<SkuInformationLocationInfoItem> locationInfo) {
151+
this.locationInfo = locationInfo;
152+
return this;
153+
}
154+
129155
/**
130156
* Get the capabilities property: The capability information in the specified SKU, including file encryption,
131157
* network ACLs, change notification, etc.
@@ -168,6 +194,9 @@ public void validate() {
168194
throw LOGGER.atError()
169195
.log(new IllegalArgumentException("Missing required property name in model SkuInformationInner"));
170196
}
197+
if (locationInfo() != null) {
198+
locationInfo().forEach(e -> e.validate());
199+
}
171200
if (capabilities() != null) {
172201
capabilities().forEach(e -> e.validate());
173202
}
@@ -185,6 +214,7 @@ public void validate() {
185214
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
186215
jsonWriter.writeStartObject();
187216
jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString());
217+
jsonWriter.writeArrayField("locationInfo", this.locationInfo, (writer, element) -> writer.writeJson(element));
188218
jsonWriter.writeArrayField("restrictions", this.restrictions, (writer, element) -> writer.writeJson(element));
189219
return jsonWriter.writeEndObject();
190220
}
@@ -216,6 +246,10 @@ public static SkuInformationInner fromJson(JsonReader jsonReader) throws IOExcep
216246
} else if ("locations".equals(fieldName)) {
217247
List<String> locations = reader.readArray(reader1 -> reader1.getString());
218248
deserializedSkuInformationInner.locations = locations;
249+
} else if ("locationInfo".equals(fieldName)) {
250+
List<SkuInformationLocationInfoItem> locationInfo
251+
= reader.readArray(reader1 -> SkuInformationLocationInfoItem.fromJson(reader1));
252+
deserializedSkuInformationInner.locationInfo = locationInfo;
219253
} else if ("capabilities".equals(fieldName)) {
220254
List<SkuCapability> capabilities = reader.readArray(reader1 -> SkuCapability.fromJson(reader1));
221255
deserializedSkuInformationInner.capabilities = capabilities;

sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.azure.resourcemanager.storage.models.AzureFilesIdentityBasedAuthentication;
1616
import com.azure.resourcemanager.storage.models.CustomDomain;
1717
import com.azure.resourcemanager.storage.models.DnsEndpointType;
18+
import com.azure.resourcemanager.storage.models.DualStackEndpointPreference;
1819
import com.azure.resourcemanager.storage.models.Encryption;
1920
import com.azure.resourcemanager.storage.models.Endpoints;
2021
import com.azure.resourcemanager.storage.models.ExtendedLocation;
@@ -27,6 +28,7 @@
2728
import com.azure.resourcemanager.storage.models.LargeFileSharesState;
2829
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
2930
import com.azure.resourcemanager.storage.models.NetworkRuleSet;
31+
import com.azure.resourcemanager.storage.models.Placement;
3032
import com.azure.resourcemanager.storage.models.ProvisioningState;
3133
import com.azure.resourcemanager.storage.models.PublicNetworkAccess;
3234
import com.azure.resourcemanager.storage.models.RoutingPreference;
@@ -63,6 +65,16 @@ public final class StorageAccountInner extends Resource {
6365
*/
6466
private ExtendedLocation extendedLocation;
6567

68+
/*
69+
* Optional. Gets or sets the pinned logical availability zone for the storage account.
70+
*/
71+
private List<String> zones;
72+
73+
/*
74+
* Optional. Gets or sets the zonal placement details for the storage account.
75+
*/
76+
private Placement placement;
77+
6678
/*
6779
* Properties of the storage account.
6880
*/
@@ -147,6 +159,46 @@ public StorageAccountInner withExtendedLocation(ExtendedLocation extendedLocatio
147159
return this;
148160
}
149161

162+
/**
163+
* Get the zones property: Optional. Gets or sets the pinned logical availability zone for the storage account.
164+
*
165+
* @return the zones value.
166+
*/
167+
public List<String> zones() {
168+
return this.zones;
169+
}
170+
171+
/**
172+
* Set the zones property: Optional. Gets or sets the pinned logical availability zone for the storage account.
173+
*
174+
* @param zones the zones value to set.
175+
* @return the StorageAccountInner object itself.
176+
*/
177+
public StorageAccountInner withZones(List<String> zones) {
178+
this.zones = zones;
179+
return this;
180+
}
181+
182+
/**
183+
* Get the placement property: Optional. Gets or sets the zonal placement details for the storage account.
184+
*
185+
* @return the placement value.
186+
*/
187+
public Placement placement() {
188+
return this.placement;
189+
}
190+
191+
/**
192+
* Set the placement property: Optional. Gets or sets the zonal placement details for the storage account.
193+
*
194+
* @param placement the placement value to set.
195+
* @return the StorageAccountInner object itself.
196+
*/
197+
public StorageAccountInner withPlacement(Placement placement) {
198+
this.placement = placement;
199+
return this;
200+
}
201+
150202
/**
151203
* Get the innerProperties property: Properties of the storage account.
152204
*
@@ -578,6 +630,32 @@ public StorageAccountInner withRoutingPreference(RoutingPreference routingPrefer
578630
return this;
579631
}
580632

633+
/**
634+
* Get the dualStackEndpointPreference property: Maintains information about the Internet protocol opted by the
635+
* user.
636+
*
637+
* @return the dualStackEndpointPreference value.
638+
*/
639+
public DualStackEndpointPreference dualStackEndpointPreference() {
640+
return this.innerProperties() == null ? null : this.innerProperties().dualStackEndpointPreference();
641+
}
642+
643+
/**
644+
* Set the dualStackEndpointPreference property: Maintains information about the Internet protocol opted by the
645+
* user.
646+
*
647+
* @param dualStackEndpointPreference the dualStackEndpointPreference value to set.
648+
* @return the StorageAccountInner object itself.
649+
*/
650+
public StorageAccountInner
651+
withDualStackEndpointPreference(DualStackEndpointPreference dualStackEndpointPreference) {
652+
if (this.innerProperties() == null) {
653+
this.innerProperties = new StorageAccountPropertiesInner();
654+
}
655+
this.innerProperties().withDualStackEndpointPreference(dualStackEndpointPreference);
656+
return this;
657+
}
658+
581659
/**
582660
* Get the blobRestoreStatus property: Blob restore status.
583661
*
@@ -907,6 +985,9 @@ public void validate() {
907985
if (extendedLocation() != null) {
908986
extendedLocation().validate();
909987
}
988+
if (placement() != null) {
989+
placement().validate();
990+
}
910991
if (innerProperties() != null) {
911992
innerProperties().validate();
912993
}
@@ -922,6 +1003,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
9221003
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
9231004
jsonWriter.writeJsonField("identity", this.identity);
9241005
jsonWriter.writeJsonField("extendedLocation", this.extendedLocation);
1006+
jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element));
1007+
jsonWriter.writeJsonField("placement", this.placement);
9251008
jsonWriter.writeJsonField("properties", this.innerProperties);
9261009
return jsonWriter.writeEndObject();
9271010
}
@@ -961,6 +1044,11 @@ public static StorageAccountInner fromJson(JsonReader jsonReader) throws IOExcep
9611044
deserializedStorageAccountInner.identity = Identity.fromJson(reader);
9621045
} else if ("extendedLocation".equals(fieldName)) {
9631046
deserializedStorageAccountInner.extendedLocation = ExtendedLocation.fromJson(reader);
1047+
} else if ("zones".equals(fieldName)) {
1048+
List<String> zones = reader.readArray(reader1 -> reader1.getString());
1049+
deserializedStorageAccountInner.zones = zones;
1050+
} else if ("placement".equals(fieldName)) {
1051+
deserializedStorageAccountInner.placement = Placement.fromJson(reader);
9641052
} else if ("properties".equals(fieldName)) {
9651053
deserializedStorageAccountInner.innerProperties = StorageAccountPropertiesInner.fromJson(reader);
9661054
} else {

sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationInner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class StorageAccountMigrationInner implements JsonSerializable<Stor
3636
private String type;
3737

3838
/*
39-
* The properties of a storage accounts ongoing or enqueued migration.
39+
* The properties of a storage account's ongoing or enqueued migration.
4040
*/
4141
private StorageAccountMigrationProperties innerStorageAccountMigrationDetails
4242
= new StorageAccountMigrationProperties();
@@ -97,7 +97,7 @@ public StorageAccountMigrationInner withType(String type) {
9797
}
9898

9999
/**
100-
* Get the innerStorageAccountMigrationDetails property: The properties of a storage accounts ongoing or enqueued
100+
* Get the innerStorageAccountMigrationDetails property: The properties of a storage account's ongoing or enqueued
101101
* migration.
102102
*
103103
* @return the innerStorageAccountMigrationDetails value.

sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountMigrationProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import java.io.IOException;
1616

1717
/**
18-
* The properties of a storage accounts ongoing or enqueued migration.
18+
* The properties of a storage account's ongoing or enqueued migration.
1919
*/
2020
@Fluent
2121
public final class StorageAccountMigrationProperties implements JsonSerializable<StorageAccountMigrationProperties> {

sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountPropertiesCreateParameters.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.azure.resourcemanager.storage.models.AzureFilesIdentityBasedAuthentication;
1515
import com.azure.resourcemanager.storage.models.CustomDomain;
1616
import com.azure.resourcemanager.storage.models.DnsEndpointType;
17+
import com.azure.resourcemanager.storage.models.DualStackEndpointPreference;
1718
import com.azure.resourcemanager.storage.models.Encryption;
1819
import com.azure.resourcemanager.storage.models.ImmutableStorageAccount;
1920
import com.azure.resourcemanager.storage.models.KeyPolicy;
@@ -117,6 +118,11 @@ public final class StorageAccountPropertiesCreateParameters
117118
*/
118119
private RoutingPreference routingPreference;
119120

121+
/*
122+
* Maintains information about the Internet protocol opted by the user.
123+
*/
124+
private DualStackEndpointPreference dualStackEndpointPreference;
125+
120126
/*
121127
* Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is
122128
* false for this property.
@@ -517,6 +523,29 @@ public StorageAccountPropertiesCreateParameters withRoutingPreference(RoutingPre
517523
return this;
518524
}
519525

526+
/**
527+
* Get the dualStackEndpointPreference property: Maintains information about the Internet protocol opted by the
528+
* user.
529+
*
530+
* @return the dualStackEndpointPreference value.
531+
*/
532+
public DualStackEndpointPreference dualStackEndpointPreference() {
533+
return this.dualStackEndpointPreference;
534+
}
535+
536+
/**
537+
* Set the dualStackEndpointPreference property: Maintains information about the Internet protocol opted by the
538+
* user.
539+
*
540+
* @param dualStackEndpointPreference the dualStackEndpointPreference value to set.
541+
* @return the StorageAccountPropertiesCreateParameters object itself.
542+
*/
543+
public StorageAccountPropertiesCreateParameters
544+
withDualStackEndpointPreference(DualStackEndpointPreference dualStackEndpointPreference) {
545+
this.dualStackEndpointPreference = dualStackEndpointPreference;
546+
return this;
547+
}
548+
520549
/**
521550
* Get the allowBlobPublicAccess property: Allow or disallow public access to all blobs or containers in the storage
522551
* account. The default interpretation is false for this property.
@@ -731,6 +760,9 @@ public void validate() {
731760
if (routingPreference() != null) {
732761
routingPreference().validate();
733762
}
763+
if (dualStackEndpointPreference() != null) {
764+
dualStackEndpointPreference().validate();
765+
}
734766
if (immutableStorageWithVersioning() != null) {
735767
immutableStorageWithVersioning().validate();
736768
}
@@ -761,6 +793,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
761793
jsonWriter.writeStringField("largeFileSharesState",
762794
this.largeFileSharesState == null ? null : this.largeFileSharesState.toString());
763795
jsonWriter.writeJsonField("routingPreference", this.routingPreference);
796+
jsonWriter.writeJsonField("dualStackEndpointPreference", this.dualStackEndpointPreference);
764797
jsonWriter.writeBooleanField("allowBlobPublicAccess", this.allowBlobPublicAccess);
765798
jsonWriter.writeStringField("minimumTlsVersion",
766799
this.minimumTlsVersion == null ? null : this.minimumTlsVersion.toString());
@@ -834,6 +867,9 @@ public static StorageAccountPropertiesCreateParameters fromJson(JsonReader jsonR
834867
} else if ("routingPreference".equals(fieldName)) {
835868
deserializedStorageAccountPropertiesCreateParameters.routingPreference
836869
= RoutingPreference.fromJson(reader);
870+
} else if ("dualStackEndpointPreference".equals(fieldName)) {
871+
deserializedStorageAccountPropertiesCreateParameters.dualStackEndpointPreference
872+
= DualStackEndpointPreference.fromJson(reader);
837873
} else if ("allowBlobPublicAccess".equals(fieldName)) {
838874
deserializedStorageAccountPropertiesCreateParameters.allowBlobPublicAccess
839875
= reader.getNullable(JsonReader::getBoolean);

0 commit comments

Comments
 (0)