Skip to content

Commit 5d9b6d9

Browse files
authored
mgmt, local generation for Azure Redis - 2024-11-01 (#43746)
* Code Generation * Update CHANGELOG.md * Update record session.
1 parent a89082f commit 5d9b6d9

File tree

63 files changed

+535
-195
lines changed

Some content is hidden

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

63 files changed

+535
-195
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"dir": "azure-resourcemanager-redis",
214214
"source": "specification/redis/resource-manager/readme.md",
215215
"package": "com.azure.resourcemanager.redis",
216-
"args": "--tag=package-2024-03 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult",
216+
"args": "--tag=package-2024-11 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult",
217217
"note": "run RedisConfigurationTests.generateConfigurationUtils and copy output code snippet to ConfigurationUtils"
218218
},
219219
"relay": {

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

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

33
## 2.47.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 `2024-11-01`.
1210

1311
## 2.46.0 (2024-12-23)
1412

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public OperationStatusInner withError(ManagementError error) {
131131
*
132132
* @throws IllegalArgumentException thrown if the instance is not valid.
133133
*/
134+
@Override
134135
public void validate() {
135136
if (status() == null) {
136137
throw LOGGER.atError()

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
2525
private PrivateEndpointConnectionProperties innerProperties;
2626

2727
/*
28-
* Fully qualified resource Id for the resource.
28+
* The type of the resource.
2929
*/
30-
private String id;
30+
private String type;
3131

3232
/*
3333
* The name of the resource.
3434
*/
3535
private String name;
3636

3737
/*
38-
* The type of the resource.
38+
* Fully qualified resource Id for the resource.
3939
*/
40-
private String type;
40+
private String id;
4141

4242
/**
4343
* Creates an instance of PrivateEndpointConnectionInner class.
@@ -55,13 +55,13 @@ private PrivateEndpointConnectionProperties innerProperties() {
5555
}
5656

5757
/**
58-
* Get the id property: Fully qualified resource Id for the resource.
58+
* Get the type property: The type of the resource.
5959
*
60-
* @return the id value.
60+
* @return the type value.
6161
*/
6262
@Override
63-
public String id() {
64-
return this.id;
63+
public String type() {
64+
return this.type;
6565
}
6666

6767
/**
@@ -75,13 +75,13 @@ public String name() {
7575
}
7676

7777
/**
78-
* Get the type property: The type of the resource.
78+
* Get the id property: Fully qualified resource Id for the resource.
7979
*
80-
* @return the type value.
80+
* @return the id value.
8181
*/
8282
@Override
83-
public String type() {
84-
return this.type;
83+
public String id() {
84+
return this.id;
8585
}
8686

8787
/**

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public final class PrivateLinkResourceInner extends ProxyResource {
2323
private PrivateLinkResourceProperties innerProperties;
2424

2525
/*
26-
* Fully qualified resource Id for the resource.
26+
* The type of the resource.
2727
*/
28-
private String id;
28+
private String type;
2929

3030
/*
3131
* The name of the resource.
3232
*/
3333
private String name;
3434

3535
/*
36-
* The type of the resource.
36+
* Fully qualified resource Id for the resource.
3737
*/
38-
private String type;
38+
private String id;
3939

4040
/**
4141
* Creates an instance of PrivateLinkResourceInner class.
@@ -53,13 +53,13 @@ private PrivateLinkResourceProperties innerProperties() {
5353
}
5454

5555
/**
56-
* Get the id property: Fully qualified resource Id for the resource.
56+
* Get the type property: The type of the resource.
5757
*
58-
* @return the id value.
58+
* @return the type value.
5959
*/
6060
@Override
61-
public String id() {
62-
return this.id;
61+
public String type() {
62+
return this.type;
6363
}
6464

6565
/**
@@ -73,13 +73,13 @@ public String name() {
7373
}
7474

7575
/**
76-
* Get the type property: The type of the resource.
76+
* Get the id property: Fully qualified resource Id for the resource.
7777
*
78-
* @return the type value.
78+
* @return the id value.
7979
*/
8080
@Override
81-
public String type() {
82-
return this.type;
81+
public String id() {
82+
return this.id;
8383
}
8484

8585
/**

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public final class RedisCacheAccessPolicyAssignmentInner extends ProxyResource {
2323
private RedisCacheAccessPolicyAssignmentProperties innerProperties;
2424

2525
/*
26-
* Fully qualified resource Id for the resource.
26+
* The type of the resource.
2727
*/
28-
private String id;
28+
private String type;
2929

3030
/*
3131
* The name of the resource.
3232
*/
3333
private String name;
3434

3535
/*
36-
* The type of the resource.
36+
* Fully qualified resource Id for the resource.
3737
*/
38-
private String type;
38+
private String id;
3939

4040
/**
4141
* Creates an instance of RedisCacheAccessPolicyAssignmentInner class.
@@ -53,13 +53,13 @@ private RedisCacheAccessPolicyAssignmentProperties innerProperties() {
5353
}
5454

5555
/**
56-
* Get the id property: Fully qualified resource Id for the resource.
56+
* Get the type property: The type of the resource.
5757
*
58-
* @return the id value.
58+
* @return the type value.
5959
*/
6060
@Override
61-
public String id() {
62-
return this.id;
61+
public String type() {
62+
return this.type;
6363
}
6464

6565
/**
@@ -73,13 +73,13 @@ public String name() {
7373
}
7474

7575
/**
76-
* Get the type property: The type of the resource.
76+
* Get the id property: Fully qualified resource Id for the resource.
7777
*
78-
* @return the type value.
78+
* @return the id value.
7979
*/
8080
@Override
81-
public String type() {
82-
return this.type;
81+
public String id() {
82+
return this.id;
8383
}
8484

8585
/**

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ public final class RedisCacheAccessPolicyInner extends ProxyResource {
2424
private RedisCacheAccessPolicyProperties innerProperties;
2525

2626
/*
27-
* Fully qualified resource Id for the resource.
27+
* The type of the resource.
2828
*/
29-
private String id;
29+
private String type;
3030

3131
/*
3232
* The name of the resource.
3333
*/
3434
private String name;
3535

3636
/*
37-
* The type of the resource.
37+
* Fully qualified resource Id for the resource.
3838
*/
39-
private String type;
39+
private String id;
4040

4141
/**
4242
* Creates an instance of RedisCacheAccessPolicyInner class.
@@ -54,13 +54,13 @@ private RedisCacheAccessPolicyProperties innerProperties() {
5454
}
5555

5656
/**
57-
* Get the id property: Fully qualified resource Id for the resource.
57+
* Get the type property: The type of the resource.
5858
*
59-
* @return the id value.
59+
* @return the type value.
6060
*/
6161
@Override
62-
public String id() {
63-
return this.id;
62+
public String type() {
63+
return this.type;
6464
}
6565

6666
/**
@@ -74,13 +74,13 @@ public String name() {
7474
}
7575

7676
/**
77-
* Get the type property: The type of the resource.
77+
* Get the id property: Fully qualified resource Id for the resource.
7878
*
79-
* @return the type value.
79+
* @return the id value.
8080
*/
8181
@Override
82-
public String type() {
83-
return this.type;
82+
public String id() {
83+
return this.id;
8484
}
8585

8686
/**

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.azure.resourcemanager.redis.models.Sku;
1616
import com.azure.resourcemanager.redis.models.TlsVersion;
1717
import com.azure.resourcemanager.redis.models.UpdateChannel;
18+
import com.azure.resourcemanager.redis.models.ZonalAllocationPolicy;
1819
import java.io.IOException;
1920
import java.util.Map;
2021

@@ -212,11 +213,21 @@ public RedisCreateProperties withDisableAccessKeyAuthentication(Boolean disableA
212213
return this;
213214
}
214215

216+
/**
217+
* {@inheritDoc}
218+
*/
219+
@Override
220+
public RedisCreateProperties withZonalAllocationPolicy(ZonalAllocationPolicy zonalAllocationPolicy) {
221+
super.withZonalAllocationPolicy(zonalAllocationPolicy);
222+
return this;
223+
}
224+
215225
/**
216226
* Validates the instance.
217227
*
218228
* @throws IllegalArgumentException thrown if the instance is not valid.
219229
*/
230+
@Override
220231
public void validate() {
221232
if (sku() == null) {
222233
throw LOGGER.atError()
@@ -250,6 +261,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
250261
publicNetworkAccess() == null ? null : publicNetworkAccess().toString());
251262
jsonWriter.writeStringField("updateChannel", updateChannel() == null ? null : updateChannel().toString());
252263
jsonWriter.writeBooleanField("disableAccessKeyAuthentication", disableAccessKeyAuthentication());
264+
jsonWriter.writeStringField("zonalAllocationPolicy",
265+
zonalAllocationPolicy() == null ? null : zonalAllocationPolicy().toString());
253266
jsonWriter.writeJsonField("sku", this.sku);
254267
jsonWriter.writeStringField("subnetId", this.subnetId);
255268
jsonWriter.writeStringField("staticIP", this.staticIp);
@@ -297,6 +310,9 @@ public static RedisCreateProperties fromJson(JsonReader jsonReader) throws IOExc
297310
} else if ("disableAccessKeyAuthentication".equals(fieldName)) {
298311
deserializedRedisCreateProperties
299312
.withDisableAccessKeyAuthentication(reader.getNullable(JsonReader::getBoolean));
313+
} else if ("zonalAllocationPolicy".equals(fieldName)) {
314+
deserializedRedisCreateProperties
315+
.withZonalAllocationPolicy(ZonalAllocationPolicy.fromString(reader.getString()));
300316
} else if ("sku".equals(fieldName)) {
301317
deserializedRedisCreateProperties.sku = Sku.fromJson(reader);
302318
} else if ("subnetId".equals(fieldName)) {

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public class RedisFirewallRuleInner extends ProxyResource {
2323
private RedisFirewallRuleProperties innerProperties = new RedisFirewallRuleProperties();
2424

2525
/*
26-
* Fully qualified resource Id for the resource.
26+
* The type of the resource.
2727
*/
28-
private String id;
28+
private String type;
2929

3030
/*
3131
* The name of the resource.
3232
*/
3333
private String name;
3434

3535
/*
36-
* The type of the resource.
36+
* Fully qualified resource Id for the resource.
3737
*/
38-
private String type;
38+
private String id;
3939

4040
/**
4141
* Creates an instance of RedisFirewallRuleInner class.
@@ -64,13 +64,13 @@ RedisFirewallRuleInner withInnerProperties(RedisFirewallRuleProperties innerProp
6464
}
6565

6666
/**
67-
* Get the id property: Fully qualified resource Id for the resource.
67+
* Get the type property: The type of the resource.
6868
*
69-
* @return the id value.
69+
* @return the type value.
7070
*/
7171
@Override
72-
public String id() {
73-
return this.id;
72+
public String type() {
73+
return this.type;
7474
}
7575

7676
/**
@@ -84,13 +84,13 @@ public String name() {
8484
}
8585

8686
/**
87-
* Get the type property: The type of the resource.
87+
* Get the id property: Fully qualified resource Id for the resource.
8888
*
89-
* @return the type value.
89+
* @return the id value.
9090
*/
9191
@Override
92-
public String type() {
93-
return this.type;
92+
public String id() {
93+
return this.id;
9494
}
9595

9696
/**

0 commit comments

Comments
 (0)