Skip to content

Commit

Permalink
mgmt, local generation for Azure Redis - 2024-11-01 (#43746)
Browse files Browse the repository at this point in the history
* Code Generation

* Update CHANGELOG.md

* Update record session.
  • Loading branch information
v-hongli1 authored Jan 13, 2025
1 parent a89082f commit 5d9b6d9
Show file tree
Hide file tree
Showing 63 changed files with 535 additions and 195 deletions.
2 changes: 1 addition & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"dir": "azure-resourcemanager-redis",
"source": "specification/redis/resource-manager/readme.md",
"package": "com.azure.resourcemanager.redis",
"args": "--tag=package-2024-03 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult",
"args": "--tag=package-2024-11 --rename-model=ErrorDetailAutoGenerated:ErrorDetail,RedisCommonPropertiesRedisConfiguration:RedisConfiguration --remove-inner=OperationStatusResult",
"note": "run RedisConfigurationTests.generateConfigurationUtils and copy output code snippet to ConfigurationUtils"
},
"relay": {
Expand Down
8 changes: 3 additions & 5 deletions sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

## 2.47.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes
### Other Changes

### Bugs Fixed
#### Dependency Updates

### Other Changes
- Updated `api-version` to `2024-11-01`.

## 2.46.0 (2024-12-23)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-redis",
"Tag": "java/resourcemanager/azure-resourcemanager-redis_0a4a807d07"
"Tag": "java/resourcemanager/azure-resourcemanager-redis_0a6c6cb715"
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public OperationStatusInner withError(ManagementError error) {
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (status() == null) {
throw LOGGER.atError()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
private PrivateEndpointConnectionProperties innerProperties;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of PrivateEndpointConnectionInner class.
Expand All @@ -55,13 +55,13 @@ private PrivateEndpointConnectionProperties innerProperties() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -75,13 +75,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ public final class PrivateLinkResourceInner extends ProxyResource {
private PrivateLinkResourceProperties innerProperties;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of PrivateLinkResourceInner class.
Expand All @@ -53,13 +53,13 @@ private PrivateLinkResourceProperties innerProperties() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -73,13 +73,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ public final class RedisCacheAccessPolicyAssignmentInner extends ProxyResource {
private RedisCacheAccessPolicyAssignmentProperties innerProperties;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of RedisCacheAccessPolicyAssignmentInner class.
Expand All @@ -53,13 +53,13 @@ private RedisCacheAccessPolicyAssignmentProperties innerProperties() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -73,13 +73,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ public final class RedisCacheAccessPolicyInner extends ProxyResource {
private RedisCacheAccessPolicyProperties innerProperties;

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of RedisCacheAccessPolicyInner class.
Expand All @@ -54,13 +54,13 @@ private RedisCacheAccessPolicyProperties innerProperties() {
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -74,13 +74,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.azure.resourcemanager.redis.models.Sku;
import com.azure.resourcemanager.redis.models.TlsVersion;
import com.azure.resourcemanager.redis.models.UpdateChannel;
import com.azure.resourcemanager.redis.models.ZonalAllocationPolicy;
import java.io.IOException;
import java.util.Map;

Expand Down Expand Up @@ -212,11 +213,21 @@ public RedisCreateProperties withDisableAccessKeyAuthentication(Boolean disableA
return this;
}

/**
* {@inheritDoc}
*/
@Override
public RedisCreateProperties withZonalAllocationPolicy(ZonalAllocationPolicy zonalAllocationPolicy) {
super.withZonalAllocationPolicy(zonalAllocationPolicy);
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (sku() == null) {
throw LOGGER.atError()
Expand Down Expand Up @@ -250,6 +261,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
publicNetworkAccess() == null ? null : publicNetworkAccess().toString());
jsonWriter.writeStringField("updateChannel", updateChannel() == null ? null : updateChannel().toString());
jsonWriter.writeBooleanField("disableAccessKeyAuthentication", disableAccessKeyAuthentication());
jsonWriter.writeStringField("zonalAllocationPolicy",
zonalAllocationPolicy() == null ? null : zonalAllocationPolicy().toString());
jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeStringField("subnetId", this.subnetId);
jsonWriter.writeStringField("staticIP", this.staticIp);
Expand Down Expand Up @@ -297,6 +310,9 @@ public static RedisCreateProperties fromJson(JsonReader jsonReader) throws IOExc
} else if ("disableAccessKeyAuthentication".equals(fieldName)) {
deserializedRedisCreateProperties
.withDisableAccessKeyAuthentication(reader.getNullable(JsonReader::getBoolean));
} else if ("zonalAllocationPolicy".equals(fieldName)) {
deserializedRedisCreateProperties
.withZonalAllocationPolicy(ZonalAllocationPolicy.fromString(reader.getString()));
} else if ("sku".equals(fieldName)) {
deserializedRedisCreateProperties.sku = Sku.fromJson(reader);
} else if ("subnetId".equals(fieldName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ public class RedisFirewallRuleInner extends ProxyResource {
private RedisFirewallRuleProperties innerProperties = new RedisFirewallRuleProperties();

/*
* Fully qualified resource Id for the resource.
* The type of the resource.
*/
private String id;
private String type;

/*
* The name of the resource.
*/
private String name;

/*
* The type of the resource.
* Fully qualified resource Id for the resource.
*/
private String type;
private String id;

/**
* Creates an instance of RedisFirewallRuleInner class.
Expand Down Expand Up @@ -64,13 +64,13 @@ RedisFirewallRuleInner withInnerProperties(RedisFirewallRuleProperties innerProp
}

/**
* Get the id property: Fully qualified resource Id for the resource.
* Get the type property: The type of the resource.
*
* @return the id value.
* @return the type value.
*/
@Override
public String id() {
return this.id;
public String type() {
return this.type;
}

/**
Expand All @@ -84,13 +84,13 @@ public String name() {
}

/**
* Get the type property: The type of the resource.
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the type value.
* @return the id value.
*/
@Override
public String type() {
return this.type;
public String id() {
return this.id;
}

/**
Expand Down
Loading

0 comments on commit 5d9b6d9

Please sign in to comment.