From aa735c5a178ab2494405b9e3e479cc17a289b340 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 23 Oct 2020 18:42:06 +0000 Subject: [PATCH] Generated from f8f696fa405d0b26e40939715bfb1f2b1804a91b --- sdk/redis/mgmt-v2018_03_01/pom.xml | 8 +- .../v2018_03_01/NotificationListResponse.java | 4 +- .../redis/v2018_03_01/Operation.java | 4 +- .../redis/v2018_03_01/PatchSchedules.java | 4 +- .../redis/v2018_03_01/RedisAccessKeys.java | 4 +- .../redis/v2018_03_01/RedisFirewallRule.java | 14 +- .../v2018_03_01/RedisForceRebootResponse.java | 4 +- .../RedisLinkedServerWithProperties.java | 14 +- .../redis/v2018_03_01/RedisPatchSchedule.java | 14 +- .../redis/v2018_03_01/RedisResource.java | 4 +- .../redis/v2018_03_01/ScheduleEntry.java | 2 +- .../management/redis/v2018_03_01/Sku.java | 6 +- .../implementation/CacheManager.java | 147 ++++++++++++++++++ .../implementation/FirewallRulesImpl.java | 16 +- .../implementation/LinkedServersImpl.java | 16 +- .../NotificationListResponseImpl.java | 6 +- .../implementation/OperationImpl.java | 6 +- .../implementation/OperationsImpl.java | 6 +- .../implementation/PatchSchedulesImpl.java | 16 +- .../implementation/PatchSchedulesInner.java | 24 +-- .../implementation/RedisAccessKeysImpl.java | 6 +- .../implementation/RedisFirewallRuleImpl.java | 10 +- .../RedisForceRebootResponseImpl.java | 6 +- .../v2018_03_01/implementation/RedisImpl.java | 4 +- .../RedisLinkedServerWithPropertiesImpl.java | 10 +- .../RedisPatchScheduleImpl.java | 10 +- .../implementation/RedisResourceImpl.java | 4 +- 27 files changed, 265 insertions(+), 104 deletions(-) create mode 100644 sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/CacheManager.java diff --git a/sdk/redis/mgmt-v2018_03_01/pom.xml b/sdk/redis/mgmt-v2018_03_01/pom.xml index 6498ac10b96e..d02ece13388b 100644 --- a/sdk/redis/mgmt-v2018_03_01/pom.xml +++ b/sdk/redis/mgmt-v2018_03_01/pom.xml @@ -11,10 +11,10 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml - azure-mgmt-redis + azure-mgmt-cache 1.0.0-beta jar Microsoft Azure SDK for Cache Management @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/NotificationListResponse.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/NotificationListResponse.java index ef59d35be830..59c8722eec1b 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/NotificationListResponse.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/NotificationListResponse.java @@ -10,14 +10,14 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; import com.microsoft.azure.management.redis.v2018_03_01.implementation.NotificationListResponseInner; import java.util.List; /** * Type representing NotificationListResponse. */ -public interface NotificationListResponse extends HasInner, HasManager { +public interface NotificationListResponse extends HasInner, HasManager { /** * @return the nextLink value. */ diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Operation.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Operation.java index 211b67b78760..bc9e7353a3de 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Operation.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Operation.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; import com.microsoft.azure.management.redis.v2018_03_01.implementation.OperationInner; /** * Type representing Operation. */ -public interface Operation extends HasInner, HasManager { +public interface Operation extends HasInner, HasManager { /** * @return the display value. */ diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/PatchSchedules.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/PatchSchedules.java index 83bca6a5dee3..112d10a6d465 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/PatchSchedules.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/PatchSchedules.java @@ -19,7 +19,7 @@ */ public interface PatchSchedules extends SupportsCreating, HasInner { /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -39,7 +39,7 @@ public interface PatchSchedules extends SupportsCreating listByRedisResourceAsync(final String resourceGroupName, final String cacheName); /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisAccessKeys.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisAccessKeys.java index 4ec4930ef8d5..51a37a960e7d 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisAccessKeys.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisAccessKeys.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisAccessKeysInner; /** * Type representing RedisAccessKeys. */ -public interface RedisAccessKeys extends HasInner, HasManager { +public interface RedisAccessKeys extends HasInner, HasManager { /** * @return the primaryKey value. */ diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java index b82b9e287421..5f5a3a65bd62 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java @@ -16,12 +16,12 @@ import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; /** * Type representing RedisFirewallRule. */ -public interface RedisFirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { +public interface RedisFirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the endIP value. */ @@ -50,7 +50,7 @@ public interface RedisFirewallRule extends HasInner, Ind /** * The entirety of the RedisFirewallRule definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedis, DefinitionStages.WithEndIP, DefinitionStages.WithStartIP, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedi, DefinitionStages.WithEndIP, DefinitionStages.WithStartIP, DefinitionStages.WithCreate { } /** @@ -60,20 +60,20 @@ interface DefinitionStages { /** * The first stage of a RedisFirewallRule definition. */ - interface Blank extends WithRedis { + interface Blank extends WithRedi { } /** - * The stage of the redisfirewallrule definition allowing to specify Redis. + * The stage of the redisfirewallrule definition allowing to specify Redi. */ - interface WithRedis { + interface WithRedi { /** * Specifies resourceGroupName, cacheName. * @param resourceGroupName The name of the resource group * @param cacheName The name of the Redis cache * @return the next definition stage */ - WithEndIP withExistingRedis(String resourceGroupName, String cacheName); + WithEndIP withExistingRedi(String resourceGroupName, String cacheName); } /** diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisForceRebootResponse.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisForceRebootResponse.java index a5ede0bb0c1b..11a08d34abe0 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisForceRebootResponse.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisForceRebootResponse.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisForceRebootResponseInner; /** * Type representing RedisForceRebootResponse. */ -public interface RedisForceRebootResponse extends HasInner, HasManager { +public interface RedisForceRebootResponse extends HasInner, HasManager { /** * @return the message value. */ diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java index 4cebbbb11359..3eb7f7c97c8e 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java @@ -16,12 +16,12 @@ import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; /** * Type representing RedisLinkedServerWithProperties. */ -public interface RedisLinkedServerWithProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { +public interface RedisLinkedServerWithProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the id value. */ @@ -60,7 +60,7 @@ public interface RedisLinkedServerWithProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { +public interface RedisPatchSchedule extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the id value. */ @@ -46,7 +46,7 @@ public interface RedisPatchSchedule extends HasInner, I /** * The entirety of the RedisPatchSchedule definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedis, DefinitionStages.WithScheduleEntries, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedi, DefinitionStages.WithScheduleEntries, DefinitionStages.WithCreate { } /** @@ -56,20 +56,20 @@ interface DefinitionStages { /** * The first stage of a RedisPatchSchedule definition. */ - interface Blank extends WithRedis { + interface Blank extends WithRedi { } /** - * The stage of the redispatchschedule definition allowing to specify Redis. + * The stage of the redispatchschedule definition allowing to specify Redi. */ - interface WithRedis { + interface WithRedi { /** * Specifies resourceGroupName, name. * @param resourceGroupName The name of the resource group * @param name The name of the Redis cache * @return the next definition stage */ - WithScheduleEntries withExistingRedis(String resourceGroupName, String name); + WithScheduleEntries withExistingRedi(String resourceGroupName, String name); } /** diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java index d0d3aabe965d..687dd11a40a1 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java @@ -17,7 +17,7 @@ import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; +import com.microsoft.azure.management.redis.v2018_03_01.implementation.CacheManager; import java.util.Map; import java.util.List; import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisResourceInner; @@ -25,7 +25,7 @@ /** * Type representing RedisResource. */ -public interface RedisResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { +public interface RedisResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { /** * @return the accessKeys value. */ diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java index 95cfd05a82a6..9ce8f88ddce8 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Patch schedule entry for a Premium Redis Cache. + * Patch schedule entry for a Redis Cache. */ public class ScheduleEntry { /** diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java index ac90d13003a4..adf33dd924d3 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java @@ -31,7 +31,7 @@ public class Sku { /** * The size of the Redis cache to deploy. Valid values: for C * (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family - * (1, 2, 3, 4). + * (1, 2, 3, 4, 5). */ @JsonProperty(value = "capacity", required = true) private int capacity; @@ -77,7 +77,7 @@ public Sku withFamily(SkuFamily family) { } /** - * Get the size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). + * Get the size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4, 5). * * @return the capacity value */ @@ -86,7 +86,7 @@ public int capacity() { } /** - * Set the size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). + * Set the size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4, 5). * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/CacheManager.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/CacheManager.java new file mode 100644 index 000000000000..ea094debee8d --- /dev/null +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/CacheManager.java @@ -0,0 +1,147 @@ +/** + * 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.v2018_03_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.redis.v2018_03_01.Operations; +import com.microsoft.azure.management.redis.v2018_03_01.Redis; +import com.microsoft.azure.management.redis.v2018_03_01.FirewallRules; +import com.microsoft.azure.management.redis.v2018_03_01.PatchSchedules; +import com.microsoft.azure.management.redis.v2018_03_01.LinkedServers; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure Cache resource management. + */ +public final class CacheManager extends ManagerCore { + private Operations operations; + private Redis redis; + private FirewallRules firewallRules; + private PatchSchedules patchSchedules; + private LinkedServers linkedServers; + /** + * Get a Configurable instance that can be used to create CacheManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new CacheManager.ConfigurableImpl(); + } + /** + * Creates an instance of CacheManager that exposes Cache resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the CacheManager + */ + public static CacheManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new CacheManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of CacheManager that exposes Cache resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the CacheManager + */ + public static CacheManager authenticate(RestClient restClient, String subscriptionId) { + return new CacheManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of CacheManager that exposes Cache management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing Cache management API entry points that work across subscriptions + */ + CacheManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Redis. + */ + public Redis redis() { + if (this.redis == null) { + this.redis = new RedisImpl(this); + } + return this.redis; + } + + /** + * @return Entry point to manage FirewallRules. + */ + public FirewallRules firewallRules() { + if (this.firewallRules == null) { + this.firewallRules = new FirewallRulesImpl(this); + } + return this.firewallRules; + } + + /** + * @return Entry point to manage PatchSchedules. + */ + public PatchSchedules patchSchedules() { + if (this.patchSchedules == null) { + this.patchSchedules = new PatchSchedulesImpl(this); + } + return this.patchSchedules; + } + + /** + * @return Entry point to manage LinkedServers. + */ + public LinkedServers linkedServers() { + if (this.linkedServers == null) { + this.linkedServers = new LinkedServersImpl(this); + } + return this.linkedServers; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public CacheManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return CacheManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private CacheManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new RedisManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java index ea9b33d25587..fa6ab2abe270 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java @@ -18,14 +18,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.RedisFirewallRule; class FirewallRulesImpl extends WrapperImpl implements FirewallRules { - private final RedisManager manager; + private final CacheManager manager; - FirewallRulesImpl(RedisManager manager) { + FirewallRulesImpl(CacheManager manager) { super(manager.inner().firewallRules()); this.manager = manager; } - public RedisManager manager() { + public CacheManager manager() { return this.manager; } @@ -64,10 +64,14 @@ public RedisFirewallRule call(RedisFirewallRuleInner inner) { public Observable getAsync(String resourceGroupName, String cacheName, String ruleName) { FirewallRulesInner client = this.inner(); return client.getAsync(resourceGroupName, cacheName, ruleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RedisFirewallRule call(RedisFirewallRuleInner inner) { - return wrapModel(inner); + public Observable call(RedisFirewallRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RedisFirewallRule)wrapModel(inner)); + } } }); } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java index 63f60a140785..f3ab70be3fc1 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java @@ -18,14 +18,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.RedisLinkedServerWithProperties; class LinkedServersImpl extends WrapperImpl implements LinkedServers { - private final RedisManager manager; + private final CacheManager manager; - LinkedServersImpl(RedisManager manager) { + LinkedServersImpl(CacheManager manager) { super(manager.inner().linkedServers()); this.manager = manager; } - public RedisManager manager() { + public CacheManager manager() { return this.manager; } @@ -64,10 +64,14 @@ public RedisLinkedServerWithProperties call(RedisLinkedServerWithPropertiesInner public Observable getAsync(String resourceGroupName, String name, String linkedServerName) { LinkedServersInner client = this.inner(); return client.getAsync(resourceGroupName, name, linkedServerName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RedisLinkedServerWithProperties call(RedisLinkedServerWithPropertiesInner inner) { - return wrapModel(inner); + public Observable call(RedisLinkedServerWithPropertiesInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RedisLinkedServerWithProperties)wrapModel(inner)); + } } }); } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseImpl.java index cf1eefff5d88..43353bad0e24 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseImpl.java @@ -14,14 +14,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.UpgradeNotification; class NotificationListResponseImpl extends WrapperImpl implements NotificationListResponse { - private final RedisManager manager; - NotificationListResponseImpl(NotificationListResponseInner inner, RedisManager manager) { + private final CacheManager manager; + NotificationListResponseImpl(NotificationListResponseInner inner, CacheManager manager) { super(inner); this.manager = manager; } @Override - public RedisManager manager() { + public CacheManager manager() { return this.manager; } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationImpl.java index 9a1389708065..1992085d62df 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationImpl.java @@ -13,14 +13,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.OperationDisplay; class OperationImpl extends WrapperImpl implements Operation { - private final RedisManager manager; - OperationImpl(OperationInner inner, RedisManager manager) { + private final CacheManager manager; + OperationImpl(OperationInner inner, CacheManager manager) { super(inner); this.manager = manager; } @Override - public RedisManager manager() { + public CacheManager manager() { return this.manager; } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java index f8d148714f41..3c57cdd47908 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java @@ -17,14 +17,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.Operation; class OperationsImpl extends WrapperImpl implements Operations { - private final RedisManager manager; + private final CacheManager manager; - OperationsImpl(RedisManager manager) { + OperationsImpl(CacheManager manager) { super(manager.inner().operations()); this.manager = manager; } - public RedisManager manager() { + public CacheManager manager() { return this.manager; } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java index b358005ad2fa..57f2b7b9e501 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java @@ -18,14 +18,14 @@ import com.microsoft.azure.management.redis.v2018_03_01.RedisPatchSchedule; class PatchSchedulesImpl extends WrapperImpl implements PatchSchedules { - private final RedisManager manager; + private final CacheManager manager; - PatchSchedulesImpl(RedisManager manager) { + PatchSchedulesImpl(CacheManager manager) { super(manager.inner().patchSchedules()); this.manager = manager; } - public RedisManager manager() { + public CacheManager manager() { return this.manager; } @@ -64,10 +64,14 @@ public RedisPatchSchedule call(RedisPatchScheduleInner inner) { public Observable getAsync(String resourceGroupName, String name) { PatchSchedulesInner client = this.inner(); return client.getAsync(resourceGroupName, name) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RedisPatchSchedule call(RedisPatchScheduleInner inner) { - return wrapModel(inner); + public Observable call(RedisPatchScheduleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RedisPatchSchedule)wrapModel(inner)); + } } }); } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java index ca2df66d2c2f..3636aa11d49a 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesInner.java @@ -209,7 +209,7 @@ private ServiceResponse> listByRedisResourceDe } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). + * Create or replace the patching schedule for Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. @@ -224,7 +224,7 @@ public RedisPatchScheduleInner createOrUpdate(String resourceGroupName, String n } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). + * Create or replace the patching schedule for Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. @@ -238,7 +238,7 @@ public ServiceFuture createOrUpdateAsync(String resourc } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). + * Create or replace the patching schedule for Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. @@ -256,7 +256,7 @@ public RedisPatchScheduleInner call(ServiceResponse res } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). + * Create or replace the patching schedule for Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. @@ -307,7 +307,7 @@ private ServiceResponse createOrUpdateDelegate(Response } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -320,7 +320,7 @@ public void delete(String resourceGroupName, String name) { } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -333,7 +333,7 @@ public ServiceFuture deleteAsync(String resourceGroupName, String name, fi } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -350,7 +350,7 @@ public Void call(ServiceResponse response) { } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -394,7 +394,7 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -408,7 +408,7 @@ public RedisPatchScheduleInner get(String resourceGroupName, String name) { } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -421,7 +421,7 @@ public ServiceFuture getAsync(String resourceGroupName, } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. @@ -438,7 +438,7 @@ public RedisPatchScheduleInner call(ServiceResponse res } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysImpl.java index 630d8a3ce077..c99bb9514ec7 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysImpl.java @@ -12,14 +12,14 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; class RedisAccessKeysImpl extends WrapperImpl implements RedisAccessKeys { - private final RedisManager manager; - RedisAccessKeysImpl(RedisAccessKeysInner inner, RedisManager manager) { + private final CacheManager manager; + RedisAccessKeysImpl(RedisAccessKeysInner inner, CacheManager manager) { super(inner); this.manager = manager; } @Override - public RedisManager manager() { + public CacheManager manager() { return this.manager; } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java index c71b3ea6c82a..32a963c494d7 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java @@ -15,13 +15,13 @@ import rx.functions.Func1; class RedisFirewallRuleImpl extends CreatableUpdatableImpl implements RedisFirewallRule, RedisFirewallRule.Definition, RedisFirewallRule.Update { - private final RedisManager manager; + private final CacheManager manager; private String resourceGroupName; private String cacheName; private String ruleName; private RedisFirewallRuleCreateParameters createOrUpdateParameter; - RedisFirewallRuleImpl(String name, RedisManager manager) { + RedisFirewallRuleImpl(String name, CacheManager manager) { super(name, new RedisFirewallRuleInner()); this.manager = manager; // Set resource name @@ -30,7 +30,7 @@ class RedisFirewallRuleImpl extends CreatableUpdatableImpl implements RedisForceRebootResponse { - private final RedisManager manager; - RedisForceRebootResponseImpl(RedisForceRebootResponseInner inner, RedisManager manager) { + private final CacheManager manager; + RedisForceRebootResponseImpl(RedisForceRebootResponseInner inner, CacheManager manager) { super(inner); this.manager = manager; } @Override - public RedisManager manager() { + public CacheManager manager() { return this.manager; } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisImpl.java index 9b9f4dbb83e1..06256612d1bb 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisImpl.java @@ -31,8 +31,8 @@ import com.microsoft.azure.management.redis.v2018_03_01.CheckNameAvailabilityParameters; import com.microsoft.azure.management.redis.v2018_03_01.NotificationListResponse; -class RedisImpl extends GroupableResourcesCoreImpl implements Redis { - protected RedisImpl(RedisManager manager) { +class RedisImpl extends GroupableResourcesCoreImpl implements Redis { + protected RedisImpl(CacheManager manager) { super(manager.inner().redis(), manager); } diff --git a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java index 8cc5a092334f..6f645d853b19 100644 --- a/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java +++ b/sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java @@ -16,13 +16,13 @@ import rx.functions.Func1; class RedisLinkedServerWithPropertiesImpl extends CreatableUpdatableImpl implements RedisLinkedServerWithProperties, RedisLinkedServerWithProperties.Definition, RedisLinkedServerWithProperties.Update { - private final RedisManager manager; + private final CacheManager manager; private String resourceGroupName; private String name; private String linkedServerName; private RedisLinkedServerCreateParameters createOrUpdateParameter; - RedisLinkedServerWithPropertiesImpl(String name, RedisManager manager) { + RedisLinkedServerWithPropertiesImpl(String name, CacheManager manager) { super(name, new RedisLinkedServerWithPropertiesInner()); this.manager = manager; // Set resource name @@ -31,7 +31,7 @@ class RedisLinkedServerWithPropertiesImpl extends CreatableUpdatableImpl implements RedisPatchSchedule, RedisPatchSchedule.Definition, RedisPatchSchedule.Update { - private final RedisManager manager; + private final CacheManager manager; private String resourceGroupName; private String name; private List cscheduleEntries; private List uscheduleEntries; - RedisPatchScheduleImpl(String name, RedisManager manager) { + RedisPatchScheduleImpl(String name, CacheManager manager) { super(name, new RedisPatchScheduleInner()); this.manager = manager; // Set resource name @@ -29,7 +29,7 @@ class RedisPatchScheduleImpl extends CreatableUpdatableImpl implements RedisResource, RedisResource.Definition, RedisResource.Update { +class RedisResourceImpl extends GroupableResourceCoreImpl implements RedisResource, RedisResource.Definition, RedisResource.Update { private RedisCreateParameters createParameter; private RedisUpdateParameters updateParameter; - RedisResourceImpl(String name, RedisResourceInner inner, RedisManager manager) { + RedisResourceImpl(String name, RedisResourceInner inner, CacheManager manager) { super(name, inner, manager); this.createParameter = new RedisCreateParameters(); this.updateParameter = new RedisUpdateParameters();