diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/DayOfWeek.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/DayOfWeek.java index c5ec4ad5a1890..54586a3913509 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/DayOfWeek.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/DayOfWeek.java @@ -8,67 +8,61 @@ package com.microsoft.azure.management.redis; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for DayOfWeek. */ -public final class DayOfWeek { - /** Static value Monday for DayOfWeek. */ - public static final DayOfWeek MONDAY = new DayOfWeek("Monday"); +public enum DayOfWeek { + /** Enum value Monday. */ + MONDAY("Monday"), - /** Static value Tuesday for DayOfWeek. */ - public static final DayOfWeek TUESDAY = new DayOfWeek("Tuesday"); + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), - /** Static value Wednesday for DayOfWeek. */ - public static final DayOfWeek WEDNESDAY = new DayOfWeek("Wednesday"); + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), - /** Static value Thursday for DayOfWeek. */ - public static final DayOfWeek THURSDAY = new DayOfWeek("Thursday"); + /** Enum value Thursday. */ + THURSDAY("Thursday"), - /** Static value Friday for DayOfWeek. */ - public static final DayOfWeek FRIDAY = new DayOfWeek("Friday"); + /** Enum value Friday. */ + FRIDAY("Friday"), - /** Static value Saturday for DayOfWeek. */ - public static final DayOfWeek SATURDAY = new DayOfWeek("Saturday"); + /** Enum value Saturday. */ + SATURDAY("Saturday"), - /** Static value Sunday for DayOfWeek. */ - public static final DayOfWeek SUNDAY = new DayOfWeek("Sunday"); + /** Enum value Sunday. */ + SUNDAY("Sunday"); + /** The actual serialized value for a DayOfWeek instance. */ private String value; + DayOfWeek(String value) { + this.value = value; + } + /** - * Creates a custom value for DayOfWeek. - * @param value the custom value + * Parses a serialized value to a DayOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed DayOfWeek object, or null if unable to parse. */ - public DayOfWeek(String value) { - this.value = value; + @JsonCreator + public static DayOfWeek fromString(String value) { + DayOfWeek[] items = DayOfWeek.values(); + for (DayOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } @JsonValue @Override public String toString() { - return value; - } - - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof DayOfWeek)) { - return false; - } - if (obj == this) { - return true; - } - DayOfWeek rhs = (DayOfWeek) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + return this.value; } } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisAccessKeys.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisAccessKeys.java deleted file mode 100644 index 906242791ef9a..0000000000000 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisAccessKeys.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.redis; - - -/** - * Redis cache access keys. - */ -public class RedisAccessKeys { - /** - * The current primary key that clients can use to authenticate with redis - * cache. - */ - private String primaryKey; - - /** - * The current secondary key that clients can use to authenticate with - * redis cache. - */ - private String secondaryKey; - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey value. - * - * @param primaryKey the primaryKey value to set - * @return the RedisAccessKeys object itself. - */ - public RedisAccessKeys withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey value. - * - * @param secondaryKey the secondaryKey value to set - * @return the RedisAccessKeys object itself. - */ - public RedisAccessKeys withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - -} diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisPatchSchedulesRequest.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisPatchSchedulesRequest.java deleted file mode 100644 index f57645eb3a736..0000000000000 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisPatchSchedulesRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.redis; - -import java.util.List; -import com.microsoft.azure.management.redis.implementation.ScheduleEntryInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters to set patch schedules for redis cache. - */ -@JsonFlatten -public class RedisPatchSchedulesRequest { - /** - * List of patch schedules for redis cache. - */ - @JsonProperty(value = "properties.scheduleEntries", required = true) - private List scheduleEntries; - - /** - * Get the scheduleEntries value. - * - * @return the scheduleEntries value - */ - public List scheduleEntries() { - return this.scheduleEntries; - } - - /** - * Set the scheduleEntries value. - * - * @param scheduleEntries the scheduleEntries value to set - * @return the RedisPatchSchedulesRequest object itself. - */ - public RedisPatchSchedulesRequest withScheduleEntries(List scheduleEntries) { - this.scheduleEntries = scheduleEntries; - return this; - } - -} diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ScheduleEntryInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/ScheduleEntry.java similarity index 77% rename from azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ScheduleEntryInner.java rename to azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/ScheduleEntry.java index 7bf3c3f52cb41..363d8ed9db345 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ScheduleEntryInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/ScheduleEntry.java @@ -6,16 +6,15 @@ * Code generated by Microsoft (R) AutoRest Code Generator. */ -package com.microsoft.azure.management.redis.implementation; +package com.microsoft.azure.management.redis; -import com.microsoft.azure.management.redis.DayOfWeek; import org.joda.time.Period; import com.fasterxml.jackson.annotation.JsonProperty; /** - * The ScheduleEntryInner model. + * The ScheduleEntry model. */ -public class ScheduleEntryInner { +public class ScheduleEntry { /** * Day of week when cache can be patched. Possible values include: * 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', @@ -48,9 +47,9 @@ public DayOfWeek dayOfWeek() { * Set the dayOfWeek value. * * @param dayOfWeek the dayOfWeek value to set - * @return the ScheduleEntryInner object itself. + * @return the ScheduleEntry object itself. */ - public ScheduleEntryInner withDayOfWeek(DayOfWeek dayOfWeek) { + public ScheduleEntry withDayOfWeek(DayOfWeek dayOfWeek) { this.dayOfWeek = dayOfWeek; return this; } @@ -68,9 +67,9 @@ public int startHourUtc() { * Set the startHourUtc value. * * @param startHourUtc the startHourUtc value to set - * @return the ScheduleEntryInner object itself. + * @return the ScheduleEntry object itself. */ - public ScheduleEntryInner withStartHourUtc(int startHourUtc) { + public ScheduleEntry withStartHourUtc(int startHourUtc) { this.startHourUtc = startHourUtc; return this; } @@ -88,9 +87,9 @@ public Period maintenanceWindow() { * Set the maintenanceWindow value. * * @param maintenanceWindow the maintenanceWindow value to set - * @return the ScheduleEntryInner object itself. + * @return the ScheduleEntry object itself. */ - public ScheduleEntryInner withMaintenanceWindow(Period maintenanceWindow) { + public ScheduleEntry withMaintenanceWindow(Period maintenanceWindow) { this.maintenanceWindow = maintenanceWindow; return this; } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ExportRDBParametersInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ExportRDBParametersInner.java index 06edd0ec055af..4463172ad33bb 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ExportRDBParametersInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/ExportRDBParametersInner.java @@ -20,7 +20,7 @@ public class ExportRDBParametersInner { private String format; /** - * Prifix to use for exported files. + * Prefix to use for exported files. */ @JsonProperty(required = true) private String prefix; diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java index a9c2ee749926c..d6540330fef03 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java @@ -12,13 +12,11 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.redis.RedisPatchSchedulesRequest; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; -import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -60,7 +58,7 @@ public PatchSchedulesInner(Retrofit retrofit, RedisManagementClientImpl client) interface PatchSchedulesService { @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RedisPatchSchedulesRequest parameters, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisPatchScheduleInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default", method = "DELETE", hasBody = true) @@ -77,11 +75,11 @@ interface PatchSchedulesService { * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param scheduleEntries List of patch schedules for redis cache. - * @return the RedisPatchSchedulesResponseInner object if successful. + * @param parameters Parameters to set patch schedules for redis cache. + * @return the RedisPatchScheduleInner object if successful. */ - public RedisPatchSchedulesResponseInner createOrUpdate(String resourceGroupName, String name, List scheduleEntries) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).toBlocking().single().getBody(); + public RedisPatchScheduleInner createOrUpdate(String resourceGroupName, String name, RedisPatchScheduleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } /** @@ -89,12 +87,12 @@ public RedisPatchSchedulesResponseInner createOrUpdate(String resourceGroupName, * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param scheduleEntries List of patch schedules for redis cache. + * @param parameters Parameters to set patch schedules for redis cache. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, List scheduleEntries, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, RedisPatchScheduleInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** @@ -102,13 +100,13 @@ public ServiceCall createOrUpdateAsync(String * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param scheduleEntries List of patch schedules for redis cache. - * @return the observable to the RedisPatchSchedulesResponseInner object + * @param parameters Parameters to set patch schedules for redis cache. + * @return the observable to the RedisPatchScheduleInner object */ - public Observable createOrUpdateAsync(String resourceGroupName, String name, List scheduleEntries) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).map(new Func1, RedisPatchSchedulesResponseInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, RedisPatchScheduleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisPatchScheduleInner>() { @Override - public RedisPatchSchedulesResponseInner call(ServiceResponse response) { + public RedisPatchScheduleInner call(ServiceResponse response) { return response.getBody(); } }); @@ -119,10 +117,10 @@ public RedisPatchSchedulesResponseInner call(ServiceResponse> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, List scheduleEntries) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, RedisPatchScheduleInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -132,21 +130,19 @@ public Observable> createOrUpd if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - if (scheduleEntries == null) { - throw new IllegalArgumentException("Parameter scheduleEntries is required and cannot be null."); - } - Validator.validate(scheduleEntries); - RedisPatchSchedulesRequest parameters = new RedisPatchSchedulesRequest(); - parameters.withScheduleEntries(scheduleEntries); - return service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(parameters); + return service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); + ServiceResponse clientResponse = createOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -155,9 +151,9 @@ public Observable> call(Respon }); } - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -245,9 +241,9 @@ private ServiceResponse deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the RedisPatchSchedulesResponseInner object if successful. + * @return the RedisPatchScheduleInner object if successful. */ - public RedisPatchSchedulesResponseInner get(String resourceGroupName, String name) { + public RedisPatchScheduleInner get(String resourceGroupName, String name) { return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -259,7 +255,7 @@ public RedisPatchSchedulesResponseInner get(String resourceGroupName, String nam * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } @@ -268,12 +264,12 @@ public ServiceCall getAsync(String resourceGro * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the observable to the RedisPatchSchedulesResponseInner object + * @return the observable to the RedisPatchScheduleInner object */ - public Observable getAsync(String resourceGroupName, String name) { - return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisPatchSchedulesResponseInner>() { + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisPatchScheduleInner>() { @Override - public RedisPatchSchedulesResponseInner call(ServiceResponse response) { + public RedisPatchScheduleInner call(ServiceResponse response) { return response.getBody(); } }); @@ -284,9 +280,9 @@ public RedisPatchSchedulesResponseInner call(ServiceResponse> getWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -300,11 +296,11 @@ public Observable> getWithServ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.get(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -313,9 +309,9 @@ public Observable> call(Respon }); } - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisListKeysResultInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisAccessKeysInner.java similarity index 79% rename from azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisListKeysResultInner.java rename to azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisAccessKeysInner.java index 0b2c75b7f473a..ba502319b59b5 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisListKeysResultInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisAccessKeysInner.java @@ -10,9 +10,9 @@ /** - * The response of redis list keys operation. + * Redis cache access keys. */ -public class RedisListKeysResultInner { +public class RedisAccessKeysInner { /** * The current primary key that clients can use to authenticate with redis * cache. @@ -38,9 +38,9 @@ public String primaryKey() { * Set the primaryKey value. * * @param primaryKey the primaryKey value to set - * @return the RedisListKeysResultInner object itself. + * @return the RedisAccessKeysInner object itself. */ - public RedisListKeysResultInner withPrimaryKey(String primaryKey) { + public RedisAccessKeysInner withPrimaryKey(String primaryKey) { this.primaryKey = primaryKey; return this; } @@ -58,9 +58,9 @@ public String secondaryKey() { * Set the secondaryKey value. * * @param secondaryKey the secondaryKey value to set - * @return the RedisListKeysResultInner object itself. + * @return the RedisAccessKeysInner object itself. */ - public RedisListKeysResultInner withSecondaryKey(String secondaryKey) { + public RedisAccessKeysInner withSecondaryKey(String secondaryKey) { this.secondaryKey = secondaryKey; return this; } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisProperties.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateParametersInner.java similarity index 71% rename from azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisProperties.java rename to azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateParametersInner.java index f151cf72f1675..a14b1a910692a 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/RedisProperties.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateParametersInner.java @@ -6,48 +6,44 @@ * Code generated by Microsoft (R) AutoRest Code Generator. */ -package com.microsoft.azure.management.redis; +package com.microsoft.azure.management.redis.implementation; import java.util.Map; +import com.microsoft.azure.management.redis.Sku; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; /** - * Properties supplied to CreateOrUpdate redis operation. + * Parameters supplied to the Create Redis operation. */ -public class RedisProperties { - /** - * RedisVersion parameter has been deprecated. As such, it is no longer - * necessary to provide this parameter and any value specified is ignored. - */ - private String redisVersion; - - /** - * What sku of redis cache to deploy. - */ - @JsonProperty(required = true) - private Sku sku; - +@JsonFlatten +public class RedisCreateParametersInner extends Resource { /** * All Redis Settings. Few possible keys: * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value * etc. */ + @JsonProperty(value = "properties.redisConfiguration") private Map redisConfiguration; /** * If the value is true, then the non-ssl redis server port (6379) will be * enabled. */ + @JsonProperty(value = "properties.enableNonSslPort") private Boolean enableNonSslPort; /** * tenantSettings. */ + @JsonProperty(value = "properties.tenantSettings") private Map tenantSettings; /** * The number of shards to be created on a Premium Cluster Cache. */ + @JsonProperty(value = "properties.shardCount") private Integer shardCount; /** @@ -55,53 +51,21 @@ public class RedisProperties { * redis cache in. Example format: * /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. */ + @JsonProperty(value = "properties.subnetId") private String subnetId; /** * Required when deploying a redis cache inside an existing Azure Virtual * Network. */ + @JsonProperty(value = "properties.staticIP") private String staticIP; /** - * Get the redisVersion value. - * - * @return the redisVersion value - */ - public String redisVersion() { - return this.redisVersion; - } - - /** - * Set the redisVersion value. - * - * @param redisVersion the redisVersion value to set - * @return the RedisProperties object itself. - */ - public RedisProperties withRedisVersion(String redisVersion) { - this.redisVersion = redisVersion; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the RedisProperties object itself. + * What sku of redis cache to deploy. */ - public RedisProperties withSku(Sku sku) { - this.sku = sku; - return this; - } + @JsonProperty(value = "properties.sku", required = true) + private Sku sku; /** * Get the redisConfiguration value. @@ -116,9 +80,9 @@ public Map redisConfiguration() { * Set the redisConfiguration value. * * @param redisConfiguration the redisConfiguration value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withRedisConfiguration(Map redisConfiguration) { + public RedisCreateParametersInner withRedisConfiguration(Map redisConfiguration) { this.redisConfiguration = redisConfiguration; return this; } @@ -136,9 +100,9 @@ public Boolean enableNonSslPort() { * Set the enableNonSslPort value. * * @param enableNonSslPort the enableNonSslPort value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withEnableNonSslPort(Boolean enableNonSslPort) { + public RedisCreateParametersInner withEnableNonSslPort(Boolean enableNonSslPort) { this.enableNonSslPort = enableNonSslPort; return this; } @@ -156,9 +120,9 @@ public Map tenantSettings() { * Set the tenantSettings value. * * @param tenantSettings the tenantSettings value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withTenantSettings(Map tenantSettings) { + public RedisCreateParametersInner withTenantSettings(Map tenantSettings) { this.tenantSettings = tenantSettings; return this; } @@ -176,9 +140,9 @@ public Integer shardCount() { * Set the shardCount value. * * @param shardCount the shardCount value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withShardCount(Integer shardCount) { + public RedisCreateParametersInner withShardCount(Integer shardCount) { this.shardCount = shardCount; return this; } @@ -196,9 +160,9 @@ public String subnetId() { * Set the subnetId value. * * @param subnetId the subnetId value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withSubnetId(String subnetId) { + public RedisCreateParametersInner withSubnetId(String subnetId) { this.subnetId = subnetId; return this; } @@ -216,11 +180,31 @@ public String staticIP() { * Set the staticIP value. * * @param staticIP the staticIP value to set - * @return the RedisProperties object itself. + * @return the RedisCreateParametersInner object itself. */ - public RedisProperties withStaticIP(String staticIP) { + public RedisCreateParametersInner withStaticIP(String staticIP) { this.staticIP = staticIP; return this; } + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the RedisCreateParametersInner object itself. + */ + public RedisCreateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java index e55d69c5f485b..4eb5289e465bb 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java @@ -30,6 +30,7 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; +import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -66,12 +67,28 @@ public RedisInner(Retrofit retrofit, RedisManagementClientImpl client) { interface RedisService { @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") + Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisCreateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") + Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -98,19 +115,19 @@ interface RedisService { @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import") - Observable> importMethod(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> importData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import") - Observable> beginImport(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginImportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export") - Observable> export(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> exportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export") - Observable> beginExport(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginExportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") @@ -123,56 +140,216 @@ interface RedisService { } /** - * Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache. + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the RedisResourceInner object if successful. + */ + public RedisResourceInner create(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(createWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + return createWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { + @Override + public RedisResourceInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.create(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the RedisResourceInner object if successful. + */ + public RedisResourceInner beginCreate(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginCreateAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the observable to the RedisResourceInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { + @Override + public RedisResourceInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Create or replace (overwrite/recreate, with potential downtime) an existing redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Create redis operation. + * @return the observable to the RedisResourceInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String name, RedisCreateParametersInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param parameters Parameters supplied to the CreateOrUpdate redis operation. - * @return the RedisResourceWithAccessKeyInner object if successful. + * @param parameters Parameters supplied to the Update redis operation. + * @return the RedisResourceInner object if successful. */ - public RedisResourceWithAccessKeyInner createOrUpdate(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); + public RedisResourceInner update(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } /** - * Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache. + * Update an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param parameters Parameters supplied to the CreateOrUpdate redis operation. + * @param parameters Parameters supplied to the Update redis operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + public ServiceCall updateAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** - * Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache. + * Update an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param parameters Parameters supplied to the CreateOrUpdate redis operation. - * @return the observable to the RedisResourceWithAccessKeyInner object + * @param parameters Parameters supplied to the Update redis operation. + * @return the observable for the request */ - public Observable createOrUpdateAsync(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceWithAccessKeyInner>() { + public Observable updateAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { + return updateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { @Override - public RedisResourceWithAccessKeyInner call(ServiceResponse response) { + public RedisResourceInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache. + * Update an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @param parameters Parameters supplied to the CreateOrUpdate redis operation. - * @return the observable to the RedisResourceWithAccessKeyInner object + * @param parameters Parameters supplied to the Update redis operation. + * @return the observable for the request */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -189,12 +366,83 @@ public Observable> createOrUpda throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Observable> observable = service.update(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update an existing Redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Update redis operation. + * @return the RedisResourceInner object if successful. + */ + public RedisResourceInner beginUpdate(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); + } + + /** + * Update an existing Redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Update redis operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginUpdateAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + } + + /** + * Update an existing Redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Update redis operation. + * @return the observable to the RedisResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { + @Override + public RedisResourceInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Update an existing Redis cache. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param parameters Parameters supplied to the Update redis operation. + * @return the observable to the RedisResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String name, RedisUpdateParametersInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginUpdate(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); + ServiceResponse clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -203,10 +451,9 @@ public Observable> call(Respons }); } - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(201, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -218,7 +465,7 @@ private ServiceResponse createOrUpdateDelegate( * @param name The name of the redis cache. */ public void delete(String resourceGroupName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } /** @@ -238,7 +485,7 @@ public ServiceCall deleteAsync(String resourceGroupName, String name, fina * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the {@link ServiceResponse} object if successful. + * @return the observable for the request */ public Observable deleteAsync(String resourceGroupName, String name) { return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { @@ -254,7 +501,7 @@ public Void call(ServiceResponse response) { * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the {@link ServiceResponse} object if successful. + * @return the observable for the request */ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { @@ -269,12 +516,74 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.delete(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Observable> observable = service.delete(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a redis cache. This operation takes a while to complete. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + */ + public void beginDelete(String resourceGroupName, String name) { + beginDeleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Deletes a redis cache. This operation takes a while to complete. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginDeleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginDeleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes a redis cache. This operation takes a while to complete. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String name) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Deletes a redis cache. This operation takes a while to complete. + * + * @param resourceGroupName The name of the resource group. + * @param name The name of the redis cache. + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -283,7 +592,7 @@ public Observable> call(Response response) { }); } - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) @@ -583,9 +892,9 @@ private ServiceResponse> listDelegate(Response listKeysAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + public ServiceCall listKeysAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { return ServiceCall.create(listKeysWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } @@ -606,12 +915,12 @@ public ServiceCall listKeysAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the observable to the RedisListKeysResultInner object + * @return the observable to the RedisAccessKeysInner object */ - public Observable listKeysAsync(String resourceGroupName, String name) { - return listKeysWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisListKeysResultInner>() { + public Observable listKeysAsync(String resourceGroupName, String name) { + return listKeysWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisAccessKeysInner>() { @Override - public RedisListKeysResultInner call(ServiceResponse response) { + public RedisAccessKeysInner call(ServiceResponse response) { return response.getBody(); } }); @@ -622,9 +931,9 @@ public RedisListKeysResultInner call(ServiceResponse r * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @return the observable to the RedisListKeysResultInner object + * @return the observable to the RedisAccessKeysInner object */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -638,11 +947,11 @@ public Observable> listKeysWithService throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listKeys(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listKeysDelegate(response); + ServiceResponse clientResponse = listKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -651,9 +960,9 @@ public Observable> call(Response listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -664,9 +973,9 @@ private ServiceResponse listKeysDelegate(Response regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType, final ServiceCallback serviceCallback) { + public ServiceCall regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType, final ServiceCallback serviceCallback) { return ServiceCall.create(regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType), serviceCallback); } @@ -689,12 +998,12 @@ public ServiceCall regenerateKeyAsync(String resourceG * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param keyType Which redis access key to reset. Possible values include: 'Primary', 'Secondary' - * @return the observable to the RedisListKeysResultInner object + * @return the observable to the RedisAccessKeysInner object */ - public Observable regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType).map(new Func1, RedisListKeysResultInner>() { + public Observable regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType).map(new Func1, RedisAccessKeysInner>() { @Override - public RedisListKeysResultInner call(ServiceResponse response) { + public RedisAccessKeysInner call(ServiceResponse response) { return response.getBody(); } }); @@ -706,9 +1015,9 @@ public RedisListKeysResultInner call(ServiceResponse r * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param keyType Which redis access key to reset. Possible values include: 'Primary', 'Secondary' - * @return the observable to the RedisListKeysResultInner object + * @return the observable to the RedisAccessKeysInner object */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String name, RedisKeyType keyType) { + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String name, RedisKeyType keyType) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -727,11 +1036,11 @@ public Observable> regenerateKeyWithSe RedisRegenerateKeyParameters parameters = new RedisRegenerateKeyParameters(); parameters.withKeyType(keyType); return service.regenerateKey(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); + ServiceResponse clientResponse = regenerateKeyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -740,9 +1049,9 @@ public Observable> call(Response regenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse regenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -841,8 +1150,8 @@ private ServiceResponse forceRebootDelegate(Response respons * @param name The name of the redis cache. * @param parameters Parameters for redis import operation. */ - public void importMethod(String resourceGroupName, String name, ImportRDBParametersInner parameters) { - importMethodWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); + public void importData(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + importDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } /** @@ -854,8 +1163,8 @@ public void importMethod(String resourceGroupName, String name, ImportRDBParamet * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall importMethodAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceCall.create(importMethodWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + public ServiceCall importDataAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(importDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** @@ -866,8 +1175,8 @@ public ServiceCall importMethodAsync(String resourceGroupName, String name * @param parameters Parameters for redis import operation. * @return the observable for the request */ - public Observable importMethodAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { - return importMethodWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { + public Observable importDataAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + return importDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.getBody(); @@ -883,7 +1192,7 @@ public Void call(ServiceResponse response) { * @param parameters Parameters for redis import operation. * @return the observable for the request */ - public Observable> importMethodWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + public Observable> importDataWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -900,7 +1209,7 @@ public Observable> importMethodWithServiceResponseAsync(St throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - Observable> observable = service.importMethod(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.importData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -911,8 +1220,8 @@ public Observable> importMethodWithServiceResponseAsync(St * @param name The name of the redis cache. * @param parameters Parameters for redis import operation. */ - public void beginImport(String resourceGroupName, String name, ImportRDBParametersInner parameters) { - beginImportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); + public void beginImportData(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } /** @@ -924,8 +1233,8 @@ public void beginImport(String resourceGroupName, String name, ImportRDBParamete * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginImportAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginImportWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + public ServiceCall beginImportDataAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** @@ -936,8 +1245,8 @@ public ServiceCall beginImportAsync(String resourceGroupName, String name, * @param parameters Parameters for redis import operation. * @return the {@link ServiceResponse} object if successful. */ - public Observable beginImportAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { - return beginImportWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { + public Observable beginImportDataAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + return beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.getBody(); @@ -953,7 +1262,7 @@ public Void call(ServiceResponse response) { * @param parameters Parameters for redis import operation. * @return the {@link ServiceResponse} object if successful. */ - public Observable> beginImportWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { + public Observable> beginImportDataWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -970,12 +1279,12 @@ public Observable> beginImportWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - return service.beginImport(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.beginImportData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginImportDelegate(response); + ServiceResponse clientResponse = beginImportDataDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -984,7 +1293,7 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginImportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginImportDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); @@ -997,8 +1306,8 @@ private ServiceResponse beginImportDelegate(Response respons * @param name The name of the redis cache. * @param parameters Parameters for redis export operation. */ - public void export(String resourceGroupName, String name, ExportRDBParametersInner parameters) { - exportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); + public void exportData(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + exportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } /** @@ -1010,8 +1319,8 @@ public void export(String resourceGroupName, String name, ExportRDBParametersInn * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall exportAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceCall.create(exportWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + public ServiceCall exportDataAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(exportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** @@ -1022,8 +1331,8 @@ public ServiceCall exportAsync(String resourceGroupName, String name, Expo * @param parameters Parameters for redis export operation. * @return the observable for the request */ - public Observable exportAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { - return exportWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { + public Observable exportDataAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + return exportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.getBody(); @@ -1039,7 +1348,7 @@ public Void call(ServiceResponse response) { * @param parameters Parameters for redis export operation. * @return the observable for the request */ - public Observable> exportWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + public Observable> exportDataWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1056,7 +1365,7 @@ public Observable> exportWithServiceResponseAsync(String r throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - Observable> observable = service.export(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.exportData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1067,8 +1376,8 @@ public Observable> exportWithServiceResponseAsync(String r * @param name The name of the redis cache. * @param parameters Parameters for redis export operation. */ - public void beginExport(String resourceGroupName, String name, ExportRDBParametersInner parameters) { - beginExportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); + public void beginExportData(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } /** @@ -1080,8 +1389,8 @@ public void beginExport(String resourceGroupName, String name, ExportRDBParamete * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginExportAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginExportWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); + public ServiceCall beginExportDataAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); } /** @@ -1092,8 +1401,8 @@ public ServiceCall beginExportAsync(String resourceGroupName, String name, * @param parameters Parameters for redis export operation. * @return the {@link ServiceResponse} object if successful. */ - public Observable beginExportAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { - return beginExportWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { + public Observable beginExportDataAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + return beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.getBody(); @@ -1109,7 +1418,7 @@ public Void call(ServiceResponse response) { * @param parameters Parameters for redis export operation. * @return the {@link ServiceResponse} object if successful. */ - public Observable> beginExportWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { + public Observable> beginExportDataWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1126,12 +1435,12 @@ public Observable> beginExportWithServiceResponseAsync(Str throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - return service.beginExport(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.beginExportData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginExportDelegate(response); + ServiceResponse clientResponse = beginExportDataDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1140,7 +1449,7 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginExportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginExportDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .build(response); diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchSchedulesResponseInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchScheduleInner.java similarity index 75% rename from azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchSchedulesResponseInner.java rename to azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchScheduleInner.java index 64bca8dc2c2dd..271369acdf062 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchSchedulesResponseInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisPatchScheduleInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.redis.implementation; import java.util.List; +import com.microsoft.azure.management.redis.ScheduleEntry; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -16,7 +17,7 @@ * Response to put/get patch schedules for redis cache. */ @JsonFlatten -public class RedisPatchSchedulesResponseInner { +public class RedisPatchScheduleInner { /** * Resource Id. */ @@ -38,13 +39,14 @@ public class RedisPatchSchedulesResponseInner { /** * Resource location. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String location; /** * List of patch schedules for redis cache. */ @JsonProperty(value = "properties.scheduleEntries", required = true) - private List scheduleEntries; + private List scheduleEntries; /** * Get the id value. @@ -82,23 +84,12 @@ public String location() { return this.location; } - /** - * Set the location value. - * - * @param location the location value to set - * @return the RedisPatchSchedulesResponseInner object itself. - */ - public RedisPatchSchedulesResponseInner withLocation(String location) { - this.location = location; - return this; - } - /** * Get the scheduleEntries value. * * @return the scheduleEntries value */ - public List scheduleEntries() { + public List scheduleEntries() { return this.scheduleEntries; } @@ -106,9 +97,9 @@ public List scheduleEntries() { * Set the scheduleEntries value. * * @param scheduleEntries the scheduleEntries value to set - * @return the RedisPatchSchedulesResponseInner object itself. + * @return the RedisPatchScheduleInner object itself. */ - public RedisPatchSchedulesResponseInner withScheduleEntries(List scheduleEntries) { + public RedisPatchScheduleInner withScheduleEntries(List scheduleEntries) { this.scheduleEntries = scheduleEntries; return this; } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceInner.java index cc52f50e2b5bb..f987470e1af0b 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceInner.java @@ -8,8 +8,8 @@ package com.microsoft.azure.management.redis.implementation; -import com.microsoft.azure.management.redis.Sku; import java.util.Map; +import com.microsoft.azure.management.redis.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -20,17 +20,34 @@ @JsonFlatten public class RedisResourceInner extends Resource { /** - * RedisVersion parameter has been deprecated. As such, it is no longer - * necessary to provide this parameter and any value specified is ignored. + * Redis Version. */ - @JsonProperty(value = "properties.redisVersion") + @JsonProperty(value = "properties.redisVersion", access = JsonProperty.Access.WRITE_ONLY) private String redisVersion; /** - * What sku of redis cache to deploy. + * Redis instance provisioning status. */ - @JsonProperty(value = "properties.sku", required = true) - private Sku sku; + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Redis host name. + */ + @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostName; + + /** + * Redis non-ssl port. + */ + @JsonProperty(value = "properties.port", access = JsonProperty.Access.WRITE_ONLY) + private Integer port; + + /** + * Redis ssl port. + */ + @JsonProperty(value = "properties.sslPort", access = JsonProperty.Access.WRITE_ONLY) + private Integer sslPort; /** * All Redis Settings. Few possible keys: @@ -75,28 +92,10 @@ public class RedisResourceInner extends Resource { private String staticIP; /** - * Redis instance provisioning status. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * Redis host name. - */ - @JsonProperty(value = "properties.hostName") - private String hostName; - - /** - * Redis non-ssl port. - */ - @JsonProperty(value = "properties.port") - private Integer port; - - /** - * Redis ssl port. + * What sku of redis cache to deploy. */ - @JsonProperty(value = "properties.sslPort") - private Integer sslPort; + @JsonProperty(value = "properties.sku", required = true) + private Sku sku; /** * Get the redisVersion value. @@ -108,34 +107,39 @@ public String redisVersion() { } /** - * Set the redisVersion value. + * Get the provisioningState value. * - * @param redisVersion the redisVersion value to set - * @return the RedisResourceInner object itself. + * @return the provisioningState value */ - public RedisResourceInner withRedisVersion(String redisVersion) { - this.redisVersion = redisVersion; - return this; + public String provisioningState() { + return this.provisioningState; } /** - * Get the sku value. + * Get the hostName value. * - * @return the sku value + * @return the hostName value */ - public Sku sku() { - return this.sku; + public String hostName() { + return this.hostName; } /** - * Set the sku value. + * Get the port value. * - * @param sku the sku value to set - * @return the RedisResourceInner object itself. + * @return the port value */ - public RedisResourceInner withSku(Sku sku) { - this.sku = sku; - return this; + public Integer port() { + return this.port; + } + + /** + * Get the sslPort value. + * + * @return the sslPort value + */ + public Integer sslPort() { + return this.sslPort; } /** @@ -259,82 +263,22 @@ public RedisResourceInner withStaticIP(String staticIP) { } /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the RedisResourceInner object itself. - */ - public RedisResourceInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the hostName value. - * - * @return the hostName value - */ - public String hostName() { - return this.hostName; - } - - /** - * Set the hostName value. - * - * @param hostName the hostName value to set - * @return the RedisResourceInner object itself. - */ - public RedisResourceInner withHostName(String hostName) { - this.hostName = hostName; - return this; - } - - /** - * Get the port value. - * - * @return the port value - */ - public Integer port() { - return this.port; - } - - /** - * Set the port value. - * - * @param port the port value to set - * @return the RedisResourceInner object itself. - */ - public RedisResourceInner withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Get the sslPort value. + * Get the sku value. * - * @return the sslPort value + * @return the sku value */ - public Integer sslPort() { - return this.sslPort; + public Sku sku() { + return this.sku; } /** - * Set the sslPort value. + * Set the sku value. * - * @param sslPort the sslPort value to set + * @param sku the sku value to set * @return the RedisResourceInner object itself. */ - public RedisResourceInner withSslPort(Integer sslPort) { - this.sslPort = sslPort; + public RedisResourceInner withSku(Sku sku) { + this.sku = sku; return this; } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceWithAccessKeyInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceWithAccessKeyInner.java deleted file mode 100644 index cb4722befac30..0000000000000 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisResourceWithAccessKeyInner.java +++ /dev/null @@ -1,368 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.redis.implementation; - -import com.microsoft.azure.management.redis.Sku; -import java.util.Map; -import com.microsoft.azure.management.redis.RedisAccessKeys; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A redis item in CreateOrUpdate Operation response. - */ -@JsonFlatten -public class RedisResourceWithAccessKeyInner extends Resource { - /** - * RedisVersion parameter has been deprecated. As such, it is no longer - * necessary to provide this parameter and any value specified is ignored. - */ - @JsonProperty(value = "properties.redisVersion") - private String redisVersion; - - /** - * What sku of redis cache to deploy. - */ - @JsonProperty(value = "properties.sku", required = true) - private Sku sku; - - /** - * All Redis Settings. Few possible keys: - * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - * etc. - */ - @JsonProperty(value = "properties.redisConfiguration") - private Map redisConfiguration; - - /** - * If the value is true, then the non-ssl redis server port (6379) will be - * enabled. - */ - @JsonProperty(value = "properties.enableNonSslPort") - private Boolean enableNonSslPort; - - /** - * tenantSettings. - */ - @JsonProperty(value = "properties.tenantSettings") - private Map tenantSettings; - - /** - * The number of shards to be created on a Premium Cluster Cache. - */ - @JsonProperty(value = "properties.shardCount") - private Integer shardCount; - - /** - * The full resource ID of a subnet in a virtual network to deploy the - * redis cache in. Example format: - * /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - */ - @JsonProperty(value = "properties.subnetId") - private String subnetId; - - /** - * Required when deploying a redis cache inside an existing Azure Virtual - * Network. - */ - @JsonProperty(value = "properties.staticIP") - private String staticIP; - - /** - * Redis instance provisioning status. - */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; - - /** - * Redis host name. - */ - @JsonProperty(value = "properties.hostName") - private String hostName; - - /** - * Redis non-ssl port. - */ - @JsonProperty(value = "properties.port") - private Integer port; - - /** - * Redis ssl port. - */ - @JsonProperty(value = "properties.sslPort") - private Integer sslPort; - - /** - * Redis cache access keys. - */ - @JsonProperty(value = "properties.accessKeys") - private RedisAccessKeys accessKeys; - - /** - * Get the redisVersion value. - * - * @return the redisVersion value - */ - public String redisVersion() { - return this.redisVersion; - } - - /** - * Set the redisVersion value. - * - * @param redisVersion the redisVersion value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withRedisVersion(String redisVersion) { - this.redisVersion = redisVersion; - return this; - } - - /** - * Get the sku value. - * - * @return the sku value - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the redisConfiguration value. - * - * @return the redisConfiguration value - */ - public Map redisConfiguration() { - return this.redisConfiguration; - } - - /** - * Set the redisConfiguration value. - * - * @param redisConfiguration the redisConfiguration value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withRedisConfiguration(Map redisConfiguration) { - this.redisConfiguration = redisConfiguration; - return this; - } - - /** - * Get the enableNonSslPort value. - * - * @return the enableNonSslPort value - */ - public Boolean enableNonSslPort() { - return this.enableNonSslPort; - } - - /** - * Set the enableNonSslPort value. - * - * @param enableNonSslPort the enableNonSslPort value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withEnableNonSslPort(Boolean enableNonSslPort) { - this.enableNonSslPort = enableNonSslPort; - return this; - } - - /** - * Get the tenantSettings value. - * - * @return the tenantSettings value - */ - public Map tenantSettings() { - return this.tenantSettings; - } - - /** - * Set the tenantSettings value. - * - * @param tenantSettings the tenantSettings value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withTenantSettings(Map tenantSettings) { - this.tenantSettings = tenantSettings; - return this; - } - - /** - * Get the shardCount value. - * - * @return the shardCount value - */ - public Integer shardCount() { - return this.shardCount; - } - - /** - * Set the shardCount value. - * - * @param shardCount the shardCount value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withShardCount(Integer shardCount) { - this.shardCount = shardCount; - return this; - } - - /** - * Get the subnetId value. - * - * @return the subnetId value - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId value. - * - * @param subnetId the subnetId value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the staticIP value. - * - * @return the staticIP value - */ - public String staticIP() { - return this.staticIP; - } - - /** - * Set the staticIP value. - * - * @param staticIP the staticIP value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withStaticIP(String staticIP) { - this.staticIP = staticIP; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the hostName value. - * - * @return the hostName value - */ - public String hostName() { - return this.hostName; - } - - /** - * Set the hostName value. - * - * @param hostName the hostName value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withHostName(String hostName) { - this.hostName = hostName; - return this; - } - - /** - * Get the port value. - * - * @return the port value - */ - public Integer port() { - return this.port; - } - - /** - * Set the port value. - * - * @param port the port value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Get the sslPort value. - * - * @return the sslPort value - */ - public Integer sslPort() { - return this.sslPort; - } - - /** - * Set the sslPort value. - * - * @param sslPort the sslPort value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withSslPort(Integer sslPort) { - this.sslPort = sslPort; - return this; - } - - /** - * Get the accessKeys value. - * - * @return the accessKeys value - */ - public RedisAccessKeys accessKeys() { - return this.accessKeys; - } - - /** - * Set the accessKeys value. - * - * @param accessKeys the accessKeys value to set - * @return the RedisResourceWithAccessKeyInner object itself. - */ - public RedisResourceWithAccessKeyInner withAccessKeys(RedisAccessKeys accessKeys) { - this.accessKeys = accessKeys; - return this; - } - -} diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateOrUpdateParametersInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisUpdateParametersInner.java similarity index 68% rename from azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateOrUpdateParametersInner.java rename to azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisUpdateParametersInner.java index a014a5b67b5e7..2c01bebc8eeaa 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisCreateOrUpdateParametersInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisUpdateParametersInner.java @@ -8,30 +8,16 @@ package com.microsoft.azure.management.redis.implementation; -import com.microsoft.azure.management.redis.Sku; import java.util.Map; +import com.microsoft.azure.management.redis.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; /** - * Parameters supplied to the CreateOrUpdate Redis operation. + * Parameters supplied to the Update Redis operation. */ @JsonFlatten -public class RedisCreateOrUpdateParametersInner extends Resource { - /** - * RedisVersion parameter has been deprecated. As such, it is no longer - * necessary to provide this parameter and any value specified is ignored. - */ - @JsonProperty(value = "properties.redisVersion") - private String redisVersion; - - /** - * What sku of redis cache to deploy. - */ - @JsonProperty(value = "properties.sku", required = true) - private Sku sku; - +public class RedisUpdateParametersInner { /** * All Redis Settings. Few possible keys: * rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value @@ -75,44 +61,22 @@ public class RedisCreateOrUpdateParametersInner extends Resource { private String staticIP; /** - * Get the redisVersion value. - * - * @return the redisVersion value - */ - public String redisVersion() { - return this.redisVersion; - } - - /** - * Set the redisVersion value. - * - * @param redisVersion the redisVersion value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * What sku of redis cache to deploy. */ - public RedisCreateOrUpdateParametersInner withRedisVersion(String redisVersion) { - this.redisVersion = redisVersion; - return this; - } + @JsonProperty(value = "properties.sku") + private Sku sku; /** - * Get the sku value. - * - * @return the sku value + * Resource location. */ - public Sku sku() { - return this.sku; - } + @JsonProperty(value = "properties.location") + private String location; /** - * Set the sku value. - * - * @param sku the sku value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * Resource tags. */ - public RedisCreateOrUpdateParametersInner withSku(Sku sku) { - this.sku = sku; - return this; - } + @JsonProperty(value = "properties.tags") + private Map tags; /** * Get the redisConfiguration value. @@ -127,9 +91,9 @@ public Map redisConfiguration() { * Set the redisConfiguration value. * * @param redisConfiguration the redisConfiguration value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withRedisConfiguration(Map redisConfiguration) { + public RedisUpdateParametersInner withRedisConfiguration(Map redisConfiguration) { this.redisConfiguration = redisConfiguration; return this; } @@ -147,9 +111,9 @@ public Boolean enableNonSslPort() { * Set the enableNonSslPort value. * * @param enableNonSslPort the enableNonSslPort value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withEnableNonSslPort(Boolean enableNonSslPort) { + public RedisUpdateParametersInner withEnableNonSslPort(Boolean enableNonSslPort) { this.enableNonSslPort = enableNonSslPort; return this; } @@ -167,9 +131,9 @@ public Map tenantSettings() { * Set the tenantSettings value. * * @param tenantSettings the tenantSettings value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withTenantSettings(Map tenantSettings) { + public RedisUpdateParametersInner withTenantSettings(Map tenantSettings) { this.tenantSettings = tenantSettings; return this; } @@ -187,9 +151,9 @@ public Integer shardCount() { * Set the shardCount value. * * @param shardCount the shardCount value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withShardCount(Integer shardCount) { + public RedisUpdateParametersInner withShardCount(Integer shardCount) { this.shardCount = shardCount; return this; } @@ -207,9 +171,9 @@ public String subnetId() { * Set the subnetId value. * * @param subnetId the subnetId value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withSubnetId(String subnetId) { + public RedisUpdateParametersInner withSubnetId(String subnetId) { this.subnetId = subnetId; return this; } @@ -227,11 +191,71 @@ public String staticIP() { * Set the staticIP value. * * @param staticIP the staticIP value to set - * @return the RedisCreateOrUpdateParametersInner object itself. + * @return the RedisUpdateParametersInner object itself. */ - public RedisCreateOrUpdateParametersInner withStaticIP(String staticIP) { + public RedisUpdateParametersInner withStaticIP(String staticIP) { this.staticIP = staticIP; return this; } + /** + * Get the sku value. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku value. + * + * @param sku the sku value to set + * @return the RedisUpdateParametersInner object itself. + */ + public RedisUpdateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the location value. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the location value. + * + * @param location the location value to set + * @return the RedisUpdateParametersInner object itself. + */ + public RedisUpdateParametersInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the RedisUpdateParametersInner object itself. + */ + public RedisUpdateParametersInner withTags(Map tags) { + this.tags = tags; + return this; + } + }