diff --git a/redis/resource-manager/v2017_10_01/pom.xml b/redis/resource-manager/v2017_10_01/pom.xml deleted file mode 100644 index 0f5c735750ece..0000000000000 --- a/redis/resource-manager/v2017_10_01/pom.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - 4.0.0 - com.microsoft.azure.azure-mgmt-redis-2017-10-01 - - com.microsoft.azure - azure-arm-parent - 1.1.0 - ../../../pom.management.xml - - azure-mgmt-redis - 1.0.0-beta-SNAPSHOT - jar - Microsoft Azure SDK for Cache Management - This package contains Microsoft Cache Management SDK. - https://github.com/Azure/azure-libraries-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/CheckNameAvailabilityParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/CheckNameAvailabilityParameters.java deleted file mode 100644 index d1840cb769ac9..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/CheckNameAvailabilityParameters.java +++ /dev/null @@ -1,70 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters body to pass for name availability check. - */ -public class CheckNameAvailabilityParameters { - /** - * Resource name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Resource type. The only legal value of this property for checking redis - * cache name availability is 'Microsoft.Cache/redis'. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the CheckNameAvailabilityParameters object itself. - */ - public CheckNameAvailabilityParameters withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the CheckNameAvailabilityParameters object itself. - */ - public CheckNameAvailabilityParameters withType(String type) { - this.type = type; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/DayOfWeek.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/DayOfWeek.java deleted file mode 100644 index 8d5f75513a684..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/DayOfWeek.java +++ /dev/null @@ -1,74 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for DayOfWeek. - */ -public enum DayOfWeek { - /** Enum value Monday. */ - MONDAY("Monday"), - - /** Enum value Tuesday. */ - TUESDAY("Tuesday"), - - /** Enum value Wednesday. */ - WEDNESDAY("Wednesday"), - - /** Enum value Thursday. */ - THURSDAY("Thursday"), - - /** Enum value Friday. */ - FRIDAY("Friday"), - - /** Enum value Saturday. */ - SATURDAY("Saturday"), - - /** Enum value Sunday. */ - SUNDAY("Sunday"), - - /** Enum value Everyday. */ - EVERYDAY("Everyday"), - - /** Enum value Weekend. */ - WEEKEND("Weekend"); - - /** The actual serialized value for a DayOfWeek instance. */ - private String value; - - DayOfWeek(String value) { - this.value = 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. - */ - @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 this.value; - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ExportRDBParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ExportRDBParameters.java deleted file mode 100644 index f2757ebd8bf52..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ExportRDBParameters.java +++ /dev/null @@ -1,95 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters for Redis export operation. - */ -public class ExportRDBParameters { - /** - * File format. - */ - @JsonProperty(value = "format") - private String format; - - /** - * Prefix to use for exported files. - */ - @JsonProperty(value = "prefix", required = true) - private String prefix; - - /** - * Container name to export to. - */ - @JsonProperty(value = "container", required = true) - private String container; - - /** - * Get the format value. - * - * @return the format value - */ - public String format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the ExportRDBParameters object itself. - */ - public ExportRDBParameters withFormat(String format) { - this.format = format; - return this; - } - - /** - * Get the prefix value. - * - * @return the prefix value - */ - public String prefix() { - return this.prefix; - } - - /** - * Set the prefix value. - * - * @param prefix the prefix value to set - * @return the ExportRDBParameters object itself. - */ - public ExportRDBParameters withPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Get the container value. - * - * @return the container value - */ - public String container() { - return this.container; - } - - /** - * Set the container value. - * - * @param container the container value to set - * @return the ExportRDBParameters object itself. - */ - public ExportRDBParameters withContainer(String container) { - this.container = container; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/FirewallRules.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/FirewallRules.java deleted file mode 100644 index 705235fc01043..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/FirewallRules.java +++ /dev/null @@ -1,53 +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.v2017_10_01; - -import com.microsoft.azure.arm.collection.SupportsCreating; -import rx.Completable; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.FirewallRulesInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing FirewallRules. - */ -public interface FirewallRules extends SupportsCreating, HasInner { - /** - * Gets a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getAsync(String resourceGroupName, String cacheName, String ruleName); - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName); - - /** - * Deletes a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable deleteAsync(String resourceGroupName, String cacheName, String ruleName); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ImportRDBParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ImportRDBParameters.java deleted file mode 100644 index 5fbe331694d3a..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ImportRDBParameters.java +++ /dev/null @@ -1,70 +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.v2017_10_01; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters for Redis import operation. - */ -public class ImportRDBParameters { - /** - * File format. - */ - @JsonProperty(value = "format") - private String format; - - /** - * files to import. - */ - @JsonProperty(value = "files", required = true) - private List files; - - /** - * Get the format value. - * - * @return the format value - */ - public String format() { - return this.format; - } - - /** - * Set the format value. - * - * @param format the format value to set - * @return the ImportRDBParameters object itself. - */ - public ImportRDBParameters withFormat(String format) { - this.format = format; - return this; - } - - /** - * Get the files value. - * - * @return the files value - */ - public List files() { - return this.files; - } - - /** - * Set the files value. - * - * @param files the files value to set - * @return the ImportRDBParameters object itself. - */ - public ImportRDBParameters withFiles(List files) { - this.files = files; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/LinkedServers.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/LinkedServers.java deleted file mode 100644 index 1a6ae6bb8229c..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/LinkedServers.java +++ /dev/null @@ -1,53 +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.v2017_10_01; - -import com.microsoft.azure.arm.collection.SupportsCreating; -import rx.Completable; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.LinkedServersInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing LinkedServers. - */ -public interface LinkedServers extends SupportsCreating, HasInner { - /** - * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getAsync(String resourceGroupName, String name, String linkedServerName); - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listAsync(final String resourceGroupName, final String name); - - /** - * Deletes the linked server from a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable deleteAsync(String resourceGroupName, String name, String linkedServerName); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/NotificationListResponse.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/NotificationListResponse.java deleted file mode 100644 index c07e9f6f7d9ee..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/NotificationListResponse.java +++ /dev/null @@ -1,31 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.NotificationListResponseInner; -import java.util.List; - -/** - * Type representing NotificationListResponse. - */ -public interface NotificationListResponse extends HasInner, HasManager { - /** - * @return the nextLink value. - */ - String nextLink(); - - /** - * @return the value value. - */ - List value(); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operation.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operation.java deleted file mode 100644 index f956221824321..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operation.java +++ /dev/null @@ -1,30 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.OperationInner; - -/** - * Type representing Operation. - */ -public interface Operation extends HasInner, HasManager { - /** - * @return the display value. - */ - OperationDisplay display(); - - /** - * @return the name value. - */ - String name(); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/OperationDisplay.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/OperationDisplay.java deleted file mode 100644 index 2009fb5100f91..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/OperationDisplay.java +++ /dev/null @@ -1,121 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The object that describes the operation. - */ -public class OperationDisplay { - /** - * Friendly name of the resource provider. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Operation type: read, write, delete, listKeys/action, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Resource type on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Friendly name of the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operations.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operations.java deleted file mode 100644 index 2efdc2e362f6b..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Operations.java +++ /dev/null @@ -1,27 +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.v2017_10_01; - -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.OperationsInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing Operations. - */ -public interface Operations extends HasInner { - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listAsync(); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/PatchSchedules.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/PatchSchedules.java deleted file mode 100644 index 4660a062f99ee..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/PatchSchedules.java +++ /dev/null @@ -1,51 +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.v2017_10_01; - -import com.microsoft.azure.arm.collection.SupportsCreating; -import rx.Completable; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.PatchSchedulesInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing PatchSchedules. - */ -public interface PatchSchedules extends SupportsCreating, HasInner { - /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getAsync(String resourceGroupName, String name); - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName); - - /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable deleteAsync(String resourceGroupName, String name); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RebootType.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RebootType.java deleted file mode 100644 index c5929beeaef23..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RebootType.java +++ /dev/null @@ -1,44 +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.v2017_10_01; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for RebootType. - */ -public final class RebootType extends ExpandableStringEnum { - /** Static value PrimaryNode for RebootType. */ - public static final RebootType PRIMARY_NODE = fromString("PrimaryNode"); - - /** Static value SecondaryNode for RebootType. */ - public static final RebootType SECONDARY_NODE = fromString("SecondaryNode"); - - /** Static value AllNodes for RebootType. */ - public static final RebootType ALL_NODES = fromString("AllNodes"); - - /** - * Creates or finds a RebootType from its string representation. - * @param name a name to look for - * @return the corresponding RebootType - */ - @JsonCreator - public static RebootType fromString(String name) { - return fromString(name, RebootType.class); - } - - /** - * @return known RebootType values - */ - public static Collection values() { - return values(RebootType.class); - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Redis.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Redis.java deleted file mode 100644 index 296dac8a59eeb..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Redis.java +++ /dev/null @@ -1,100 +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.v2017_10_01; - -import com.microsoft.azure.arm.collection.SupportsCreating; -import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; -import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; -import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; -import rx.Observable; -import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; -import com.microsoft.azure.arm.collection.SupportsListing; -import rx.Completable; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing Redis. - */ -public interface Redis extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { - /** - * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listKeysAsync(String resourceGroupName, String name); - - /** - * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType); - - /** - * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters); - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable importDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters); - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable exportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters); - - /** - * Checks that the redis cache name is valid and is not already in use. - * - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Completable checkNameAvailabilityAsync(CheckNameAvailabilityParameters parameters); - - /** - * Gets any upgrade notifications for a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listUpgradeNotificationsAsync(String resourceGroupName, String name, double history); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisAccessKeys.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisAccessKeys.java deleted file mode 100644 index a713bdd881ab2..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisAccessKeys.java +++ /dev/null @@ -1,30 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisAccessKeysInner; - -/** - * Type representing RedisAccessKeys. - */ -public interface RedisAccessKeys extends HasInner, HasManager { - /** - * @return the primaryKey value. - */ - String primaryKey(); - - /** - * @return the secondaryKey value. - */ - String secondaryKey(); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisCreateParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisCreateParameters.java deleted file mode 100644 index e7f0512175ae3..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisCreateParameters.java +++ /dev/null @@ -1,287 +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.v2017_10_01; - -import java.util.Map; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Create Redis operation. - */ -@JsonFlatten -public class RedisCreateParameters { - /** - * 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; - - /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. - */ - @JsonProperty(value = "properties.enableNonSslPort") - private Boolean enableNonSslPort; - - /** - * A dictionary of tenant settings. - */ - @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 SKU of the Redis cache to deploy. - */ - @JsonProperty(value = "properties.sku", required = true) - private Sku sku; - - /** - * 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; - - /** - * Static IP address. Required when deploying a Redis cache inside an - * existing Azure Virtual Network. - */ - @JsonProperty(value = "properties.staticIP") - private String staticIP; - - /** - * A list of availability zones denoting where the resource needs to come - * from. - */ - @JsonProperty(value = "zones") - private List zones; - - /** - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters withShardCount(Integer shardCount) { - this.shardCount = shardCount; - 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters withSku(Sku sku) { - this.sku = sku; - 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters withStaticIP(String staticIP) { - this.staticIP = staticIP; - return this; - } - - /** - * Get the zones value. - * - * @return the zones value - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones value. - * - * @param zones the zones value to set - * @return the RedisCreateParameters object itself. - */ - public RedisCreateParameters withZones(List zones) { - this.zones = zones; - 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters 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 RedisCreateParameters object itself. - */ - public RedisCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRule.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRule.java deleted file mode 100644 index 61656c537cace..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRule.java +++ /dev/null @@ -1,115 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisFirewallRuleInner; -import com.microsoft.azure.arm.model.Indexable; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -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.v2017_10_01.implementation.RedisManager; - -/** - * Type representing RedisFirewallRule. - */ -public interface RedisFirewallRule extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the endIP value. - */ - String endIP(); - - /** - * @return the id value. - */ - String id(); - - /** - * @return the name value. - */ - String name(); - - /** - * @return the startIP value. - */ - String startIP(); - - /** - * @return the type value. - */ - String type(); - - /** - * The entirety of the RedisFirewallRule definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedis, DefinitionStages.WithEndIP, DefinitionStages.WithStartIP, DefinitionStages.WithCreate { - } - - /** - * Grouping of RedisFirewallRule definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a RedisFirewallRule definition. - */ - interface Blank extends WithRedis { - } - - /** - * The stage of the redisfirewallrule definition allowing to specify Redis. - */ - interface WithRedis { - /** - * Specifies resourceGroupName, cacheName. - */ - WithEndIP withExistingRedis(String resourceGroupName, String cacheName); - } - - /** - * The stage of the redisfirewallrule definition allowing to specify EndIP. - */ - interface WithEndIP { - /** - * Specifies endIP. - */ - WithStartIP withEndIP(String endIP); - } - - /** - * The stage of the redisfirewallrule definition allowing to specify StartIP. - */ - interface WithStartIP { - /** - * Specifies startIP. - */ - WithCreate withStartIP(String startIP); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable { - } - } - /** - * The template for a RedisFirewallRule update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable { - } - - /** - * Grouping of RedisFirewallRule update stages. - */ - interface UpdateStages { - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRuleCreateParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRuleCreateParameters.java deleted file mode 100644 index 7ecf1be96915f..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisFirewallRuleCreateParameters.java +++ /dev/null @@ -1,71 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters required for creating a firewall rule on redis cache. - */ -@JsonFlatten -public class RedisFirewallRuleCreateParameters { - /** - * lowest IP address included in the range. - */ - @JsonProperty(value = "properties.startIP", required = true) - private String startIP; - - /** - * highest IP address included in the range. - */ - @JsonProperty(value = "properties.endIP", required = true) - private String endIP; - - /** - * Get the startIP value. - * - * @return the startIP value - */ - public String startIP() { - return this.startIP; - } - - /** - * Set the startIP value. - * - * @param startIP the startIP value to set - * @return the RedisFirewallRuleCreateParameters object itself. - */ - public RedisFirewallRuleCreateParameters withStartIP(String startIP) { - this.startIP = startIP; - return this; - } - - /** - * Get the endIP value. - * - * @return the endIP value - */ - public String endIP() { - return this.endIP; - } - - /** - * Set the endIP value. - * - * @param endIP the endIP value to set - * @return the RedisFirewallRuleCreateParameters object itself. - */ - public RedisFirewallRuleCreateParameters withEndIP(String endIP) { - this.endIP = endIP; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisForceRebootResponse.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisForceRebootResponse.java deleted file mode 100644 index e479b6a2f00ff..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisForceRebootResponse.java +++ /dev/null @@ -1,25 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisForceRebootResponseInner; - -/** - * Type representing RedisForceRebootResponse. - */ -public interface RedisForceRebootResponse extends HasInner, HasManager { - /** - * @return the message value. - */ - String message(); - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisKeyType.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisKeyType.java deleted file mode 100644 index 69c02f8dd6bef..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisKeyType.java +++ /dev/null @@ -1,53 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for RedisKeyType. - */ -public enum RedisKeyType { - /** Enum value Primary. */ - PRIMARY("Primary"), - - /** Enum value Secondary. */ - SECONDARY("Secondary"); - - /** The actual serialized value for a RedisKeyType instance. */ - private String value; - - RedisKeyType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a RedisKeyType instance. - * - * @param value the serialized value to parse. - * @return the parsed RedisKeyType object, or null if unable to parse. - */ - @JsonCreator - public static RedisKeyType fromString(String value) { - RedisKeyType[] items = RedisKeyType.values(); - for (RedisKeyType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServer.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServer.java deleted file mode 100644 index a5a3468fa98ae..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServer.java +++ /dev/null @@ -1,32 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Linked server Id. - */ -public class RedisLinkedServer { - /** - * Linked server Id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerCreateParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerCreateParameters.java deleted file mode 100644 index 452699b683af0..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerCreateParameters.java +++ /dev/null @@ -1,98 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameter required for creating a linked server to redis cache. - */ -@JsonFlatten -public class RedisLinkedServerCreateParameters { - /** - * Fully qualified resourceId of the linked redis cache. - */ - @JsonProperty(value = "properties.linkedRedisCacheId", required = true) - private String linkedRedisCacheId; - - /** - * Location of the linked redis cache. - */ - @JsonProperty(value = "properties.linkedRedisCacheLocation", required = true) - private String linkedRedisCacheLocation; - - /** - * Role of the linked server. Possible values include: 'Primary', - * 'Secondary'. - */ - @JsonProperty(value = "properties.serverRole", required = true) - private ReplicationRole serverRole; - - /** - * Get the linkedRedisCacheId value. - * - * @return the linkedRedisCacheId value - */ - public String linkedRedisCacheId() { - return this.linkedRedisCacheId; - } - - /** - * Set the linkedRedisCacheId value. - * - * @param linkedRedisCacheId the linkedRedisCacheId value to set - * @return the RedisLinkedServerCreateParameters object itself. - */ - public RedisLinkedServerCreateParameters withLinkedRedisCacheId(String linkedRedisCacheId) { - this.linkedRedisCacheId = linkedRedisCacheId; - return this; - } - - /** - * Get the linkedRedisCacheLocation value. - * - * @return the linkedRedisCacheLocation value - */ - public String linkedRedisCacheLocation() { - return this.linkedRedisCacheLocation; - } - - /** - * Set the linkedRedisCacheLocation value. - * - * @param linkedRedisCacheLocation the linkedRedisCacheLocation value to set - * @return the RedisLinkedServerCreateParameters object itself. - */ - public RedisLinkedServerCreateParameters withLinkedRedisCacheLocation(String linkedRedisCacheLocation) { - this.linkedRedisCacheLocation = linkedRedisCacheLocation; - return this; - } - - /** - * Get the serverRole value. - * - * @return the serverRole value - */ - public ReplicationRole serverRole() { - return this.serverRole; - } - - /** - * Set the serverRole value. - * - * @param serverRole the serverRole value to set - * @return the RedisLinkedServerCreateParameters object itself. - */ - public RedisLinkedServerCreateParameters withServerRole(ReplicationRole serverRole) { - this.serverRole = serverRole; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerWithProperties.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerWithProperties.java deleted file mode 100644 index 4ff96e0372ee0..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisLinkedServerWithProperties.java +++ /dev/null @@ -1,135 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisLinkedServerWithPropertiesInner; -import com.microsoft.azure.arm.model.Indexable; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -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.v2017_10_01.implementation.RedisManager; - -/** - * Type representing RedisLinkedServerWithProperties. - */ -public interface RedisLinkedServerWithProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the id value. - */ - String id(); - - /** - * @return the linkedRedisCacheId value. - */ - String linkedRedisCacheId(); - - /** - * @return the linkedRedisCacheLocation value. - */ - String linkedRedisCacheLocation(); - - /** - * @return the name value. - */ - String name(); - - /** - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * @return the serverRole value. - */ - ReplicationRole serverRole(); - - /** - * @return the type value. - */ - String type(); - - /** - * The entirety of the RedisLinkedServerWithProperties definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedis, DefinitionStages.WithLinkedRedisCacheId, DefinitionStages.WithLinkedRedisCacheLocation, DefinitionStages.WithServerRole, DefinitionStages.WithCreate { - } - - /** - * Grouping of RedisLinkedServerWithProperties definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a RedisLinkedServerWithProperties definition. - */ - interface Blank extends WithRedis { - } - - /** - * The stage of the redislinkedserverwithproperties definition allowing to specify Redis. - */ - interface WithRedis { - /** - * Specifies resourceGroupName, name. - */ - WithLinkedRedisCacheId withExistingRedis(String resourceGroupName, String name); - } - - /** - * The stage of the redislinkedserverwithproperties definition allowing to specify LinkedRedisCacheId. - */ - interface WithLinkedRedisCacheId { - /** - * Specifies linkedRedisCacheId. - */ - WithLinkedRedisCacheLocation withLinkedRedisCacheId(String linkedRedisCacheId); - } - - /** - * The stage of the redislinkedserverwithproperties definition allowing to specify LinkedRedisCacheLocation. - */ - interface WithLinkedRedisCacheLocation { - /** - * Specifies linkedRedisCacheLocation. - */ - WithServerRole withLinkedRedisCacheLocation(String linkedRedisCacheLocation); - } - - /** - * The stage of the redislinkedserverwithproperties definition allowing to specify ServerRole. - */ - interface WithServerRole { - /** - * Specifies serverRole. - */ - WithCreate withServerRole(ReplicationRole serverRole); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable { - } - } - /** - * The template for a RedisLinkedServerWithProperties update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable { - } - - /** - * Grouping of RedisLinkedServerWithProperties update stages. - */ - interface UpdateStages { - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisPatchSchedule.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisPatchSchedule.java deleted file mode 100644 index ac9941257178b..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisPatchSchedule.java +++ /dev/null @@ -1,111 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisPatchScheduleInner; -import com.microsoft.azure.arm.model.Indexable; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -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.v2017_10_01.implementation.RedisManager; -import java.util.List; - -/** - * Type representing RedisPatchSchedule. - */ -public interface RedisPatchSchedule extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the id value. - */ - String id(); - - /** - * @return the name value. - */ - String name(); - - /** - * @return the scheduleEntries value. - */ - List scheduleEntries(); - - /** - * @return the type value. - */ - String type(); - - /** - * The entirety of the RedisPatchSchedule definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRedis, DefinitionStages.WithScheduleEntries, DefinitionStages.WithCreate { - } - - /** - * Grouping of RedisPatchSchedule definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a RedisPatchSchedule definition. - */ - interface Blank extends WithRedis { - } - - /** - * The stage of the redispatchschedule definition allowing to specify Redis. - */ - interface WithRedis { - /** - * Specifies resourceGroupName, name. - */ - WithScheduleEntries withExistingRedis(String resourceGroupName, String name); - } - - /** - * The stage of the redispatchschedule definition allowing to specify ScheduleEntries. - */ - interface WithScheduleEntries { - /** - * Specifies scheduleEntries. - */ - WithCreate withScheduleEntries(List scheduleEntries); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable { - } - } - /** - * The template for a RedisPatchSchedule update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable, UpdateStages.WithScheduleEntries { - } - - /** - * Grouping of RedisPatchSchedule update stages. - */ - interface UpdateStages { - /** - * The stage of the redispatchschedule update allowing to specify ScheduleEntries. - */ - interface WithScheduleEntries { - /** - * Specifies scheduleEntries. - */ - Update withScheduleEntries(List scheduleEntries); - } - - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRebootParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRebootParameters.java deleted file mode 100644 index 7223d097c3c80..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRebootParameters.java +++ /dev/null @@ -1,71 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specifies which Redis node(s) to reboot. - */ -public class RedisRebootParameters { - /** - * Which Redis node(s) to reboot. Depending on this value data loss is - * possible. Possible values include: 'PrimaryNode', 'SecondaryNode', - * 'AllNodes'. - */ - @JsonProperty(value = "rebootType", required = true) - private RebootType rebootType; - - /** - * If clustering is enabled, the ID of the shard to be rebooted. - */ - @JsonProperty(value = "shardId") - private Integer shardId; - - /** - * Get the rebootType value. - * - * @return the rebootType value - */ - public RebootType rebootType() { - return this.rebootType; - } - - /** - * Set the rebootType value. - * - * @param rebootType the rebootType value to set - * @return the RedisRebootParameters object itself. - */ - public RedisRebootParameters withRebootType(RebootType rebootType) { - this.rebootType = rebootType; - return this; - } - - /** - * Get the shardId value. - * - * @return the shardId value - */ - public Integer shardId() { - return this.shardId; - } - - /** - * Set the shardId value. - * - * @param shardId the shardId value to set - * @return the RedisRebootParameters object itself. - */ - public RedisRebootParameters withShardId(Integer shardId) { - this.shardId = shardId; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRegenerateKeyParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRegenerateKeyParameters.java deleted file mode 100644 index 12b13d28ac732..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisRegenerateKeyParameters.java +++ /dev/null @@ -1,44 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specifies which Redis access keys to reset. - */ -public class RedisRegenerateKeyParameters { - /** - * The Redis access key to regenerate. Possible values include: 'Primary', - * 'Secondary'. - */ - @JsonProperty(value = "keyType", required = true) - private RedisKeyType keyType; - - /** - * Get the keyType value. - * - * @return the keyType value - */ - public RedisKeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType value. - * - * @param keyType the keyType value to set - * @return the RedisRegenerateKeyParameters object itself. - */ - public RedisRegenerateKeyParameters withKeyType(RedisKeyType keyType) { - this.keyType = keyType; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisResource.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisResource.java deleted file mode 100644 index dbe298ed91ce0..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisResource.java +++ /dev/null @@ -1,275 +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.v2017_10_01; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.Resource; -import com.microsoft.azure.arm.resources.models.HasResourceGroup; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -import com.microsoft.azure.arm.model.Appliable; -import com.microsoft.azure.arm.model.Creatable; -import com.microsoft.azure.arm.resources.models.GroupableResourceCore; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisResourceInner; - -/** - * Type representing RedisResource. - */ -public interface RedisResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { - /** - * @return the accessKeys value. - */ - RedisAccessKeys accessKeys(); - - /** - * @return the enableNonSslPort value. - */ - Boolean enableNonSslPort(); - - /** - * @return the hostName value. - */ - String hostName(); - - /** - * @return the linkedServers value. - */ - List linkedServers(); - - /** - * @return the port value. - */ - Integer port(); - - /** - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * @return the redisConfiguration value. - */ - Map redisConfiguration(); - - /** - * @return the redisVersion value. - */ - String redisVersion(); - - /** - * @return the shardCount value. - */ - Integer shardCount(); - - /** - * @return the sku value. - */ - Sku sku(); - - /** - * @return the sslPort value. - */ - Integer sslPort(); - - /** - * @return the staticIP value. - */ - String staticIP(); - - /** - * @return the subnetId value. - */ - String subnetId(); - - /** - * @return the tenantSettings value. - */ - Map tenantSettings(); - - /** - * @return the zones value. - */ - List zones(); - - /** - * The entirety of the RedisResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { - } - - /** - * Grouping of RedisResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a RedisResource definition. - */ - interface Blank extends GroupableResourceCore.DefinitionWithRegion { - } - - /** - * The stage of the RedisResource definition allowing to specify the resource group. - */ - interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { - } - - /** - * The stage of the redisresource definition allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the redisresource update allowing to specify EnableNonSslPort. - */ - interface WithEnableNonSslPort { - /** - * Specifies enableNonSslPort. - */ - WithCreate withEnableNonSslPort(Boolean enableNonSslPort); - } - - /** - * The stage of the redisresource update allowing to specify RedisConfiguration. - */ - interface WithRedisConfiguration { - /** - * Specifies redisConfiguration. - */ - WithCreate withRedisConfiguration(Map redisConfiguration); - } - - /** - * The stage of the redisresource update allowing to specify ShardCount. - */ - interface WithShardCount { - /** - * Specifies shardCount. - */ - WithCreate withShardCount(Integer shardCount); - } - - /** - * The stage of the redisresource update allowing to specify StaticIP. - */ - interface WithStaticIP { - /** - * Specifies staticIP. - */ - WithCreate withStaticIP(String staticIP); - } - - /** - * The stage of the redisresource update allowing to specify SubnetId. - */ - interface WithSubnetId { - /** - * Specifies subnetId. - */ - WithCreate withSubnetId(String subnetId); - } - - /** - * The stage of the redisresource update allowing to specify TenantSettings. - */ - interface WithTenantSettings { - /** - * Specifies tenantSettings. - */ - WithCreate withTenantSettings(Map tenantSettings); - } - - /** - * The stage of the redisresource update allowing to specify Zones. - */ - interface WithZones { - /** - * Specifies zones. - */ - WithCreate withZones(List zones); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithEnableNonSslPort, DefinitionStages.WithRedisConfiguration, DefinitionStages.WithShardCount, DefinitionStages.WithStaticIP, DefinitionStages.WithSubnetId, DefinitionStages.WithTenantSettings, DefinitionStages.WithZones { - } - } - /** - * The template for a RedisResource update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEnableNonSslPort, UpdateStages.WithRedisConfiguration, UpdateStages.WithShardCount, UpdateStages.WithSku, UpdateStages.WithTenantSettings { - } - - /** - * Grouping of RedisResource update stages. - */ - interface UpdateStages { - /** - * The stage of the redisresource {0} allowing to specify EnableNonSslPort. - */ - interface WithEnableNonSslPort { - /** - * Specifies enableNonSslPort. - */ - Update withEnableNonSslPort(Boolean enableNonSslPort); - } - - /** - * The stage of the redisresource {0} allowing to specify RedisConfiguration. - */ - interface WithRedisConfiguration { - /** - * Specifies redisConfiguration. - */ - Update withRedisConfiguration(Map redisConfiguration); - } - - /** - * The stage of the redisresource {0} allowing to specify ShardCount. - */ - interface WithShardCount { - /** - * Specifies shardCount. - */ - Update withShardCount(Integer shardCount); - } - - /** - * The stage of the redisresource {0} allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - */ - Update withSku(Sku sku); - } - - /** - * The stage of the redisresource {0} allowing to specify TenantSettings. - */ - interface WithTenantSettings { - /** - * Specifies tenantSettings. - */ - Update withTenantSettings(Map tenantSettings); - } - - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisUpdateParameters.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisUpdateParameters.java deleted file mode 100644 index 817852fd0a07a..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisUpdateParameters.java +++ /dev/null @@ -1,178 +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.v2017_10_01; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters supplied to the Update Redis operation. - */ -@JsonFlatten -public class RedisUpdateParameters { - /** - * 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; - - /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. - */ - @JsonProperty(value = "properties.enableNonSslPort") - private Boolean enableNonSslPort; - - /** - * A dictionary of tenant settings. - */ - @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 SKU of the Redis cache to deploy. - */ - @JsonProperty(value = "properties.sku") - private Sku sku; - - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters withShardCount(Integer shardCount) { - this.shardCount = shardCount; - 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters withSku(Sku sku) { - this.sku = sku; - 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 RedisUpdateParameters object itself. - */ - public RedisUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ReplicationRole.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ReplicationRole.java deleted file mode 100644 index 7029d74933a2e..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ReplicationRole.java +++ /dev/null @@ -1,53 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ReplicationRole. - */ -public enum ReplicationRole { - /** Enum value Primary. */ - PRIMARY("Primary"), - - /** Enum value Secondary. */ - SECONDARY("Secondary"); - - /** The actual serialized value for a ReplicationRole instance. */ - private String value; - - ReplicationRole(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ReplicationRole instance. - * - * @param value the serialized value to parse. - * @return the parsed ReplicationRole object, or null if unable to parse. - */ - @JsonCreator - public static ReplicationRole fromString(String value) { - ReplicationRole[] items = ReplicationRole.values(); - for (ReplicationRole item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ScheduleEntry.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ScheduleEntry.java deleted file mode 100644 index 73d9be7b90fbf..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/ScheduleEntry.java +++ /dev/null @@ -1,98 +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.v2017_10_01; - -import org.joda.time.Period; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Patch schedule entry for a Premium Redis Cache. - */ -public class ScheduleEntry { - /** - * Day of the week when a cache can be patched. Possible values include: - * 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', - * 'Sunday', 'Everyday', 'Weekend'. - */ - @JsonProperty(value = "dayOfWeek", required = true) - private DayOfWeek dayOfWeek; - - /** - * Start hour after which cache patching can start. - */ - @JsonProperty(value = "startHourUtc", required = true) - private int startHourUtc; - - /** - * ISO8601 timespan specifying how much time cache patching can take. - */ - @JsonProperty(value = "maintenanceWindow") - private Period maintenanceWindow; - - /** - * Get the dayOfWeek value. - * - * @return the dayOfWeek value - */ - public DayOfWeek dayOfWeek() { - return this.dayOfWeek; - } - - /** - * Set the dayOfWeek value. - * - * @param dayOfWeek the dayOfWeek value to set - * @return the ScheduleEntry object itself. - */ - public ScheduleEntry withDayOfWeek(DayOfWeek dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Get the startHourUtc value. - * - * @return the startHourUtc value - */ - public int startHourUtc() { - return this.startHourUtc; - } - - /** - * Set the startHourUtc value. - * - * @param startHourUtc the startHourUtc value to set - * @return the ScheduleEntry object itself. - */ - public ScheduleEntry withStartHourUtc(int startHourUtc) { - this.startHourUtc = startHourUtc; - return this; - } - - /** - * Get the maintenanceWindow value. - * - * @return the maintenanceWindow value - */ - public Period maintenanceWindow() { - return this.maintenanceWindow; - } - - /** - * Set the maintenanceWindow value. - * - * @param maintenanceWindow the maintenanceWindow value to set - * @return the ScheduleEntry object itself. - */ - public ScheduleEntry withMaintenanceWindow(Period maintenanceWindow) { - this.maintenanceWindow = maintenanceWindow; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Sku.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Sku.java deleted file mode 100644 index 1e4e8cef940b6..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/Sku.java +++ /dev/null @@ -1,99 +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.v2017_10_01; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * SKU parameters supplied to the create Redis operation. - */ -public class Sku { - /** - * The type of Redis cache to deploy. Valid values: (Basic, Standard, - * Premium). Possible values include: 'Basic', 'Standard', 'Premium'. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /** - * The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = - * Premium). Possible values include: 'C', 'P'. - */ - @JsonProperty(value = "family", required = true) - private SkuFamily family; - - /** - * 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). - */ - @JsonProperty(value = "capacity", required = true) - private int capacity; - - /** - * Get the name value. - * - * @return the name value - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the family value. - * - * @return the family value - */ - public SkuFamily family() { - return this.family; - } - - /** - * Set the family value. - * - * @param family the family value to set - * @return the Sku object itself. - */ - public Sku withFamily(SkuFamily family) { - this.family = family; - return this; - } - - /** - * Get the capacity value. - * - * @return the capacity value - */ - public int capacity() { - return this.capacity; - } - - /** - * Set the capacity value. - * - * @param capacity the capacity value to set - * @return the Sku object itself. - */ - public Sku withCapacity(int capacity) { - this.capacity = capacity; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuFamily.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuFamily.java deleted file mode 100644 index c98ede6cd0422..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuFamily.java +++ /dev/null @@ -1,41 +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.v2017_10_01; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for SkuFamily. - */ -public final class SkuFamily extends ExpandableStringEnum { - /** Static value C for SkuFamily. */ - public static final SkuFamily C = fromString("C"); - - /** Static value P for SkuFamily. */ - public static final SkuFamily P = fromString("P"); - - /** - * Creates or finds a SkuFamily from its string representation. - * @param name a name to look for - * @return the corresponding SkuFamily - */ - @JsonCreator - public static SkuFamily fromString(String name) { - return fromString(name, SkuFamily.class); - } - - /** - * @return known SkuFamily values - */ - public static Collection values() { - return values(SkuFamily.class); - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuName.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuName.java deleted file mode 100644 index ec89db5b700a8..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/SkuName.java +++ /dev/null @@ -1,44 +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.v2017_10_01; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for SkuName. - */ -public final class SkuName extends ExpandableStringEnum { - /** Static value Basic for SkuName. */ - public static final SkuName BASIC = fromString("Basic"); - - /** Static value Standard for SkuName. */ - public static final SkuName STANDARD = fromString("Standard"); - - /** Static value Premium for SkuName. */ - public static final SkuName PREMIUM = fromString("Premium"); - - /** - * Creates or finds a SkuName from its string representation. - * @param name a name to look for - * @return the corresponding SkuName - */ - @JsonCreator - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** - * @return known SkuName values - */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/UpgradeNotification.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/UpgradeNotification.java deleted file mode 100644 index 982e90e71d53e..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/UpgradeNotification.java +++ /dev/null @@ -1,64 +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.v2017_10_01; - -import org.joda.time.DateTime; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Properties of upgrade notification. - */ -public class UpgradeNotification { - /** - * Name of upgrade notification. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Timestamp when upgrade notification occured. - */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) - private DateTime timestamp; - - /** - * Details about this upgrade notification. - */ - @JsonProperty(value = "upsellNotification", access = JsonProperty.Access.WRITE_ONLY) - private Map upsellNotification; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the timestamp value. - * - * @return the timestamp value - */ - public DateTime timestamp() { - return this.timestamp; - } - - /** - * Get the upsellNotification value. - * - * @return the upsellNotification value - */ - public Map upsellNotification() { - return this.upsellNotification; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesImpl.java deleted file mode 100644 index c837cb492a856..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesImpl.java +++ /dev/null @@ -1,100 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.redis.v2017_10_01.FirewallRules; -import rx.Completable; -import rx.Observable; -import rx.functions.Func1; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.redis.v2017_10_01.RedisFirewallRule; - -class FirewallRulesImpl extends WrapperImpl implements FirewallRules { - private final RedisManager manager; - - FirewallRulesImpl(RedisManager manager) { - super(manager.inner().firewallRules()); - this.manager = manager; - } - - public RedisManager manager() { - return this.manager; - } - - @Override - public RedisFirewallRuleImpl define(String name) { - return wrapModel(name); - } - - private RedisFirewallRuleImpl wrapModel(RedisFirewallRuleInner inner) { - return new RedisFirewallRuleImpl(inner, manager()); - } - - private RedisFirewallRuleImpl wrapModel(String name) { - return new RedisFirewallRuleImpl(name, this.manager()); - } - - private Observable> listByRedisResourceNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - FirewallRulesInner client = this.inner(); - return client.listByRedisResourceNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByRedisResourceNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { - FirewallRulesInner client = this.inner(); - return client.listByRedisResourceAsync(resourceGroupName, cacheName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByRedisResourceNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public RedisFirewallRule call(RedisFirewallRuleInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Observable getAsync(String resourceGroupName, String cacheName, String ruleName) { - FirewallRulesInner client = this.inner(); - return client.getAsync(resourceGroupName, cacheName, ruleName) - .map(new Func1() { - @Override - public RedisFirewallRule call(RedisFirewallRuleInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Completable deleteAsync(String resourceGroupName, String cacheName, String ruleName) { - FirewallRulesInner client = this.inner(); - return client.deleteAsync(resourceGroupName, cacheName, ruleName).toCompletable(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesInner.java deleted file mode 100644 index 8f57750865499..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/FirewallRulesInner.java +++ /dev/null @@ -1,609 +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.v2017_10_01.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.redis.v2017_10_01.RedisFirewallRuleCreateParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -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; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in FirewallRules. - */ -public class FirewallRulesInner { - /** The Retrofit service to perform REST calls. */ - private FirewallRulesService service; - /** The service client containing this operation class. */ - private RedisManagementClientImpl client; - - /** - * Initializes an instance of FirewallRulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public FirewallRulesInner(Retrofit retrofit, RedisManagementClientImpl client) { - this.service = retrofit.create(FirewallRulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for FirewallRules to be - * used by Retrofit to perform actually REST calls. - */ - interface FirewallRulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.FirewallRules listByRedisResource" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules") - Observable> listByRedisResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("cacheName") String cacheName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.FirewallRules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("cacheName") String cacheName, @Path("ruleName") String ruleName, @Path("subscriptionId") String subscriptionId, @Body RedisFirewallRuleCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.FirewallRules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("cacheName") String cacheName, @Path("ruleName") String ruleName, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.FirewallRules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("cacheName") String cacheName, @Path("ruleName") String ruleName, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.FirewallRules listByRedisResourceNext" }) - @GET - Observable> listByRedisResourceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisFirewallRuleInner> object if successful. - */ - public PagedList listByRedisResource(final String resourceGroupName, final String cacheName) { - ServiceResponse> response = listByRedisResourceSinglePageAsync(resourceGroupName, cacheName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRedisResourceAsync(final String resourceGroupName, final String cacheName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByRedisResourceSinglePageAsync(resourceGroupName, cacheName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisFirewallRuleInner> object - */ - public Observable> listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { - return listByRedisResourceWithServiceResponseAsync(resourceGroupName, cacheName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisFirewallRuleInner> object - */ - public Observable>> listByRedisResourceWithServiceResponseAsync(final String resourceGroupName, final String cacheName) { - return listByRedisResourceSinglePageAsync(resourceGroupName, cacheName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByRedisResourceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisFirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByRedisResourceSinglePageAsync(final String resourceGroupName, final String cacheName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (cacheName == null) { - throw new IllegalArgumentException("Parameter cacheName 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.listByRedisResource(this.client.subscriptionId(), resourceGroupName, cacheName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRedisResourceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByRedisResourceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update a redis cache firewall rule. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisFirewallRuleInner object if successful. - */ - public RedisFirewallRuleInner createOrUpdate(String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleCreateParameters parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, cacheName, ruleName, parameters).toBlocking().single().body(); - } - - /** - * Create or update a redis cache firewall rule. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, cacheName, ruleName, parameters), serviceCallback); - } - - /** - * Create or update a redis cache firewall rule. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisFirewallRuleInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleCreateParameters parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, cacheName, ruleName, parameters).map(new Func1, RedisFirewallRuleInner>() { - @Override - public RedisFirewallRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a redis cache firewall rule. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param parameters Parameters supplied to the create or update redis firewall rule operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisFirewallRuleInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String cacheName, String ruleName, RedisFirewallRuleCreateParameters parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (cacheName == null) { - throw new IllegalArgumentException("Parameter cacheName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName 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.createOrUpdate(resourceGroupName, cacheName, ruleName, 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 = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisFirewallRuleInner object if successful. - */ - public RedisFirewallRuleInner get(String resourceGroupName, String cacheName, String ruleName) { - return getWithServiceResponseAsync(resourceGroupName, cacheName, ruleName).toBlocking().single().body(); - } - - /** - * Gets a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String cacheName, String ruleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, cacheName, ruleName), serviceCallback); - } - - /** - * Gets a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisFirewallRuleInner object - */ - public Observable getAsync(String resourceGroupName, String cacheName, String ruleName) { - return getWithServiceResponseAsync(resourceGroupName, cacheName, ruleName).map(new Func1, RedisFirewallRuleInner>() { - @Override - public RedisFirewallRuleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisFirewallRuleInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String cacheName, String ruleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (cacheName == null) { - throw new IllegalArgumentException("Parameter cacheName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName 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.get(resourceGroupName, cacheName, ruleName, 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 = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String cacheName, String ruleName) { - deleteWithServiceResponseAsync(resourceGroupName, cacheName, ruleName).toBlocking().single().body(); - } - - /** - * Deletes a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String cacheName, String ruleName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, cacheName, ruleName), serviceCallback); - } - - /** - * Deletes a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String cacheName, String ruleName) { - return deleteWithServiceResponseAsync(resourceGroupName, cacheName, ruleName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a single firewall rule in a specified redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param ruleName The name of the firewall rule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String cacheName, String ruleName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (cacheName == null) { - throw new IllegalArgumentException("Parameter cacheName is required and cannot be null."); - } - if (ruleName == null) { - throw new IllegalArgumentException("Parameter ruleName 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.delete(resourceGroupName, cacheName, ruleName, 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); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisFirewallRuleInner> object if successful. - */ - public PagedList listByRedisResourceNext(final String nextPageLink) { - ServiceResponse> response = listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRedisResourceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByRedisResourceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisFirewallRuleInner> object - */ - public Observable> listByRedisResourceNextAsync(final String nextPageLink) { - return listByRedisResourceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisFirewallRuleInner> object - */ - public Observable>> listByRedisResourceNextWithServiceResponseAsync(final String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByRedisResourceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all firewall rules in the specified redis cache. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisFirewallRuleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByRedisResourceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByRedisResourceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRedisResourceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByRedisResourceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/IdParsingUtils.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/IdParsingUtils.java deleted file mode 100644 index 1ded2a5d95cc2..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/IdParsingUtils.java +++ /dev/null @@ -1,57 +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.v2017_10_01.implementation; -import java.util.Arrays; -import java.util.Iterator; - -class IdParsingUtils { - public static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterable iterable = Arrays.asList(id.split("/")); - Iterator itr = iterable.iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && part.trim() != "") { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - public static String getValueFromIdByPosition(String id, int pos) { - if (id == null) { - return null; - } - Iterable iterable = Arrays.asList(id.split("/")); - Iterator itr = iterable.iterator(); - int index = 0; - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && part.trim() != "") { - if (index == pos) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - index++; - } - return null; - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersImpl.java deleted file mode 100644 index 1ae434e2519ed..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersImpl.java +++ /dev/null @@ -1,100 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.redis.v2017_10_01.LinkedServers; -import rx.Completable; -import rx.Observable; -import rx.functions.Func1; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServerWithProperties; - -class LinkedServersImpl extends WrapperImpl implements LinkedServers { - private final RedisManager manager; - - LinkedServersImpl(RedisManager manager) { - super(manager.inner().linkedServers()); - this.manager = manager; - } - - public RedisManager manager() { - return this.manager; - } - - @Override - public RedisLinkedServerWithPropertiesImpl define(String name) { - return wrapModel(name); - } - - private RedisLinkedServerWithPropertiesImpl wrapModel(RedisLinkedServerWithPropertiesInner inner) { - return new RedisLinkedServerWithPropertiesImpl(inner, manager()); - } - - private RedisLinkedServerWithPropertiesImpl wrapModel(String name) { - return new RedisLinkedServerWithPropertiesImpl(name, this.manager()); - } - - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - LinkedServersInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listAsync(final String resourceGroupName, final String name) { - LinkedServersInner client = this.inner(); - return client.listAsync(resourceGroupName, name) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public RedisLinkedServerWithProperties call(RedisLinkedServerWithPropertiesInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Observable getAsync(String resourceGroupName, String name, String linkedServerName) { - LinkedServersInner client = this.inner(); - return client.getAsync(resourceGroupName, name, linkedServerName) - .map(new Func1() { - @Override - public RedisLinkedServerWithProperties call(RedisLinkedServerWithPropertiesInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Completable deleteAsync(String resourceGroupName, String name, String linkedServerName) { - LinkedServersInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name, linkedServerName).toCompletable(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersInner.java deleted file mode 100644 index 70afb38a71e18..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/LinkedServersInner.java +++ /dev/null @@ -1,696 +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.v2017_10_01.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServerCreateParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -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; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in LinkedServers. - */ -public class LinkedServersInner { - /** The Retrofit service to perform REST calls. */ - private LinkedServersService service; - /** The service client containing this operation class. */ - private RedisManagementClientImpl client; - - /** - * Initializes an instance of LinkedServersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public LinkedServersInner(Retrofit retrofit, RedisManagementClientImpl client) { - this.service = retrofit.create(LinkedServersService.class); - this.client = client; - } - - /** - * The interface defining all the services for LinkedServers to be - * used by Retrofit to perform actually REST calls. - */ - interface LinkedServersService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("linkedServerName") String linkedServerName, @Path("subscriptionId") String subscriptionId, @Body RedisLinkedServerCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers beginCreate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}") - Observable> beginCreate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("linkedServerName") String linkedServerName, @Path("subscriptionId") String subscriptionId, @Body RedisLinkedServerCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("linkedServerName") String linkedServerName, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("linkedServerName") String linkedServerName, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers") - Observable> list(@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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.LinkedServers listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisLinkedServerWithPropertiesInner object if successful. - */ - public RedisLinkedServerWithPropertiesInner create(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters).toBlocking().last().body(); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters), serviceCallback); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters).map(new Func1, RedisLinkedServerWithPropertiesInner>() { - @Override - public RedisLinkedServerWithPropertiesInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters 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 (linkedServerName == null) { - throw new IllegalArgumentException("Parameter linkedServerName 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, linkedServerName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisLinkedServerWithPropertiesInner object if successful. - */ - public RedisLinkedServerWithPropertiesInner beginCreate(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters).toBlocking().single().body(); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters), serviceCallback); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisLinkedServerWithPropertiesInner object - */ - public Observable beginCreateAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, name, linkedServerName, parameters).map(new Func1, RedisLinkedServerWithPropertiesInner>() { - @Override - public RedisLinkedServerWithPropertiesInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Adds a linked server to the Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param parameters Parameters supplied to the Create Linked server operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisLinkedServerWithPropertiesInner object - */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String name, String linkedServerName, RedisLinkedServerCreateParameters 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 (linkedServerName == null) { - throw new IllegalArgumentException("Parameter linkedServerName 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, linkedServerName, 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the linked server from a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String name, String linkedServerName) { - deleteWithServiceResponseAsync(resourceGroupName, name, linkedServerName).toBlocking().single().body(); - } - - /** - * Deletes the linked server from a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String name, String linkedServerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name, linkedServerName), serviceCallback); - } - - /** - * Deletes the linked server from a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String name, String linkedServerName) { - return deleteWithServiceResponseAsync(resourceGroupName, name, linkedServerName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the linked server from a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server that is being added to the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name, String linkedServerName) { - 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 (linkedServerName == null) { - throw new IllegalArgumentException("Parameter linkedServerName 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.delete(resourceGroupName, name, linkedServerName, 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); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisLinkedServerWithPropertiesInner object if successful. - */ - public RedisLinkedServerWithPropertiesInner get(String resourceGroupName, String name, String linkedServerName) { - return getWithServiceResponseAsync(resourceGroupName, name, linkedServerName).toBlocking().single().body(); - } - - /** - * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String name, String linkedServerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, name, linkedServerName), serviceCallback); - } - - /** - * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisLinkedServerWithPropertiesInner object - */ - public Observable getAsync(String resourceGroupName, String name, String linkedServerName) { - return getWithServiceResponseAsync(resourceGroupName, name, linkedServerName).map(new Func1, RedisLinkedServerWithPropertiesInner>() { - @Override - public RedisLinkedServerWithPropertiesInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the detailed information about a linked server of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @param linkedServerName The name of the linked server. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisLinkedServerWithPropertiesInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String name, String linkedServerName) { - 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 (linkedServerName == null) { - throw new IllegalArgumentException("Parameter linkedServerName 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.get(resourceGroupName, name, linkedServerName, 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 = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisLinkedServerWithPropertiesInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String name) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisLinkedServerWithPropertiesInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String name) { - return listWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisLinkedServerWithPropertiesInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String name) { - return listSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisLinkedServerWithPropertiesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final 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.list(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> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisLinkedServerWithPropertiesInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisLinkedServerWithPropertiesInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisLinkedServerWithPropertiesInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the list of linked servers associated with this redis cache (requires Premium SKU). - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisLinkedServerWithPropertiesInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseImpl.java deleted file mode 100644 index 3e8dfbf831acc..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseImpl.java +++ /dev/null @@ -1,38 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.NotificationListResponse; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.UpgradeNotification; - -class NotificationListResponseImpl extends WrapperImpl implements NotificationListResponse { - private final RedisManager manager; - NotificationListResponseImpl(NotificationListResponseInner inner, RedisManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public String nextLink() { - return this.inner().nextLink(); - } - - @Override - public List value() { - return this.inner().value(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseInner.java deleted file mode 100644 index 4dd1eb4a38bf4..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/NotificationListResponseInner.java +++ /dev/null @@ -1,60 +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.v2017_10_01.implementation; - -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.UpgradeNotification; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The response of listUpgradeNotifications. - */ -public class NotificationListResponseInner { - /** - * List of all notifications. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Link for next set of notifications. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the NotificationListResponseInner object itself. - */ - public NotificationListResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationImpl.java deleted file mode 100644 index c538672aa1f71..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationImpl.java +++ /dev/null @@ -1,37 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.Operation; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.redis.v2017_10_01.OperationDisplay; - -class OperationImpl extends WrapperImpl implements Operation { - private final RedisManager manager; - OperationImpl(OperationInner inner, RedisManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public OperationDisplay display() { - return this.inner().display(); - } - - @Override - public String name() { - return this.inner().name(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationInner.java deleted file mode 100644 index ce6cd5daa27b4..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationInner.java +++ /dev/null @@ -1,70 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * REST API operation. - */ -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The object that describes the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsImpl.java deleted file mode 100644 index 8cd054352c50d..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsImpl.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. - * abc - */ - -package com.microsoft.azure.management.redis.v2017_10_01.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.redis.v2017_10_01.Operations; -import rx.functions.Func1; -import rx.Observable; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.redis.v2017_10_01.Operation; - -class OperationsImpl extends WrapperImpl implements Operations { - private final RedisManager manager; - - OperationsImpl(RedisManager manager) { - super(manager.inner().operations()); - this.manager = manager; - } - - public RedisManager manager() { - return this.manager; - } - - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - OperationsInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listAsync() { - OperationsInner client = this.inner(); - return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public Operation call(OperationInner inner) { - return new OperationImpl(inner, manager()); - } - }); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsInner.java deleted file mode 100644 index 81450f431b55b..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +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.v2017_10_01.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private RedisManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, RedisManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Operations list" }) - @GET("providers/Microsoft.Cache/operations") - Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available REST API operations of the Microsoft.Cache provider. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PageImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PageImpl.java deleted file mode 100644 index 49c379362726e..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PageImpl.java +++ /dev/null @@ -1,75 +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.v2017_10_01.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Page; -import java.util.List; - -/** - * An instance of this class defines a page of Azure resources and a link to - * get the next page of resources, if any. - * - * @param type of Azure resource - */ -public class PageImpl implements Page { - /** - * The link to the next page. - */ - @JsonProperty("nextLink") - private String nextPageLink; - - /** - * The list of items. - */ - @JsonProperty("value") - private List items; - - /** - * Gets the link to the next page. - * - * @return the link to the next page. - */ - @Override - public String nextPageLink() { - return this.nextPageLink; - } - - /** - * Gets the list of items. - * - * @return the list of items in {@link List}. - */ - @Override - public List items() { - return items; - } - - /** - * Sets the link to the next page. - * - * @param nextPageLink the link to the next page. - * @return this Page object itself. - */ - public PageImpl setNextPageLink(String nextPageLink) { - this.nextPageLink = nextPageLink; - return this; - } - - /** - * Sets the list of items. - * - * @param items the list of items in {@link List}. - * @return this Page object itself. - */ - public PageImpl setItems(List items) { - this.items = items; - return this; - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesImpl.java deleted file mode 100644 index 868fe29dcdec0..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesImpl.java +++ /dev/null @@ -1,100 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules; -import rx.Completable; -import rx.Observable; -import rx.functions.Func1; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.redis.v2017_10_01.RedisPatchSchedule; - -class PatchSchedulesImpl extends WrapperImpl implements PatchSchedules { - private final RedisManager manager; - - PatchSchedulesImpl(RedisManager manager) { - super(manager.inner().patchSchedules()); - this.manager = manager; - } - - public RedisManager manager() { - return this.manager; - } - - @Override - public RedisPatchScheduleImpl define(String name) { - return wrapModel(name); - } - - private RedisPatchScheduleImpl wrapModel(RedisPatchScheduleInner inner) { - return new RedisPatchScheduleImpl(inner, manager()); - } - - private RedisPatchScheduleImpl wrapModel(String name) { - return new RedisPatchScheduleImpl(name, this.manager()); - } - - private Observable> listByRedisResourceNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - PatchSchedulesInner client = this.inner(); - return client.listByRedisResourceNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByRedisResourceNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { - PatchSchedulesInner client = this.inner(); - return client.listByRedisResourceAsync(resourceGroupName, cacheName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByRedisResourceNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public RedisPatchSchedule call(RedisPatchScheduleInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Observable getAsync(String resourceGroupName, String name) { - PatchSchedulesInner client = this.inner(); - return client.getAsync(resourceGroupName, name) - .map(new Func1() { - @Override - public RedisPatchSchedule call(RedisPatchScheduleInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public Completable deleteAsync(String resourceGroupName, String name) { - PatchSchedulesInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name).toCompletable(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesInner.java deleted file mode 100644 index 43b64bb6acb10..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/PatchSchedulesInner.java +++ /dev/null @@ -1,594 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.collection.InnerSupportsDelete; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.redis.v2017_10_01.ScheduleEntry; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -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; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in PatchSchedules. - */ -public class PatchSchedulesInner implements InnerSupportsDelete { - /** The Retrofit service to perform REST calls. */ - private PatchSchedulesService service; - /** The service client containing this operation class. */ - private RedisManagementClientImpl client; - - /** - * Initializes an instance of PatchSchedulesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public PatchSchedulesInner(Retrofit retrofit, RedisManagementClientImpl client) { - this.service = retrofit.create(PatchSchedulesService.class); - this.client = client; - } - - /** - * The interface defining all the services for PatchSchedules to be - * used by Retrofit to perform actually REST calls. - */ - interface PatchSchedulesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules listByRedisResource" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/patchSchedules") - Observable> listByRedisResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("cacheName") String cacheName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("default") String defaultParameter, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RedisPatchScheduleInner parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("default") String defaultParameter, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("default") String defaultParameter, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules listByRedisResourceNext" }) - @GET - Observable> listByRedisResourceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisPatchScheduleInner> object if successful. - */ - public PagedList listByRedisResource(final String resourceGroupName, final String cacheName) { - ServiceResponse> response = listByRedisResourceSinglePageAsync(resourceGroupName, cacheName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRedisResourceAsync(final String resourceGroupName, final String cacheName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByRedisResourceSinglePageAsync(resourceGroupName, cacheName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisPatchScheduleInner> object - */ - public Observable> listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { - return listByRedisResourceWithServiceResponseAsync(resourceGroupName, cacheName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param resourceGroupName The name of the resource group. - * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisPatchScheduleInner> object - */ - public Observable>> listByRedisResourceWithServiceResponseAsync(final String resourceGroupName, final String cacheName) { - return listByRedisResourceSinglePageAsync(resourceGroupName, cacheName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByRedisResourceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param cacheName The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisPatchScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByRedisResourceSinglePageAsync(final String resourceGroupName, final String cacheName) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (cacheName == null) { - throw new IllegalArgumentException("Parameter cacheName 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.listByRedisResource(this.client.subscriptionId(), resourceGroupName, cacheName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRedisResourceDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByRedisResourceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisPatchScheduleInner object if successful. - */ - public RedisPatchScheduleInner createOrUpdate(String resourceGroupName, String name, List scheduleEntries) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).toBlocking().single().body(); - } - - /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String name, List scheduleEntries, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries), serviceCallback); - } - - /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisPatchScheduleInner object - */ - public Observable createOrUpdateAsync(String resourceGroupName, String name, List scheduleEntries) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).map(new Func1, RedisPatchScheduleInner>() { - @Override - public RedisPatchScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param scheduleEntries List of patch schedules for a Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisPatchScheduleInner object - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, List scheduleEntries) { - 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."); - } - if (scheduleEntries == null) { - throw new IllegalArgumentException("Parameter scheduleEntries is required and cannot be null."); - } - Validator.validate(scheduleEntries); - final String defaultParameter = "default"; - RedisPatchScheduleInner parameters = new RedisPatchScheduleInner(); - parameters.withScheduleEntries(scheduleEntries); - return service.createOrUpdate(resourceGroupName, name, defaultParameter, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable deleteAsync(String resourceGroupName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> deleteWithServiceResponseAsync(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."); - } - final String defaultParameter = "default"; - return service.delete(resourceGroupName, name, defaultParameter, 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); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisPatchScheduleInner object if successful. - */ - public RedisPatchScheduleInner get(String resourceGroupName, String name) { - return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisPatchScheduleInner object - */ - public Observable getAsync(String resourceGroupName, String name) { - return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisPatchScheduleInner>() { - @Override - public RedisPatchScheduleInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the patching schedule of a redis cache (requires Premium SKU). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisPatchScheduleInner object - */ - public Observable> getWithServiceResponseAsync(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."); - } - final String defaultParameter = "default"; - return service.get(resourceGroupName, name, defaultParameter, 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 = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisPatchScheduleInner> object if successful. - */ - public PagedList listByRedisResourceNext(final String nextPageLink) { - ServiceResponse> response = listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByRedisResourceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByRedisResourceNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisPatchScheduleInner> object - */ - public Observable> listByRedisResourceNextAsync(final String nextPageLink) { - return listByRedisResourceNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisPatchScheduleInner> object - */ - public Observable>> listByRedisResourceNextWithServiceResponseAsync(final String nextPageLink) { - return listByRedisResourceNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByRedisResourceNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all patch schedules in the specified redis cache (there is only one). - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisPatchScheduleInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByRedisResourceNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByRedisResourceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByRedisResourceNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByRedisResourceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysImpl.java deleted file mode 100644 index 575d0a7a878f2..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysImpl.java +++ /dev/null @@ -1,36 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.RedisAccessKeys; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; - -class RedisAccessKeysImpl extends WrapperImpl implements RedisAccessKeys { - private final RedisManager manager; - RedisAccessKeysImpl(RedisAccessKeysInner inner, RedisManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public String primaryKey() { - return this.inner().primaryKey(); - } - - @Override - public String secondaryKey() { - return this.inner().secondaryKey(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysInner.java deleted file mode 100644 index 740e9a262ac0c..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisAccessKeysInner.java +++ /dev/null @@ -1,49 +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.v2017_10_01.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Redis cache access keys. - */ -public class RedisAccessKeysInner { - /** - * The current primary key that clients can use to authenticate with Redis - * cache. - */ - @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) - private String primaryKey; - - /** - * The current secondary key that clients can use to authenticate with - * Redis cache. - */ - @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) - private String secondaryKey; - - /** - * Get the primaryKey value. - * - * @return the primaryKey value - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Get the secondaryKey value. - * - * @return the secondaryKey value - */ - public String secondaryKey() { - return this.secondaryKey; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleImpl.java deleted file mode 100644 index 045ec7aa6e08c..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleImpl.java +++ /dev/null @@ -1,138 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.RedisFirewallRule; -import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.RedisFirewallRuleCreateParameters; -import rx.functions.Func1; - -class RedisFirewallRuleImpl extends CreatableUpdatableImpl implements RedisFirewallRule, RedisFirewallRule.Definition, RedisFirewallRule.Update { - private final RedisManager manager; - private String resourceGroupName; - private String cacheName; - private String ruleName; - private RedisFirewallRuleCreateParameters createOrUpdateParameter; - - RedisFirewallRuleImpl(String name, RedisManager manager) { - super(name, new RedisFirewallRuleInner()); - this.manager = manager; - // Set resource name - this.ruleName = name; - // - this.createOrUpdateParameter = new RedisFirewallRuleCreateParameters(); - } - - RedisFirewallRuleImpl(RedisFirewallRuleInner inner, RedisManager manager) { - super(inner.name(), inner); - this.manager = manager; - // Set resource name - this.ruleName = inner.name(); - // resource ancestor names - this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); - this.cacheName = IdParsingUtils.getValueFromIdByName(inner.id(), "Redis"); - this.ruleName = IdParsingUtils.getValueFromIdByName(inner.id(), "firewallRules"); - // - this.createOrUpdateParameter = new RedisFirewallRuleCreateParameters(); - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public Observable createResourceAsync() { - FirewallRulesInner client = this.manager().inner().firewallRules(); - return client.createOrUpdateAsync(this.resourceGroupName, this.cacheName, this.ruleName, this.createOrUpdateParameter) - .map(new Func1() { - @Override - public RedisFirewallRuleInner call(RedisFirewallRuleInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - public Observable updateResourceAsync() { - FirewallRulesInner client = this.manager().inner().firewallRules(); - return client.createOrUpdateAsync(this.resourceGroupName, this.cacheName, this.ruleName, this.createOrUpdateParameter) - .map(new Func1() { - @Override - public RedisFirewallRuleInner call(RedisFirewallRuleInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - protected Observable getInnerAsync() { - FirewallRulesInner client = this.manager().inner().firewallRules(); - return client.getAsync(this.resourceGroupName, this.cacheName, this.ruleName); - } - - @Override - public boolean isInCreateMode() { - return this.inner().id() == null; - } - - private void resetCreateUpdateParameters() { - this.createOrUpdateParameter = new RedisFirewallRuleCreateParameters(); - } - - @Override - public String endIP() { - return this.inner().endIP(); - } - - @Override - public String id() { - return this.inner().id(); - } - - @Override - public String name() { - return this.inner().name(); - } - - @Override - public String startIP() { - return this.inner().startIP(); - } - - @Override - public String type() { - return this.inner().type(); - } - - @Override - public RedisFirewallRuleImpl withExistingRedis(String resourceGroupName, String cacheName) { - this.resourceGroupName = resourceGroupName; - this.cacheName = cacheName; - return this; - } - - @Override - public RedisFirewallRuleImpl withEndIP(String endIP) { - this.createOrUpdateParameter.withEndIP(endIP); - return this; - } - - @Override - public RedisFirewallRuleImpl withStartIP(String startIP) { - this.createOrUpdateParameter.withStartIP(startIP); - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleInner.java deleted file mode 100644 index 0c682272db0e0..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisFirewallRuleInner.java +++ /dev/null @@ -1,73 +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.v2017_10_01.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.ProxyResource; - -/** - * A firewall rule on a redis cache has a name, and describes a contiguous - * range of IP addresses permitted to connect. - */ -@JsonFlatten -public class RedisFirewallRuleInner extends ProxyResource { - /** - * lowest IP address included in the range. - */ - @JsonProperty(value = "properties.startIP", required = true) - private String startIP; - - /** - * highest IP address included in the range. - */ - @JsonProperty(value = "properties.endIP", required = true) - private String endIP; - - /** - * Get the startIP value. - * - * @return the startIP value - */ - public String startIP() { - return this.startIP; - } - - /** - * Set the startIP value. - * - * @param startIP the startIP value to set - * @return the RedisFirewallRuleInner object itself. - */ - public RedisFirewallRuleInner withStartIP(String startIP) { - this.startIP = startIP; - return this; - } - - /** - * Get the endIP value. - * - * @return the endIP value - */ - public String endIP() { - return this.endIP; - } - - /** - * Set the endIP value. - * - * @param endIP the endIP value to set - * @return the RedisFirewallRuleInner object itself. - */ - public RedisFirewallRuleInner withEndIP(String endIP) { - this.endIP = endIP; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseImpl.java deleted file mode 100644 index 72d7935cd13e8..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseImpl.java +++ /dev/null @@ -1,31 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.RedisForceRebootResponse; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; - -class RedisForceRebootResponseImpl extends WrapperImpl implements RedisForceRebootResponse { - private final RedisManager manager; - RedisForceRebootResponseImpl(RedisForceRebootResponseInner inner, RedisManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public String message() { - return this.inner().message(); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseInner.java deleted file mode 100644 index a5df5b9d5c364..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisForceRebootResponseInner.java +++ /dev/null @@ -1,32 +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.v2017_10_01.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response to force reboot for Redis cache. - */ -public class RedisForceRebootResponseInner { - /** - * Status message. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisImpl.java deleted file mode 100644 index 06c697031d437..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisImpl.java +++ /dev/null @@ -1,250 +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. - * def - */ - -package com.microsoft.azure.management.redis.v2017_10_01.implementation; - -import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; -import com.microsoft.azure.management.redis.v2017_10_01.Redis; -import com.microsoft.azure.management.redis.v2017_10_01.RedisResource; -import rx.Observable; -import rx.Completable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import com.microsoft.azure.arm.resources.ResourceUtilsCore; -import com.microsoft.azure.arm.utils.RXMapper; -import rx.functions.Func1; -import com.microsoft.azure.PagedList; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.redis.v2017_10_01.RedisAccessKeys; -import com.microsoft.azure.management.redis.v2017_10_01.RedisForceRebootResponse; -import com.microsoft.azure.management.redis.v2017_10_01.RedisKeyType; -import com.microsoft.azure.management.redis.v2017_10_01.RedisRebootParameters; -import com.microsoft.azure.management.redis.v2017_10_01.ImportRDBParameters; -import com.microsoft.azure.management.redis.v2017_10_01.ExportRDBParameters; -import com.microsoft.azure.management.redis.v2017_10_01.CheckNameAvailabilityParameters; -import com.microsoft.azure.management.redis.v2017_10_01.NotificationListResponse; - -class RedisImpl extends GroupableResourcesCoreImpl implements Redis { - protected RedisImpl(RedisManager manager) { - super(manager.inner().redis(), manager); - } - - @Override - protected Observable getInnerAsync(String resourceGroupName, String name) { - RedisInner client = this.inner(); - return client.getByResourceGroupAsync(resourceGroupName, name); - } - - @Override - protected Completable deleteInnerAsync(String resourceGroupName, String name) { - RedisInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name).toCompletable(); - } - - @Override - public Observable deleteByIdsAsync(Collection ids) { - if (ids == null || ids.isEmpty()) { - return Observable.empty(); - } - Collection> observables = new ArrayList<>(); - for (String id : ids) { - final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); - final String name = ResourceUtilsCore.nameFromResourceId(id); - Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); - observables.add(o); - } - return Observable.mergeDelayError(observables); - } - - @Override - public Observable deleteByIdsAsync(String...ids) { - return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); - } - - @Override - public void deleteByIds(Collection ids) { - if (ids != null && !ids.isEmpty()) { - this.deleteByIdsAsync(ids).toBlocking().last(); - } - } - - @Override - public void deleteByIds(String...ids) { - this.deleteByIds(new ArrayList(Arrays.asList(ids))); - } - - @Override - public PagedList listByResourceGroup(String resourceGroupName) { - RedisInner client = this.inner(); - return this.wrapList(client.listByResourceGroup(resourceGroupName)); - } - - private Observable> listByResourceGroupNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - RedisInner client = this.inner(); - return client.listByResourceGroupNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByResourceGroupNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listByResourceGroupAsync(String resourceGroupName) { - RedisInner client = this.inner(); - return client.listByResourceGroupAsync(resourceGroupName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByResourceGroupNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public RedisResource call(RedisResourceInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public PagedList list() { - RedisInner client = this.inner(); - return this.wrapList(client.list()); - } - - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - RedisInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } - @Override - public Observable listAsync() { - RedisInner client = this.inner(); - return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public RedisResource call(RedisResourceInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public RedisResourceImpl define(String name) { - return wrapModel(name); - } - - @Override - public Observable listKeysAsync(String resourceGroupName, String name) { - RedisInner client = this.inner(); - return client.listKeysAsync(resourceGroupName, name) - .map(new Func1() { - @Override - public RedisAccessKeys call(RedisAccessKeysInner inner) { - return new RedisAccessKeysImpl(inner, manager()); - } - }); - } - - @Override - public Observable regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType) { - RedisInner client = this.inner(); - return client.regenerateKeyAsync(resourceGroupName, name, keyType) - .map(new Func1() { - @Override - public RedisAccessKeys call(RedisAccessKeysInner inner) { - return new RedisAccessKeysImpl(inner, manager()); - } - }); - } - - @Override - public Observable forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters) { - RedisInner client = this.inner(); - return client.forceRebootAsync(resourceGroupName, name, parameters) - .map(new Func1() { - @Override - public RedisForceRebootResponse call(RedisForceRebootResponseInner inner) { - return new RedisForceRebootResponseImpl(inner, manager()); - } - }); - } - - @Override - public Completable importDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters) { - RedisInner client = this.inner(); - return client.importDataAsync(resourceGroupName, name, parameters).toCompletable(); - } - - @Override - public Completable exportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters) { - RedisInner client = this.inner(); - return client.exportDataAsync(resourceGroupName, name, parameters).toCompletable(); - } - - @Override - public Completable checkNameAvailabilityAsync(CheckNameAvailabilityParameters parameters) { - RedisInner client = this.inner(); - return client.checkNameAvailabilityAsync(parameters).toCompletable(); - } - - @Override - protected RedisResourceImpl wrapModel(RedisResourceInner inner) { - return new RedisResourceImpl(inner.name(), inner, manager()); - } - - @Override - protected RedisResourceImpl wrapModel(String name) { - return new RedisResourceImpl(name, new RedisResourceInner(), this.manager()); - } - - @Override - public Observable listUpgradeNotificationsAsync(String resourceGroupName, String name, double history) { - RedisInner client = this.inner(); - return client.listUpgradeNotificationsAsync(resourceGroupName, name, history) - .map(new Func1() { - @Override - public NotificationListResponse call(NotificationListResponseInner inner) { - return new NotificationListResponseImpl(inner, manager()); - } - }); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java deleted file mode 100644 index b0d589ff689f1..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java +++ /dev/null @@ -1,1891 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.collection.InnerSupportsGet; -import com.microsoft.azure.arm.collection.InnerSupportsDelete; -import com.microsoft.azure.arm.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.redis.v2017_10_01.CheckNameAvailabilityParameters; -import com.microsoft.azure.management.redis.v2017_10_01.ExportRDBParameters; -import com.microsoft.azure.management.redis.v2017_10_01.ImportRDBParameters; -import com.microsoft.azure.management.redis.v2017_10_01.RedisCreateParameters; -import com.microsoft.azure.management.redis.v2017_10_01.RedisKeyType; -import com.microsoft.azure.management.redis.v2017_10_01.RedisRebootParameters; -import com.microsoft.azure.management.redis.v2017_10_01.RedisRegenerateKeyParameters; -import com.microsoft.azure.management.redis.v2017_10_01.RedisUpdateParameters; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -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; -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; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Redis. - */ -public class RedisInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private RedisService service; - /** The service client containing this operation class. */ - private RedisManagementClientImpl client; - - /** - * Initializes an instance of RedisInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public RedisInner(Retrofit retrofit, RedisManagementClientImpl client) { - this.service = retrofit.create(RedisService.class); - this.client = client; - } - - /** - * The interface defining all the services for Redis to be - * used by Retrofit to perform actually REST calls. - */ - interface RedisService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis checkNameAvailability" }) - @POST("subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckNameAvailabilityParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis listUpgradeNotifications" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listUpgradeNotifications") - Observable> listUpgradeNotifications(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("history") double history, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis create" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") - Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis beginCreate" }) - @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 RedisCreateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis update" }) - @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 RedisUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis delete" }) - @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis beginDelete" }) - @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}") - Observable> getByResourceGroup(@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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis") - Observable> list(@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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys") - Observable> listKeys(@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", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis regenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey") - Observable> regenerateKey(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RedisRegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis forceReboot" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot") - Observable> forceReboot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RedisRebootParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis importData" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import") - Observable> importData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis beginImportData" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import") - Observable> beginImportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ImportRDBParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis exportData" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export") - Observable> exportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis beginExportData" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export") - Observable> beginExportData(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ExportRDBParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.redis.v2017_10_01.Redis listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Checks that the redis cache name is valid and is not already in use. - * - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void checkNameAvailability(CheckNameAvailabilityParameters parameters) { - checkNameAvailabilityWithServiceResponseAsync(parameters).toBlocking().single().body(); - } - - /** - * Checks that the redis cache name is valid and is not already in use. - * - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture checkNameAvailabilityAsync(CheckNameAvailabilityParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(parameters), serviceCallback); - } - - /** - * Checks that the redis cache name is valid and is not already in use. - * - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable checkNameAvailabilityAsync(CheckNameAvailabilityParameters parameters) { - return checkNameAvailabilityWithServiceResponseAsync(parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Checks that the redis cache name is valid and is not already in use. - * - * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> checkNameAvailabilityWithServiceResponseAsync(CheckNameAvailabilityParameters parameters) { - 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.checkNameAvailability(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 = checkNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets any upgrade notifications for a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NotificationListResponseInner object if successful. - */ - public NotificationListResponseInner listUpgradeNotifications(String resourceGroupName, String name, double history) { - return listUpgradeNotificationsWithServiceResponseAsync(resourceGroupName, name, history).toBlocking().single().body(); - } - - /** - * Gets any upgrade notifications for a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listUpgradeNotificationsAsync(String resourceGroupName, String name, double history, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listUpgradeNotificationsWithServiceResponseAsync(resourceGroupName, name, history), serviceCallback); - } - - /** - * Gets any upgrade notifications for a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationListResponseInner object - */ - public Observable listUpgradeNotificationsAsync(String resourceGroupName, String name, double history) { - return listUpgradeNotificationsWithServiceResponseAsync(resourceGroupName, name, history).map(new Func1, NotificationListResponseInner>() { - @Override - public NotificationListResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets any upgrade notifications for a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param history how many minutes in past to look for upgrade notifications - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NotificationListResponseInner object - */ - public Observable> listUpgradeNotificationsWithServiceResponseAsync(String resourceGroupName, String name, double history) { - 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.listUpgradeNotifications(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), history, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listUpgradeNotificationsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listUpgradeNotificationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisResourceInner object if successful. - */ - public RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture createAsync(String resourceGroupName, String name, RedisCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createAsync(String resourceGroupName, String name, RedisCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { - @Override - public RedisResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createWithServiceResponseAsync(String resourceGroupName, String name, RedisCreateParameters 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisResourceInner object if successful. - */ - public RedisResourceInner beginCreate(String resourceGroupName, String name, RedisCreateParameters parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginCreateAsync(String resourceGroupName, String name, RedisCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable beginCreateAsync(String resourceGroupName, String name, RedisCreateParameters parameters) { - return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { - @Override - public RedisResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String name, RedisCreateParameters 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 this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, 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 Update Redis operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisResourceInner object if successful. - */ - public RedisResourceInner update(String resourceGroupName, String name, RedisUpdateParameters parameters) { - return updateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture updateAsync(String resourceGroupName, String name, RedisUpdateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable updateAsync(String resourceGroupName, String name, RedisUpdateParameters parameters) { - return updateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisResourceInner>() { - @Override - public RedisResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, RedisUpdateParameters 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.update(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 = updateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String name) { - deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); - } - - /** - * Deletes a Redis cache. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Deletes a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String name) { - return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(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."); - } - 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. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String name) { - beginDeleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Deletes a Redis cache. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Deletes a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @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.body(); - } - }); - } - - /** - * Deletes a Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @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 = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a Redis cache (resource description). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisResourceInner object if successful. - */ - public RedisResourceInner getByResourceGroup(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Gets a Redis cache (resource description). - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Gets a Redis cache (resource description). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisResourceInner>() { - @Override - public RedisResourceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a Redis cache (resource description). - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisResourceInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(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.getByResourceGroup(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 = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Redis caches in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Redis caches in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisResourceInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - 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.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisAccessKeysInner object if successful. - */ - public RedisAccessKeysInner listKeys(String resourceGroupName, String name) { - return listKeysWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); - } - - /** - * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture listKeysAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisAccessKeysInner object - */ - public Observable listKeysAsync(String resourceGroupName, String name) { - return listKeysWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RedisAccessKeysInner>() { - @Override - public RedisAccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisAccessKeysInner object - */ - public Observable> listKeysWithServiceResponseAsync(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.listKeys(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 = listKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisAccessKeysInner object if successful. - */ - public RedisAccessKeysInner regenerateKey(String resourceGroupName, String name, RedisKeyType keyType) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType).toBlocking().single().body(); - } - - /** - * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType), serviceCallback); - } - - /** - * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisAccessKeysInner object - */ - public Observable regenerateKeyAsync(String resourceGroupName, String name, RedisKeyType keyType) { - return regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType).map(new Func1, RedisAccessKeysInner>() { - @Override - public RedisAccessKeysInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisAccessKeysInner object - */ - public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String name, RedisKeyType keyType) { - 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."); - } - if (keyType == null) { - throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); - } - 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>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = regenerateKeyDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse regenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RedisForceRebootResponseInner object if successful. - */ - public RedisForceRebootResponseInner forceReboot(String resourceGroupName, String name, RedisRebootParameters parameters) { - return forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); - } - - /** - * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); - } - - /** - * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisForceRebootResponseInner object - */ - public Observable forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters) { - return forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, RedisForceRebootResponseInner>() { - @Override - public RedisForceRebootResponseInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Specifies which Redis node(s) to reboot. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RedisForceRebootResponseInner object - */ - public Observable> forceRebootWithServiceResponseAsync(String resourceGroupName, String name, RedisRebootParameters 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.forceReboot(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 = forceRebootDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse forceRebootDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void importData(String resourceGroupName, String name, ImportRDBParameters parameters) { - importDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture importDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(importDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable importDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters) { - return importDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> importDataWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParameters 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.importData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginImportData(String resourceGroupName, String name, ImportRDBParameters parameters) { - beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginImportDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginImportDataAsync(String resourceGroupName, String name, ImportRDBParameters parameters) { - return beginImportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Import data into Redis cache. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis import operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginImportDataWithServiceResponseAsync(String resourceGroupName, String name, ImportRDBParameters 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.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 = beginImportDataDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginImportDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void exportData(String resourceGroupName, String name, ExportRDBParameters parameters) { - exportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture exportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(exportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable exportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters) { - return exportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> exportDataWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParameters 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.exportData(resourceGroupName, name, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginExportData(String resourceGroupName, String name, ExportRDBParameters parameters) { - beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginExportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters), serviceCallback); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginExportDataAsync(String resourceGroupName, String name, ExportRDBParameters parameters) { - return beginExportDataWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Export data from the redis cache to blobs in a container. - * - * @param resourceGroupName The name of the resource group. - * @param name The name of the Redis cache. - * @param parameters Parameters for Redis export operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginExportDataWithServiceResponseAsync(String resourceGroupName, String name, ExportRDBParameters 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.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 = beginExportDataDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginExportDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisResourceInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all Redis caches in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all Redis caches in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all Redis caches in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<RedisResourceInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all Redis caches in the specified subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<RedisResourceInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all Redis caches in the specified subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<RedisResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesImpl.java deleted file mode 100644 index 0179d308e68b1..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesImpl.java +++ /dev/null @@ -1,155 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServerWithProperties; -import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServerCreateParameters; -import com.microsoft.azure.management.redis.v2017_10_01.ReplicationRole; -import rx.functions.Func1; - -class RedisLinkedServerWithPropertiesImpl extends CreatableUpdatableImpl implements RedisLinkedServerWithProperties, RedisLinkedServerWithProperties.Definition, RedisLinkedServerWithProperties.Update { - private final RedisManager manager; - private String resourceGroupName; - private String name; - private String linkedServerName; - private RedisLinkedServerCreateParameters createOrUpdateParameter; - - RedisLinkedServerWithPropertiesImpl(String name, RedisManager manager) { - super(name, new RedisLinkedServerWithPropertiesInner()); - this.manager = manager; - // Set resource name - this.linkedServerName = name; - // - this.createOrUpdateParameter = new RedisLinkedServerCreateParameters(); - } - - RedisLinkedServerWithPropertiesImpl(RedisLinkedServerWithPropertiesInner inner, RedisManager manager) { - super(inner.name(), inner); - this.manager = manager; - // Set resource name - this.linkedServerName = inner.name(); - // resource ancestor names - this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); - this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "Redis"); - this.linkedServerName = IdParsingUtils.getValueFromIdByName(inner.id(), "linkedServers"); - // - this.createOrUpdateParameter = new RedisLinkedServerCreateParameters(); - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public Observable createResourceAsync() { - LinkedServersInner client = this.manager().inner().linkedServers(); - return client.createAsync(this.resourceGroupName, this.name, this.linkedServerName, this.createOrUpdateParameter) - .map(new Func1() { - @Override - public RedisLinkedServerWithPropertiesInner call(RedisLinkedServerWithPropertiesInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - public Observable updateResourceAsync() { - LinkedServersInner client = this.manager().inner().linkedServers(); - return client.createAsync(this.resourceGroupName, this.name, this.linkedServerName, this.createOrUpdateParameter) - .map(new Func1() { - @Override - public RedisLinkedServerWithPropertiesInner call(RedisLinkedServerWithPropertiesInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - protected Observable getInnerAsync() { - LinkedServersInner client = this.manager().inner().linkedServers(); - return client.getAsync(this.resourceGroupName, this.name, this.linkedServerName); - } - - @Override - public boolean isInCreateMode() { - return this.inner().id() == null; - } - - private void resetCreateUpdateParameters() { - this.createOrUpdateParameter = new RedisLinkedServerCreateParameters(); - } - - @Override - public String id() { - return this.inner().id(); - } - - @Override - public String linkedRedisCacheId() { - return this.inner().linkedRedisCacheId(); - } - - @Override - public String linkedRedisCacheLocation() { - return this.inner().linkedRedisCacheLocation(); - } - - @Override - public String name() { - return this.inner().name(); - } - - @Override - public String provisioningState() { - return this.inner().provisioningState(); - } - - @Override - public ReplicationRole serverRole() { - return this.inner().serverRole(); - } - - @Override - public String type() { - return this.inner().type(); - } - - @Override - public RedisLinkedServerWithPropertiesImpl withExistingRedis(String resourceGroupName, String name) { - this.resourceGroupName = resourceGroupName; - this.name = name; - return this; - } - - @Override - public RedisLinkedServerWithPropertiesImpl withLinkedRedisCacheId(String linkedRedisCacheId) { - this.createOrUpdateParameter.withLinkedRedisCacheId(linkedRedisCacheId); - return this; - } - - @Override - public RedisLinkedServerWithPropertiesImpl withLinkedRedisCacheLocation(String linkedRedisCacheLocation) { - this.createOrUpdateParameter.withLinkedRedisCacheLocation(linkedRedisCacheLocation); - return this; - } - - @Override - public RedisLinkedServerWithPropertiesImpl withServerRole(ReplicationRole serverRole) { - this.createOrUpdateParameter.withServerRole(serverRole); - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesInner.java deleted file mode 100644 index 07e00ed0f09cb..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisLinkedServerWithPropertiesInner.java +++ /dev/null @@ -1,115 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.ReplicationRole; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.ProxyResource; - -/** - * Response to put/get linked server (with properties) for Redis cache. - */ -@JsonFlatten -public class RedisLinkedServerWithPropertiesInner extends ProxyResource { - /** - * Fully qualified resourceId of the linked redis cache. - */ - @JsonProperty(value = "properties.linkedRedisCacheId", required = true) - private String linkedRedisCacheId; - - /** - * Location of the linked redis cache. - */ - @JsonProperty(value = "properties.linkedRedisCacheLocation", required = true) - private String linkedRedisCacheLocation; - - /** - * Role of the linked server. Possible values include: 'Primary', - * 'Secondary'. - */ - @JsonProperty(value = "properties.serverRole", required = true) - private ReplicationRole serverRole; - - /** - * Terminal state of the link between primary and secondary redis cache. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Get the linkedRedisCacheId value. - * - * @return the linkedRedisCacheId value - */ - public String linkedRedisCacheId() { - return this.linkedRedisCacheId; - } - - /** - * Set the linkedRedisCacheId value. - * - * @param linkedRedisCacheId the linkedRedisCacheId value to set - * @return the RedisLinkedServerWithPropertiesInner object itself. - */ - public RedisLinkedServerWithPropertiesInner withLinkedRedisCacheId(String linkedRedisCacheId) { - this.linkedRedisCacheId = linkedRedisCacheId; - return this; - } - - /** - * Get the linkedRedisCacheLocation value. - * - * @return the linkedRedisCacheLocation value - */ - public String linkedRedisCacheLocation() { - return this.linkedRedisCacheLocation; - } - - /** - * Set the linkedRedisCacheLocation value. - * - * @param linkedRedisCacheLocation the linkedRedisCacheLocation value to set - * @return the RedisLinkedServerWithPropertiesInner object itself. - */ - public RedisLinkedServerWithPropertiesInner withLinkedRedisCacheLocation(String linkedRedisCacheLocation) { - this.linkedRedisCacheLocation = linkedRedisCacheLocation; - return this; - } - - /** - * Get the serverRole value. - * - * @return the serverRole value - */ - public ReplicationRole serverRole() { - return this.serverRole; - } - - /** - * Set the serverRole value. - * - * @param serverRole the serverRole value to set - * @return the RedisLinkedServerWithPropertiesInner object itself. - */ - public RedisLinkedServerWithPropertiesInner withServerRole(ReplicationRole serverRole) { - this.serverRole = serverRole; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManagementClientImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManagementClientImpl.java deleted file mode 100644 index 2ab5b1bdf12ba..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManagementClientImpl.java +++ /dev/null @@ -1,252 +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.v2017_10_01.implementation; - -import com.microsoft.azure.AzureClient; -import com.microsoft.azure.AzureServiceClient; -import com.microsoft.rest.credentials.ServiceClientCredentials; -import com.microsoft.rest.RestClient; - -/** - * Initializes a new instance of the RedisManagementClientImpl class. - */ -public class RedisManagementClientImpl extends AzureServiceClient { - /** the {@link AzureClient} used for long running operations. */ - private AzureClient azureClient; - - /** - * Gets the {@link AzureClient} used for long running operations. - * @return the azure client; - */ - public AzureClient getAzureClient() { - return this.azureClient; - } - - /** Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ - private String subscriptionId; - - /** - * Gets Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Sets Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - * - * @param subscriptionId the subscriptionId value. - * @return the service client itself - */ - public RedisManagementClientImpl withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** Client Api Version. */ - private String apiVersion; - - /** - * Gets Client Api Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - - /** Gets or sets the preferred language for the response. */ - private String acceptLanguage; - - /** - * Gets Gets or sets the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String acceptLanguage() { - return this.acceptLanguage; - } - - /** - * Sets Gets or sets the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the service client itself - */ - public RedisManagementClientImpl withAcceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ - private int longRunningOperationRetryTimeout; - - /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @return the longRunningOperationRetryTimeout value. - */ - public int longRunningOperationRetryTimeout() { - return this.longRunningOperationRetryTimeout; - } - - /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * - * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. - * @return the service client itself - */ - public RedisManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { - this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; - return this; - } - - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ - private boolean generateClientRequestId; - - /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @return the generateClientRequestId value. - */ - public boolean generateClientRequestId() { - return this.generateClientRequestId; - } - - /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. - * - * @param generateClientRequestId the generateClientRequestId value. - * @return the service client itself - */ - public RedisManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { - this.generateClientRequestId = generateClientRequestId; - return this; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - - /** - * The RedisInner object to access its operations. - */ - private RedisInner redis; - - /** - * Gets the RedisInner object to access its operations. - * @return the RedisInner object. - */ - public RedisInner redis() { - return this.redis; - } - - /** - * The FirewallRulesInner object to access its operations. - */ - private FirewallRulesInner firewallRules; - - /** - * Gets the FirewallRulesInner object to access its operations. - * @return the FirewallRulesInner object. - */ - public FirewallRulesInner firewallRules() { - return this.firewallRules; - } - - /** - * The PatchSchedulesInner object to access its operations. - */ - private PatchSchedulesInner patchSchedules; - - /** - * Gets the PatchSchedulesInner object to access its operations. - * @return the PatchSchedulesInner object. - */ - public PatchSchedulesInner patchSchedules() { - return this.patchSchedules; - } - - /** - * The LinkedServersInner object to access its operations. - */ - private LinkedServersInner linkedServers; - - /** - * Gets the LinkedServersInner object to access its operations. - * @return the LinkedServersInner object. - */ - public LinkedServersInner linkedServers() { - return this.linkedServers; - } - - /** - * Initializes an instance of RedisManagementClient client. - * - * @param credentials the management credentials for Azure - */ - public RedisManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); - } - - /** - * Initializes an instance of RedisManagementClient client. - * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure - */ - public RedisManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - super(baseUrl, credentials); - initialize(); - } - - /** - * Initializes an instance of RedisManagementClient client. - * - * @param restClient the REST client to connect to Azure. - */ - public RedisManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); - } - - protected void initialize() { - this.apiVersion = "2017-10-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.operations = new OperationsInner(restClient().retrofit(), this); - this.redis = new RedisInner(restClient().retrofit(), this); - this.firewallRules = new FirewallRulesInner(restClient().retrofit(), this); - this.patchSchedules = new PatchSchedulesInner(restClient().retrofit(), this); - this.linkedServers = new LinkedServersInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); - } - - /** - * Gets the User-Agent header for the client. - * - * @return the user agent string. - */ - @Override - public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "RedisManagementClient", "2017-10-01"); - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManager.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManager.java deleted file mode 100644 index c3b0129ca0f06..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisManager.java +++ /dev/null @@ -1,147 +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.v2017_10_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.v2017_10_01.Operations; -import com.microsoft.azure.management.redis.v2017_10_01.Redis; -import com.microsoft.azure.management.redis.v2017_10_01.FirewallRules; -import com.microsoft.azure.management.redis.v2017_10_01.PatchSchedules; -import com.microsoft.azure.management.redis.v2017_10_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 RedisManager 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 RedisManager with optional configuration. - * - * @return the instance allowing configurations - */ - public static Configurable configure() { - return new RedisManager.ConfigurableImpl(); - } - /** - * Creates an instance of RedisManager that exposes Cache resource management API entry points. - * - * @param credentials the credentials to use - * @param subscriptionId the subscription UUID - * @return the RedisManager - */ - public static RedisManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return new RedisManager(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 RedisManager 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 RedisManager - */ - public static RedisManager authenticate(RestClient restClient, String subscriptionId) { - return new RedisManager(restClient, subscriptionId); - } - /** - * The interface allowing configurations to be set. - */ - public interface Configurable extends AzureConfigurable { - /** - * Creates an instance of RedisManager 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 - */ - RedisManager 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 RedisManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { - return RedisManager.authenticate(buildRestClient(credentials), subscriptionId); - } - } - private RedisManager(RestClient restClient, String subscriptionId) { - super( - restClient, - subscriptionId, - new RedisManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); - } -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleImpl.java deleted file mode 100644 index ed3786f544f4d..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleImpl.java +++ /dev/null @@ -1,111 +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.v2017_10_01.implementation; - -import com.microsoft.azure.management.redis.v2017_10_01.RedisPatchSchedule; -import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; -import rx.Observable; -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.ScheduleEntry; - -class RedisPatchScheduleImpl extends CreatableUpdatableImpl implements RedisPatchSchedule, RedisPatchSchedule.Definition, RedisPatchSchedule.Update { - private final RedisManager manager; - private String resourceGroupName; - private String name; - private List cscheduleEntries; - private List uscheduleEntries; - - RedisPatchScheduleImpl(String name, RedisManager manager) { - super(name, new RedisPatchScheduleInner()); - this.manager = manager; - // Set resource name - this.name = name; - // - } - - RedisPatchScheduleImpl(RedisPatchScheduleInner inner, RedisManager manager) { - super(inner.name(), inner); - this.manager = manager; - // Set resource name - this.name = inner.name(); - // resource ancestor names - this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); - this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "Redis"); - // - } - - @Override - public RedisManager manager() { - return this.manager; - } - - @Override - public Observable createResourceAsync() { - PatchSchedulesInner client = this.manager().inner().patchSchedules(); - return client.createOrUpdateAsync(this.resourceGroupName, this.name, this.cscheduleEntries) - .map(innerToFluentMap(this)); - } - - @Override - public Observable updateResourceAsync() { - PatchSchedulesInner client = this.manager().inner().patchSchedules(); - return client.createOrUpdateAsync(this.resourceGroupName, this.name, this.uscheduleEntries) - .map(innerToFluentMap(this)); - } - - @Override - protected Observable getInnerAsync() { - PatchSchedulesInner client = this.manager().inner().patchSchedules(); - return client.getAsync(this.resourceGroupName, this.name); - } - - @Override - public boolean isInCreateMode() { - return this.inner().id() == null; - } - - - @Override - public String id() { - return this.inner().id(); - } - - @Override - public String name() { - return this.inner().name(); - } - - @Override - public List scheduleEntries() { - return this.inner().scheduleEntries(); - } - - @Override - public String type() { - return this.inner().type(); - } - - @Override - public RedisPatchScheduleImpl withExistingRedis(String resourceGroupName, String name) { - this.resourceGroupName = resourceGroupName; - this.name = name; - return this; - } - - @Override - public RedisPatchScheduleImpl withScheduleEntries(List scheduleEntries) { - if (isInCreateMode()) { - this.cscheduleEntries = scheduleEntries; - } else { - this.uscheduleEntries = scheduleEntries; - } - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleInner.java deleted file mode 100644 index c1bc3c7d3e9f8..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisPatchScheduleInner.java +++ /dev/null @@ -1,48 +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.v2017_10_01.implementation; - -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.ScheduleEntry; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.ProxyResource; - -/** - * Response to put/get patch schedules for Redis cache. - */ -@JsonFlatten -public class RedisPatchScheduleInner extends ProxyResource { - /** - * List of patch schedules for a 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 RedisPatchScheduleInner object itself. - */ - public RedisPatchScheduleInner withScheduleEntries(List scheduleEntries) { - this.scheduleEntries = scheduleEntries; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceImpl.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceImpl.java deleted file mode 100644 index 941c2f577a4a1..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceImpl.java +++ /dev/null @@ -1,226 +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.v2017_10_01.implementation; - -import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; -import com.microsoft.azure.management.redis.v2017_10_01.RedisResource; -import rx.Observable; -import com.microsoft.azure.management.redis.v2017_10_01.RedisUpdateParameters; -import java.util.Map; -import com.microsoft.azure.management.redis.v2017_10_01.RedisCreateParameters; -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.RedisAccessKeys; -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServer; -import com.microsoft.azure.management.redis.v2017_10_01.Sku; -import rx.functions.Func1; - -class RedisResourceImpl extends GroupableResourceCoreImpl implements RedisResource, RedisResource.Definition, RedisResource.Update { - private RedisCreateParameters createParameter; - private RedisUpdateParameters updateParameter; - RedisResourceImpl(String name, RedisResourceInner inner, RedisManager manager) { - super(name, inner, manager); - this.createParameter = new RedisCreateParameters(); - this.updateParameter = new RedisUpdateParameters(); - } - - @Override - public Observable createResourceAsync() { - RedisInner client = this.manager().inner().redis(); - this.createParameter.withLocation(inner().location()); - this.createParameter.withTags(inner().getTags()); - return client.createAsync(this.resourceGroupName(), this.name(), this.createParameter) - .map(new Func1() { - @Override - public RedisResourceInner call(RedisResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - public Observable updateResourceAsync() { - RedisInner client = this.manager().inner().redis(); - return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) - .map(new Func1() { - @Override - public RedisResourceInner call(RedisResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); - } - - @Override - protected Observable getInnerAsync() { - RedisInner client = this.manager().inner().redis(); - return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); - } - - @Override - public boolean isInCreateMode() { - return this.inner().id() == null; - } - - private void resetCreateUpdateParameters() { - this.createParameter = new RedisCreateParameters(); - this.updateParameter = new RedisUpdateParameters(); - } - - @Override - public RedisAccessKeys accessKeys() { - RedisAccessKeysInner inner = this.inner().accessKeys(); - if (inner != null) { - return new RedisAccessKeysImpl(inner, manager()); - } else { - return null; - } - } - - @Override - public Boolean enableNonSslPort() { - return this.inner().enableNonSslPort(); - } - - @Override - public String hostName() { - return this.inner().hostName(); - } - - @Override - public List linkedServers() { - return this.inner().linkedServers(); - } - - @Override - public Integer port() { - return this.inner().port(); - } - - @Override - public String provisioningState() { - return this.inner().provisioningState(); - } - - @Override - public Map redisConfiguration() { - return this.inner().redisConfiguration(); - } - - @Override - public String redisVersion() { - return this.inner().redisVersion(); - } - - @Override - public Integer shardCount() { - return this.inner().shardCount(); - } - - @Override - public Sku sku() { - return this.inner().sku(); - } - - @Override - public Integer sslPort() { - return this.inner().sslPort(); - } - - @Override - public String staticIP() { - return this.inner().staticIP(); - } - - @Override - public String subnetId() { - return this.inner().subnetId(); - } - - @Override - public Map tenantSettings() { - return this.inner().tenantSettings(); - } - - @Override - public List zones() { - return this.inner().zones(); - } - - @Override - public RedisResourceImpl withStaticIP(String staticIP) { - this.createParameter.withStaticIP(staticIP); - return this; - } - - @Override - public RedisResourceImpl withSubnetId(String subnetId) { - this.createParameter.withSubnetId(subnetId); - return this; - } - - @Override - public RedisResourceImpl withZones(List zones) { - this.createParameter.withZones(zones); - return this; - } - - @Override - public RedisResourceImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.createParameter.withSku(sku); - } else { - this.updateParameter.withSku(sku); - } - return this; - } - - @Override - public RedisResourceImpl withEnableNonSslPort(Boolean enableNonSslPort) { - if (isInCreateMode()) { - this.createParameter.withEnableNonSslPort(enableNonSslPort); - } else { - this.updateParameter.withEnableNonSslPort(enableNonSslPort); - } - return this; - } - - @Override - public RedisResourceImpl withRedisConfiguration(Map redisConfiguration) { - if (isInCreateMode()) { - this.createParameter.withRedisConfiguration(redisConfiguration); - } else { - this.updateParameter.withRedisConfiguration(redisConfiguration); - } - return this; - } - - @Override - public RedisResourceImpl withShardCount(Integer shardCount) { - if (isInCreateMode()) { - this.createParameter.withShardCount(shardCount); - } else { - this.updateParameter.withShardCount(shardCount); - } - return this; - } - - @Override - public RedisResourceImpl withTenantSettings(Map tenantSettings) { - if (isInCreateMode()) { - this.createParameter.withTenantSettings(tenantSettings); - } else { - this.updateParameter.withTenantSettings(tenantSettings); - } - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceInner.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceInner.java deleted file mode 100644 index 8c3b51dd4cd8b..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisResourceInner.java +++ /dev/null @@ -1,344 +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.v2017_10_01.implementation; - -import java.util.Map; -import com.microsoft.azure.management.redis.v2017_10_01.Sku; -import java.util.List; -import com.microsoft.azure.management.redis.v2017_10_01.RedisLinkedServer; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A single Redis item in List or Get Operation. - */ -@JsonFlatten -public class RedisResourceInner 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; - - /** - * Specifies whether the non-ssl Redis server port (6379) is enabled. - */ - @JsonProperty(value = "properties.enableNonSslPort") - private Boolean enableNonSslPort; - - /** - * A dictionary of tenant settings. - */ - @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 SKU of the Redis cache to deploy. - */ - @JsonProperty(value = "properties.sku", required = true) - private Sku sku; - - /** - * 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; - - /** - * Static IP address. Required when deploying a Redis cache inside an - * existing Azure Virtual Network. - */ - @JsonProperty(value = "properties.staticIP") - private String staticIP; - - /** - * Redis version. - */ - @JsonProperty(value = "properties.redisVersion", access = JsonProperty.Access.WRITE_ONLY) - private String redisVersion; - - /** - * Redis instance provisioning status. - */ - @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; - - /** - * The keys of the Redis cache - not set if this object is not the response - * to Create or Update redis cache. - */ - @JsonProperty(value = "properties.accessKeys", access = JsonProperty.Access.WRITE_ONLY) - private RedisAccessKeysInner accessKeys; - - /** - * List of the linked servers associated with the cache. - */ - @JsonProperty(value = "properties.linkedServers", access = JsonProperty.Access.WRITE_ONLY) - private List linkedServers; - - /** - * A list of availability zones denoting where the resource needs to come - * from. - */ - @JsonProperty(value = "zones") - private List zones; - - /** - * 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 RedisResourceInner object itself. - */ - public RedisResourceInner 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 RedisResourceInner object itself. - */ - public RedisResourceInner 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 RedisResourceInner object itself. - */ - public RedisResourceInner 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 RedisResourceInner object itself. - */ - public RedisResourceInner withShardCount(Integer shardCount) { - this.shardCount = shardCount; - 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 RedisResourceInner object itself. - */ - public RedisResourceInner withSku(Sku sku) { - this.sku = sku; - 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 RedisResourceInner object itself. - */ - public RedisResourceInner 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 RedisResourceInner object itself. - */ - public RedisResourceInner withStaticIP(String staticIP) { - this.staticIP = staticIP; - return this; - } - - /** - * Get the redisVersion value. - * - * @return the redisVersion value - */ - public String redisVersion() { - return this.redisVersion; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the hostName value. - * - * @return the hostName value - */ - public String hostName() { - return this.hostName; - } - - /** - * Get the port value. - * - * @return the port value - */ - public Integer port() { - return this.port; - } - - /** - * Get the sslPort value. - * - * @return the sslPort value - */ - public Integer sslPort() { - return this.sslPort; - } - - /** - * Get the accessKeys value. - * - * @return the accessKeys value - */ - public RedisAccessKeysInner accessKeys() { - return this.accessKeys; - } - - /** - * Get the linkedServers value. - * - * @return the linkedServers value - */ - public List linkedServers() { - return this.linkedServers; - } - - /** - * Get the zones value. - * - * @return the zones value - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones value. - * - * @param zones the zones value to set - * @return the RedisResourceInner object itself. - */ - public RedisResourceInner withZones(List zones) { - this.zones = zones; - return this; - } - -} diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/package-info.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/package-info.java deleted file mode 100644 index 3cd235f1e6914..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/package-info.java +++ /dev/null @@ -1,11 +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. - -/** - * This package contains the implementation classes for RedisManagementClient. - * REST API for Azure Redis Cache Service. - */ -package com.microsoft.azure.management.redis.v2017_10_01.implementation; diff --git a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/package-info.java b/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/package-info.java deleted file mode 100644 index ca2b91c4b206b..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/package-info.java +++ /dev/null @@ -1,11 +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. - -/** - * This package contains the classes for RedisManagementClient. - * REST API for Azure Redis Cache Service. - */ -package com.microsoft.azure.management.redis.v2017_10_01; diff --git a/redis/resource-manager/v2017_10_01/src/test/java/com/microsoft/azure/management/redis/v2017_10_01/RedisTest.java b/redis/resource-manager/v2017_10_01/src/test/java/com/microsoft/azure/management/redis/v2017_10_01/RedisTest.java deleted file mode 100644 index de100579780b4..0000000000000 --- a/redis/resource-manager/v2017_10_01/src/test/java/com/microsoft/azure/management/redis/v2017_10_01/RedisTest.java +++ /dev/null @@ -1,45 +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.v2017_10_01; -import com.microsoft.azure.arm.core.TestBase; -import com.microsoft.azure.management.redis.v2017_10_01.implementation.RedisManager; -import com.microsoft.azure.management.resources.implementation.ResourceManager; -import com.microsoft.rest.RestClient; -import com.microsoft.azure.arm.utils.SdkContext; -import org.junit.Test; -import org.junit.Assert; -import com.microsoft.azure.arm.resources.Region; -import com.microsoft.azure.management.resources.ResourceGroup; - -public class RedisTest extends TestBase { - protected static ResourceManager resourceManager; - protected static RedisManager redisManager; - private static String rgName; - @Override - protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) { - resourceManager = ResourceManager - .authenticate(restClient) - .withSubscription(defaultSubscription); - redisManager = RedisManager - .authenticate(restClient, defaultSubscription); - } - @Override - protected void cleanUpResources() { - resourceManager.resourceGroups().deleteByName(rgName); - } - @Test - public void firstTest() { - rgName = SdkContext.randomResourceName("rg", 20); - ResourceGroup group = resourceManager.resourceGroups() - .define(rgName) - .withRegion(Region.US_WEST.toString()) - .create(); - Assert.assertNotNull(group); - } -} diff --git a/redis/resource-manager/v2018_03_01/pom.xml b/redis/resource-manager/v2018_03_01/pom.xml index 0c3b787e5df06..f717d8d210f2e 100644 --- a/redis/resource-manager/v2018_03_01/pom.xml +++ b/redis/resource-manager/v2018_03_01/pom.xml @@ -7,19 +7,19 @@ --> 4.0.0 - com.microsoft.azure.azure-mgmt-redis-2018-03-01 + com.microsoft.azure.redis.v2018_03_01 com.microsoft.azure azure-arm-parent 1.1.0 - ../../../pom.management.xml + ../../../pom.xml azure-mgmt-redis - 1.0.0-beta-SNAPSHOT + 1.0.0-beta jar Microsoft Azure SDK for Cache Management This package contains Microsoft Cache Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/CheckNameAvailabilityParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/CheckNameAvailabilityParameters.java index c49d13199e084..aff7a59a42972 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/CheckNameAvailabilityParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/CheckNameAvailabilityParameters.java @@ -28,7 +28,7 @@ public class CheckNameAvailabilityParameters { private String type; /** - * Get the name value. + * Get resource name. * * @return the name value */ @@ -37,7 +37,7 @@ public String name() { } /** - * Set the name value. + * Set resource name. * * @param name the name value to set * @return the CheckNameAvailabilityParameters object itself. @@ -48,7 +48,7 @@ public CheckNameAvailabilityParameters withName(String name) { } /** - * Get the type value. + * Get resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'. * * @return the type value */ @@ -57,7 +57,7 @@ public String type() { } /** - * Set the type value. + * Set resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'. * * @param type the type value to set * @return the CheckNameAvailabilityParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ExportRDBParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ExportRDBParameters.java index 751a3c0bdf12b..98d0158c9efe8 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ExportRDBParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ExportRDBParameters.java @@ -33,7 +33,7 @@ public class ExportRDBParameters { private String container; /** - * Get the format value. + * Get file format. * * @return the format value */ @@ -42,7 +42,7 @@ public String format() { } /** - * Set the format value. + * Set file format. * * @param format the format value to set * @return the ExportRDBParameters object itself. @@ -53,7 +53,7 @@ public ExportRDBParameters withFormat(String format) { } /** - * Get the prefix value. + * Get prefix to use for exported files. * * @return the prefix value */ @@ -62,7 +62,7 @@ public String prefix() { } /** - * Set the prefix value. + * Set prefix to use for exported files. * * @param prefix the prefix value to set * @return the ExportRDBParameters object itself. @@ -73,7 +73,7 @@ public ExportRDBParameters withPrefix(String prefix) { } /** - * Get the container value. + * Get container name to export to. * * @return the container value */ @@ -82,7 +82,7 @@ public String container() { } /** - * Set the container value. + * Set container name to export to. * * @param container the container value to set * @return the ExportRDBParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ImportRDBParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ImportRDBParameters.java index 81d2f8cb6690d..2d9808e9fea1e 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ImportRDBParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ImportRDBParameters.java @@ -28,7 +28,7 @@ public class ImportRDBParameters { private List files; /** - * Get the format value. + * Get file format. * * @return the format value */ @@ -37,7 +37,7 @@ public String format() { } /** - * Set the format value. + * Set file format. * * @param format the format value to set * @return the ImportRDBParameters object itself. @@ -48,7 +48,7 @@ public ImportRDBParameters withFormat(String format) { } /** - * Get the files value. + * Get files to import. * * @return the files value */ @@ -57,7 +57,7 @@ public List files() { } /** - * Set the files value. + * Set files to import. * * @param files the files value to set * @return the ImportRDBParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/OperationDisplay.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/OperationDisplay.java index 81b80a6f4c325..bde203e73a0f7 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/OperationDisplay.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/OperationDisplay.java @@ -39,7 +39,7 @@ public class OperationDisplay { private String description; /** - * Get the provider value. + * Get friendly name of the resource provider. * * @return the provider value */ @@ -48,7 +48,7 @@ public String provider() { } /** - * Set the provider value. + * Set friendly name of the resource provider. * * @param provider the provider value to set * @return the OperationDisplay object itself. @@ -59,7 +59,7 @@ public OperationDisplay withProvider(String provider) { } /** - * Get the operation value. + * Get operation type: read, write, delete, listKeys/action, etc. * * @return the operation value */ @@ -68,7 +68,7 @@ public String operation() { } /** - * Set the operation value. + * Set operation type: read, write, delete, listKeys/action, etc. * * @param operation the operation value to set * @return the OperationDisplay object itself. @@ -79,7 +79,7 @@ public OperationDisplay withOperation(String operation) { } /** - * Get the resource value. + * Get resource type on which the operation is performed. * * @return the resource value */ @@ -88,7 +88,7 @@ public String resource() { } /** - * Set the resource value. + * Set resource type on which the operation is performed. * * @param resource the resource value to set * @return the OperationDisplay object itself. @@ -99,7 +99,7 @@ public OperationDisplay withResource(String resource) { } /** - * Get the description value. + * Get friendly name of the operation. * * @return the description value */ @@ -108,7 +108,7 @@ public String description() { } /** - * Set the description value. + * Set friendly name of the operation. * * @param description the description value to set * @return the OperationDisplay object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisCreateParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisCreateParameters.java index 1b2e4ca69b7b8..81038314d8719 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisCreateParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisCreateParameters.java @@ -61,7 +61,7 @@ public class RedisCreateParameters { /** * 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. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. */ @JsonProperty(value = "properties.subnetId") private String subnetId; @@ -93,7 +93,7 @@ public class RedisCreateParameters { private Map tags; /** - * Get the redisConfiguration value. + * Get 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. * * @return the redisConfiguration value */ @@ -102,7 +102,7 @@ public Map redisConfiguration() { } /** - * Set the redisConfiguration value. + * Set 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. * * @param redisConfiguration the redisConfiguration value to set * @return the RedisCreateParameters object itself. @@ -113,7 +113,7 @@ public RedisCreateParameters withRedisConfiguration(Map redisCon } /** - * Get the enableNonSslPort value. + * Get specifies whether the non-ssl Redis server port (6379) is enabled. * * @return the enableNonSslPort value */ @@ -122,7 +122,7 @@ public Boolean enableNonSslPort() { } /** - * Set the enableNonSslPort value. + * Set specifies whether the non-ssl Redis server port (6379) is enabled. * * @param enableNonSslPort the enableNonSslPort value to set * @return the RedisCreateParameters object itself. @@ -133,7 +133,7 @@ public RedisCreateParameters withEnableNonSslPort(Boolean enableNonSslPort) { } /** - * Get the tenantSettings value. + * Get a dictionary of tenant settings. * * @return the tenantSettings value */ @@ -142,7 +142,7 @@ public Map tenantSettings() { } /** - * Set the tenantSettings value. + * Set a dictionary of tenant settings. * * @param tenantSettings the tenantSettings value to set * @return the RedisCreateParameters object itself. @@ -153,7 +153,7 @@ public RedisCreateParameters withTenantSettings(Map tenantSettin } /** - * Get the shardCount value. + * Get the number of shards to be created on a Premium Cluster Cache. * * @return the shardCount value */ @@ -162,7 +162,7 @@ public Integer shardCount() { } /** - * Set the shardCount value. + * Set the number of shards to be created on a Premium Cluster Cache. * * @param shardCount the shardCount value to set * @return the RedisCreateParameters object itself. @@ -173,7 +173,7 @@ public RedisCreateParameters withShardCount(Integer shardCount) { } /** - * Get the minimumTlsVersion value. + * Get optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @return the minimumTlsVersion value */ @@ -182,7 +182,7 @@ public TlsVersion minimumTlsVersion() { } /** - * Set the minimumTlsVersion value. + * Set optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @param minimumTlsVersion the minimumTlsVersion value to set * @return the RedisCreateParameters object itself. @@ -193,7 +193,7 @@ public RedisCreateParameters withMinimumTlsVersion(TlsVersion minimumTlsVersion) } /** - * Get the sku value. + * Get the SKU of the Redis cache to deploy. * * @return the sku value */ @@ -202,7 +202,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of the Redis cache to deploy. * * @param sku the sku value to set * @return the RedisCreateParameters object itself. @@ -213,7 +213,7 @@ public RedisCreateParameters withSku(Sku sku) { } /** - * Get the subnetId value. + * Get the full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. * * @return the subnetId value */ @@ -222,7 +222,7 @@ public String subnetId() { } /** - * Set the subnetId value. + * Set the full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. * * @param subnetId the subnetId value to set * @return the RedisCreateParameters object itself. @@ -233,7 +233,7 @@ public RedisCreateParameters withSubnetId(String subnetId) { } /** - * Get the staticIP value. + * Get static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. * * @return the staticIP value */ @@ -242,7 +242,7 @@ public String staticIP() { } /** - * Set the staticIP value. + * Set static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. * * @param staticIP the staticIP value to set * @return the RedisCreateParameters object itself. @@ -253,7 +253,7 @@ public RedisCreateParameters withStaticIP(String staticIP) { } /** - * Get the zones value. + * Get a list of availability zones denoting where the resource needs to come from. * * @return the zones value */ @@ -262,7 +262,7 @@ public List zones() { } /** - * Set the zones value. + * Set a list of availability zones denoting where the resource needs to come from. * * @param zones the zones value to set * @return the RedisCreateParameters object itself. @@ -273,7 +273,7 @@ public RedisCreateParameters withZones(List zones) { } /** - * Get the location value. + * Get the geo-location where the resource lives. * * @return the location value */ @@ -282,7 +282,7 @@ public String location() { } /** - * Set the location value. + * Set the geo-location where the resource lives. * * @param location the location value to set * @return the RedisCreateParameters object itself. @@ -293,7 +293,7 @@ public RedisCreateParameters withLocation(String location) { } /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -302,7 +302,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the RedisCreateParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java index a2921f761e3c3..b82b9e287421c 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRule.java @@ -69,6 +69,9 @@ interface Blank extends WithRedis { interface WithRedis { /** * 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); } @@ -79,6 +82,8 @@ interface WithRedis { interface WithEndIP { /** * Specifies endIP. + * @param endIP highest IP address included in the range + * @return the next definition stage */ WithStartIP withEndIP(String endIP); } @@ -89,6 +94,8 @@ interface WithEndIP { interface WithStartIP { /** * Specifies startIP. + * @param startIP lowest IP address included in the range + * @return the next definition stage */ WithCreate withStartIP(String startIP); } diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRuleCreateParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRuleCreateParameters.java index 32146f59ede29..20c4a5a2073dc 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRuleCreateParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisFirewallRuleCreateParameters.java @@ -29,7 +29,7 @@ public class RedisFirewallRuleCreateParameters { private String endIP; /** - * Get the startIP value. + * Get lowest IP address included in the range. * * @return the startIP value */ @@ -38,7 +38,7 @@ public String startIP() { } /** - * Set the startIP value. + * Set lowest IP address included in the range. * * @param startIP the startIP value to set * @return the RedisFirewallRuleCreateParameters object itself. @@ -49,7 +49,7 @@ public RedisFirewallRuleCreateParameters withStartIP(String startIP) { } /** - * Get the endIP value. + * Get highest IP address included in the range. * * @return the endIP value */ @@ -58,7 +58,7 @@ public String endIP() { } /** - * Set the endIP value. + * Set highest IP address included in the range. * * @param endIP the endIP value to set * @return the RedisFirewallRuleCreateParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServer.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServer.java index 9104329fae3f0..402f6bfb7f559 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServer.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServer.java @@ -21,7 +21,7 @@ public class RedisLinkedServer { private String id; /** - * Get the id value. + * Get linked server Id. * * @return the id value */ diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerCreateParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerCreateParameters.java index 3b9b0e15971a2..7e6299ac12f69 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerCreateParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerCreateParameters.java @@ -36,7 +36,7 @@ public class RedisLinkedServerCreateParameters { private ReplicationRole serverRole; /** - * Get the linkedRedisCacheId value. + * Get fully qualified resourceId of the linked redis cache. * * @return the linkedRedisCacheId value */ @@ -45,7 +45,7 @@ public String linkedRedisCacheId() { } /** - * Set the linkedRedisCacheId value. + * Set fully qualified resourceId of the linked redis cache. * * @param linkedRedisCacheId the linkedRedisCacheId value to set * @return the RedisLinkedServerCreateParameters object itself. @@ -56,7 +56,7 @@ public RedisLinkedServerCreateParameters withLinkedRedisCacheId(String linkedRed } /** - * Get the linkedRedisCacheLocation value. + * Get location of the linked redis cache. * * @return the linkedRedisCacheLocation value */ @@ -65,7 +65,7 @@ public String linkedRedisCacheLocation() { } /** - * Set the linkedRedisCacheLocation value. + * Set location of the linked redis cache. * * @param linkedRedisCacheLocation the linkedRedisCacheLocation value to set * @return the RedisLinkedServerCreateParameters object itself. @@ -76,7 +76,7 @@ public RedisLinkedServerCreateParameters withLinkedRedisCacheLocation(String lin } /** - * Get the serverRole value. + * Get role of the linked server. Possible values include: 'Primary', 'Secondary'. * * @return the serverRole value */ @@ -85,7 +85,7 @@ public ReplicationRole serverRole() { } /** - * Set the serverRole value. + * Set role of the linked server. Possible values include: 'Primary', 'Secondary'. * * @param serverRole the serverRole value to set * @return the RedisLinkedServerCreateParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java index 9e875d2919ef2..4cebbbb113598 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisLinkedServerWithProperties.java @@ -79,6 +79,9 @@ interface Blank extends WithRedis { interface WithRedis { /** * Specifies resourceGroupName, name. + * @param resourceGroupName The name of the resource group + * @param name The name of the Redis cache + * @return the next definition stage */ WithLinkedRedisCacheId withExistingRedis(String resourceGroupName, String name); } @@ -89,6 +92,8 @@ interface WithRedis { interface WithLinkedRedisCacheId { /** * Specifies linkedRedisCacheId. + * @param linkedRedisCacheId Fully qualified resourceId of the linked redis cache + * @return the next definition stage */ WithLinkedRedisCacheLocation withLinkedRedisCacheId(String linkedRedisCacheId); } @@ -99,6 +104,8 @@ interface WithLinkedRedisCacheId { interface WithLinkedRedisCacheLocation { /** * Specifies linkedRedisCacheLocation. + * @param linkedRedisCacheLocation Location of the linked redis cache + * @return the next definition stage */ WithServerRole withLinkedRedisCacheLocation(String linkedRedisCacheLocation); } @@ -109,6 +116,8 @@ interface WithLinkedRedisCacheLocation { interface WithServerRole { /** * Specifies serverRole. + * @param serverRole Role of the linked server. Possible values include: 'Primary', 'Secondary' + * @return the next definition stage */ WithCreate withServerRole(ReplicationRole serverRole); } diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisPatchSchedule.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisPatchSchedule.java index 015f83e075f4d..3d5c728174bb0 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisPatchSchedule.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisPatchSchedule.java @@ -65,6 +65,9 @@ interface Blank extends WithRedis { interface WithRedis { /** * 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); } @@ -75,6 +78,8 @@ interface WithRedis { interface WithScheduleEntries { /** * Specifies scheduleEntries. + * @param scheduleEntries List of patch schedules for a Redis cache + * @return the next definition stage */ WithCreate withScheduleEntries(List scheduleEntries); } @@ -103,6 +108,8 @@ interface UpdateStages { interface WithScheduleEntries { /** * Specifies scheduleEntries. + * @param scheduleEntries List of patch schedules for a Redis cache + * @return the next update stage */ Update withScheduleEntries(List scheduleEntries); } diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRebootParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRebootParameters.java index 970b2a7ff26c4..d51ef04ec0752 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRebootParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRebootParameters.java @@ -29,7 +29,7 @@ public class RedisRebootParameters { private Integer shardId; /** - * Get the rebootType value. + * Get which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values include: 'PrimaryNode', 'SecondaryNode', 'AllNodes'. * * @return the rebootType value */ @@ -38,7 +38,7 @@ public RebootType rebootType() { } /** - * Set the rebootType value. + * Set which Redis node(s) to reboot. Depending on this value data loss is possible. Possible values include: 'PrimaryNode', 'SecondaryNode', 'AllNodes'. * * @param rebootType the rebootType value to set * @return the RedisRebootParameters object itself. @@ -49,7 +49,7 @@ public RedisRebootParameters withRebootType(RebootType rebootType) { } /** - * Get the shardId value. + * Get if clustering is enabled, the ID of the shard to be rebooted. * * @return the shardId value */ @@ -58,7 +58,7 @@ public Integer shardId() { } /** - * Set the shardId value. + * Set if clustering is enabled, the ID of the shard to be rebooted. * * @param shardId the shardId value to set * @return the RedisRebootParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRegenerateKeyParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRegenerateKeyParameters.java index fdfe1c6c229ae..1e16034ed46aa 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRegenerateKeyParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisRegenerateKeyParameters.java @@ -22,7 +22,7 @@ public class RedisRegenerateKeyParameters { private RedisKeyType keyType; /** - * Get the keyType value. + * Get the Redis access key to regenerate. Possible values include: 'Primary', 'Secondary'. * * @return the keyType value */ @@ -31,7 +31,7 @@ public RedisKeyType keyType() { } /** - * Set the keyType value. + * Set the Redis access key to regenerate. Possible values include: 'Primary', 'Secondary'. * * @param keyType the keyType value to set * @return the RedisRegenerateKeyParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java index 1a61ea6df19d3..d0d3aabe965de 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisResource.java @@ -10,12 +10,12 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; import com.microsoft.azure.arm.resources.models.HasResourceGroup; import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; -import com.microsoft.azure.arm.resources.models.GroupableResourceCore; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; import java.util.Map; @@ -134,86 +134,104 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup redisConfiguration); } /** - * The stage of the redisresource update allowing to specify ShardCount. + * The stage of the redisresource definition allowing to specify ShardCount. */ interface WithShardCount { /** * Specifies shardCount. + * @param shardCount The number of shards to be created on a Premium Cluster Cache + * @return the next definition stage */ WithCreate withShardCount(Integer shardCount); } /** - * The stage of the redisresource update allowing to specify StaticIP. + * The stage of the redisresource definition allowing to specify StaticIP. */ interface WithStaticIP { /** * Specifies staticIP. + * @param staticIP Static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network + * @return the next definition stage */ WithCreate withStaticIP(String staticIP); } /** - * The stage of the redisresource update allowing to specify SubnetId. + * The stage of the redisresource definition allowing to specify SubnetId. */ interface WithSubnetId { /** * Specifies subnetId. + * @param subnetId The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + * @return the next definition stage */ WithCreate withSubnetId(String subnetId); } /** - * The stage of the redisresource update allowing to specify TenantSettings. + * The stage of the redisresource definition allowing to specify TenantSettings. */ interface WithTenantSettings { /** * Specifies tenantSettings. + * @param tenantSettings A dictionary of tenant settings + * @return the next definition stage */ WithCreate withTenantSettings(Map tenantSettings); } /** - * The stage of the redisresource update allowing to specify Zones. + * The stage of the redisresource definition allowing to specify Zones. */ interface WithZones { /** * Specifies zones. + * @param zones A list of availability zones denoting where the resource needs to come from + * @return the next definition stage */ WithCreate withZones(List zones); } @@ -237,61 +255,73 @@ interface Update extends Appliable, Resource.UpdateWithTags redisConfiguration); } /** - * The stage of the redisresource {0} allowing to specify ShardCount. + * The stage of the redisresource update allowing to specify ShardCount. */ interface WithShardCount { /** * Specifies shardCount. + * @param shardCount The number of shards to be created on a Premium Cluster Cache + * @return the next update stage */ Update withShardCount(Integer shardCount); } /** - * The stage of the redisresource {0} allowing to specify Sku. + * The stage of the redisresource update allowing to specify Sku. */ interface WithSku { /** * Specifies sku. + * @param sku The SKU of the Redis cache to deploy + * @return the next update stage */ Update withSku(Sku sku); } /** - * The stage of the redisresource {0} allowing to specify TenantSettings. + * The stage of the redisresource update allowing to specify TenantSettings. */ interface WithTenantSettings { /** * Specifies tenantSettings. + * @param tenantSettings A dictionary of tenant settings + * @return the next update stage */ Update withTenantSettings(Map tenantSettings); } diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisUpdateParameters.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisUpdateParameters.java index aa8cf3f98e5d9..60e6285b1e621 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisUpdateParameters.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/RedisUpdateParameters.java @@ -64,7 +64,7 @@ public class RedisUpdateParameters { private Map tags; /** - * Get the redisConfiguration value. + * Get 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. * * @return the redisConfiguration value */ @@ -73,7 +73,7 @@ public Map redisConfiguration() { } /** - * Set the redisConfiguration value. + * Set 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. * * @param redisConfiguration the redisConfiguration value to set * @return the RedisUpdateParameters object itself. @@ -84,7 +84,7 @@ public RedisUpdateParameters withRedisConfiguration(Map redisCon } /** - * Get the enableNonSslPort value. + * Get specifies whether the non-ssl Redis server port (6379) is enabled. * * @return the enableNonSslPort value */ @@ -93,7 +93,7 @@ public Boolean enableNonSslPort() { } /** - * Set the enableNonSslPort value. + * Set specifies whether the non-ssl Redis server port (6379) is enabled. * * @param enableNonSslPort the enableNonSslPort value to set * @return the RedisUpdateParameters object itself. @@ -104,7 +104,7 @@ public RedisUpdateParameters withEnableNonSslPort(Boolean enableNonSslPort) { } /** - * Get the tenantSettings value. + * Get a dictionary of tenant settings. * * @return the tenantSettings value */ @@ -113,7 +113,7 @@ public Map tenantSettings() { } /** - * Set the tenantSettings value. + * Set a dictionary of tenant settings. * * @param tenantSettings the tenantSettings value to set * @return the RedisUpdateParameters object itself. @@ -124,7 +124,7 @@ public RedisUpdateParameters withTenantSettings(Map tenantSettin } /** - * Get the shardCount value. + * Get the number of shards to be created on a Premium Cluster Cache. * * @return the shardCount value */ @@ -133,7 +133,7 @@ public Integer shardCount() { } /** - * Set the shardCount value. + * Set the number of shards to be created on a Premium Cluster Cache. * * @param shardCount the shardCount value to set * @return the RedisUpdateParameters object itself. @@ -144,7 +144,7 @@ public RedisUpdateParameters withShardCount(Integer shardCount) { } /** - * Get the minimumTlsVersion value. + * Get optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @return the minimumTlsVersion value */ @@ -153,7 +153,7 @@ public TlsVersion minimumTlsVersion() { } /** - * Set the minimumTlsVersion value. + * Set optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @param minimumTlsVersion the minimumTlsVersion value to set * @return the RedisUpdateParameters object itself. @@ -164,7 +164,7 @@ public RedisUpdateParameters withMinimumTlsVersion(TlsVersion minimumTlsVersion) } /** - * Get the sku value. + * Get the SKU of the Redis cache to deploy. * * @return the sku value */ @@ -173,7 +173,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of the Redis cache to deploy. * * @param sku the sku value to set * @return the RedisUpdateParameters object itself. @@ -184,7 +184,7 @@ public RedisUpdateParameters withSku(Sku sku) { } /** - * Get the tags value. + * Get resource tags. * * @return the tags value */ @@ -193,7 +193,7 @@ public Map tags() { } /** - * Set the tags value. + * Set resource tags. * * @param tags the tags value to set * @return the RedisUpdateParameters object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java index 5445063a827fe..95cfd05a82a68 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/ScheduleEntry.java @@ -36,7 +36,7 @@ public class ScheduleEntry { private Period maintenanceWindow; /** - * Get the dayOfWeek value. + * Get day of the week when a cache can be patched. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend'. * * @return the dayOfWeek value */ @@ -45,7 +45,7 @@ public DayOfWeek dayOfWeek() { } /** - * Set the dayOfWeek value. + * Set day of the week when a cache can be patched. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend'. * * @param dayOfWeek the dayOfWeek value to set * @return the ScheduleEntry object itself. @@ -56,7 +56,7 @@ public ScheduleEntry withDayOfWeek(DayOfWeek dayOfWeek) { } /** - * Get the startHourUtc value. + * Get start hour after which cache patching can start. * * @return the startHourUtc value */ @@ -65,7 +65,7 @@ public int startHourUtc() { } /** - * Set the startHourUtc value. + * Set start hour after which cache patching can start. * * @param startHourUtc the startHourUtc value to set * @return the ScheduleEntry object itself. @@ -76,7 +76,7 @@ public ScheduleEntry withStartHourUtc(int startHourUtc) { } /** - * Get the maintenanceWindow value. + * Get iSO8601 timespan specifying how much time cache patching can take. * * @return the maintenanceWindow value */ @@ -85,7 +85,7 @@ public Period maintenanceWindow() { } /** - * Set the maintenanceWindow value. + * Set iSO8601 timespan specifying how much time cache patching can take. * * @param maintenanceWindow the maintenanceWindow value to set * @return the ScheduleEntry object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java index 7fda34ea0cb16..ac90d13003a4a 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/Sku.java @@ -37,7 +37,7 @@ public class Sku { private int capacity; /** - * Get the name value. + * Get the type of Redis cache to deploy. Valid values: (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', 'Premium'. * * @return the name value */ @@ -46,7 +46,7 @@ public SkuName name() { } /** - * Set the name value. + * Set the type of Redis cache to deploy. Valid values: (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', 'Premium'. * * @param name the name value to set * @return the Sku object itself. @@ -57,7 +57,7 @@ public Sku withName(SkuName name) { } /** - * Get the family value. + * Get the SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). Possible values include: 'C', 'P'. * * @return the family value */ @@ -66,7 +66,7 @@ public SkuFamily family() { } /** - * Set the family value. + * Set the SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = Premium). Possible values include: 'C', 'P'. * * @param family the family value to set * @return the Sku object itself. @@ -77,7 +77,7 @@ public Sku withFamily(SkuFamily family) { } /** - * Get the capacity value. + * 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). * * @return the capacity value */ @@ -86,7 +86,7 @@ public int capacity() { } /** - * Set the capacity value. + * 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). * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/UpgradeNotification.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/UpgradeNotification.java index 1c4d643573d5c..272b57c3f2017 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/UpgradeNotification.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/UpgradeNotification.java @@ -23,7 +23,7 @@ public class UpgradeNotification { private String name; /** - * Timestamp when upgrade notification occured. + * Timestamp when upgrade notification occurred. */ @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private DateTime timestamp; @@ -35,7 +35,7 @@ public class UpgradeNotification { private Map upsellNotification; /** - * Get the name value. + * Get name of upgrade notification. * * @return the name value */ @@ -44,7 +44,7 @@ public String name() { } /** - * Get the timestamp value. + * Get timestamp when upgrade notification occurred. * * @return the timestamp value */ @@ -53,7 +53,7 @@ public DateTime timestamp() { } /** - * Get the upsellNotification value. + * Get details about this upgrade notification. * * @return the upsellNotification value */ diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java index c3969f8e2da54..ea9b33d25587c 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/FirewallRulesImpl.java @@ -42,41 +42,22 @@ private RedisFirewallRuleImpl wrapModel(String name) { return new RedisFirewallRuleImpl(name, this.manager()); } - private Observable> listByRedisResourceNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - FirewallRulesInner client = this.inner(); - return client.listByRedisResourceNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByRedisResourceNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { FirewallRulesInner client = this.inner(); return client.listByRedisResourceAsync(resourceGroupName, cacheName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByRedisResourceNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public RedisFirewallRule call(RedisFirewallRuleInner inner) { return wrapModel(inner); } - }); + }); } @Override diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java index c35d2fa61d303..63f60a140785f 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/LinkedServersImpl.java @@ -42,41 +42,22 @@ private RedisLinkedServerWithPropertiesImpl wrapModel(String name) { return new RedisLinkedServerWithPropertiesImpl(name, this.manager()); } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - LinkedServersInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync(final String resourceGroupName, final String name) { LinkedServersInner client = this.inner(); return client.listAsync(resourceGroupName, name) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public RedisLinkedServerWithProperties call(RedisLinkedServerWithPropertiesInner inner) { return wrapModel(inner); } - }); + }); } @Override diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseInner.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseInner.java index b444f73c1c151..b7da9188e9506 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseInner.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/NotificationListResponseInner.java @@ -29,7 +29,7 @@ public class NotificationListResponseInner { private String nextLink; /** - * Get the value value. + * Get list of all notifications. * * @return the value value */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value value. + * Set list of all notifications. * * @param value the value value to set * @return the NotificationListResponseInner object itself. @@ -49,7 +49,7 @@ public NotificationListResponseInner withValue(List value) } /** - * Get the nextLink value. + * Get link for next set of notifications. * * @return the nextLink value */ diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationInner.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationInner.java index 08832cfa4e915..278381928e95e 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationInner.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationInner.java @@ -28,7 +28,7 @@ public class OperationInner { private OperationDisplay display; /** - * Get the name value. + * Get operation name: {provider}/{resource}/{operation}. * * @return the name value */ @@ -37,7 +37,7 @@ public String name() { } /** - * Set the name value. + * Set operation name: {provider}/{resource}/{operation}. * * @param name the name value to set * @return the OperationInner object itself. @@ -48,7 +48,7 @@ public OperationInner withName(String name) { } /** - * Get the display value. + * Get the object that describes the operation. * * @return the display value */ @@ -57,7 +57,7 @@ public OperationDisplay display() { } /** - * Set the display value. + * Set the object that describes the operation. * * @param display the display value to set * @return the OperationInner object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java index bc6d9a7791ce0..f8d148714f416 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/OperationsImpl.java @@ -28,41 +28,22 @@ public RedisManager manager() { return this.manager; } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - OperationsInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync() { OperationsInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public Operation call(OperationInner inner) { return new OperationImpl(inner, manager()); } - }); + }); } } diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java index b85121c948ac8..b358005ad2fa2 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/PatchSchedulesImpl.java @@ -42,41 +42,22 @@ private RedisPatchScheduleImpl wrapModel(String name) { return new RedisPatchScheduleImpl(name, this.manager()); } - private Observable> listByRedisResourceNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - PatchSchedulesInner client = this.inner(); - return client.listByRedisResourceNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByRedisResourceNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listByRedisResourceAsync(final String resourceGroupName, final String cacheName) { PatchSchedulesInner client = this.inner(); return client.listByRedisResourceAsync(resourceGroupName, cacheName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByRedisResourceNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public RedisPatchSchedule call(RedisPatchScheduleInner inner) { return wrapModel(inner); } - }); + }); } @Override diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysInner.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysInner.java index a74a235f750f1..3041c09db772b 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysInner.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisAccessKeysInner.java @@ -29,7 +29,7 @@ public class RedisAccessKeysInner { private String secondaryKey; /** - * Get the primaryKey value. + * Get the current primary key that clients can use to authenticate with Redis cache. * * @return the primaryKey value */ @@ -38,7 +38,7 @@ public String primaryKey() { } /** - * Get the secondaryKey value. + * Get the current secondary key that clients can use to authenticate with Redis cache. * * @return the secondaryKey value */ diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java index 907a2e8f54cd8..c71b3ea6c82af 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisFirewallRuleImpl.java @@ -35,7 +35,7 @@ class RedisFirewallRuleImpl extends CreatableUpdatableImpl listByResourceGroup(String resourceGroupName) { return this.wrapList(client.listByResourceGroup(resourceGroupName)); } - private Observable> listByResourceGroupNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - RedisInner client = this.inner(); - return client.listByResourceGroupNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByResourceGroupNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listByResourceGroupAsync(String resourceGroupName) { RedisInner client = this.inner(); return client.listByResourceGroupAsync(resourceGroupName) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listByResourceGroupNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public RedisResource call(RedisResourceInner inner) { return wrapModel(inner); } - }); + }); } @Override @@ -129,41 +110,22 @@ public PagedList list() { return this.wrapList(client.list()); } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } - RedisInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); - } - }); - } @Override public Observable listAsync() { RedisInner client = this.inner(); return client.listAsync() - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Page page) { - return listNextInnerPageAsync(page.nextPageLink()); - } - }) .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { return page.items(); } - }) + }) .map(new Func1() { @Override public RedisResource call(RedisResourceInner inner) { return wrapModel(inner); } - }); + }); } @Override diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java index 7f995c3a10163..8cc5a092334fd 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisLinkedServerWithPropertiesImpl.java @@ -36,7 +36,7 @@ class RedisLinkedServerWithPropertiesImpl extends CreatableUpdatableImpl scheduleEntries; /** - * Get the scheduleEntries value. + * Get list of patch schedules for a Redis cache. * * @return the scheduleEntries value */ @@ -35,7 +35,7 @@ public List scheduleEntries() { } /** - * Set the scheduleEntries value. + * Set list of patch schedules for a Redis cache. * * @param scheduleEntries the scheduleEntries value to set * @return the RedisPatchScheduleInner object itself. diff --git a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisResourceInner.java b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisResourceInner.java index 830eace050028..016b60997be06 100644 --- a/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisResourceInner.java +++ b/redis/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisResourceInner.java @@ -66,7 +66,7 @@ public class RedisResourceInner extends Resource { /** * 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. + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. */ @JsonProperty(value = "properties.subnetId") private String subnetId; @@ -132,7 +132,7 @@ public class RedisResourceInner extends Resource { private List zones; /** - * Get the redisConfiguration value. + * Get 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. * * @return the redisConfiguration value */ @@ -141,7 +141,7 @@ public Map redisConfiguration() { } /** - * Set the redisConfiguration value. + * Set 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. * * @param redisConfiguration the redisConfiguration value to set * @return the RedisResourceInner object itself. @@ -152,7 +152,7 @@ public RedisResourceInner withRedisConfiguration(Map redisConfig } /** - * Get the enableNonSslPort value. + * Get specifies whether the non-ssl Redis server port (6379) is enabled. * * @return the enableNonSslPort value */ @@ -161,7 +161,7 @@ public Boolean enableNonSslPort() { } /** - * Set the enableNonSslPort value. + * Set specifies whether the non-ssl Redis server port (6379) is enabled. * * @param enableNonSslPort the enableNonSslPort value to set * @return the RedisResourceInner object itself. @@ -172,7 +172,7 @@ public RedisResourceInner withEnableNonSslPort(Boolean enableNonSslPort) { } /** - * Get the tenantSettings value. + * Get a dictionary of tenant settings. * * @return the tenantSettings value */ @@ -181,7 +181,7 @@ public Map tenantSettings() { } /** - * Set the tenantSettings value. + * Set a dictionary of tenant settings. * * @param tenantSettings the tenantSettings value to set * @return the RedisResourceInner object itself. @@ -192,7 +192,7 @@ public RedisResourceInner withTenantSettings(Map tenantSettings) } /** - * Get the shardCount value. + * Get the number of shards to be created on a Premium Cluster Cache. * * @return the shardCount value */ @@ -201,7 +201,7 @@ public Integer shardCount() { } /** - * Set the shardCount value. + * Set the number of shards to be created on a Premium Cluster Cache. * * @param shardCount the shardCount value to set * @return the RedisResourceInner object itself. @@ -212,7 +212,7 @@ public RedisResourceInner withShardCount(Integer shardCount) { } /** - * Get the minimumTlsVersion value. + * Get optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @return the minimumTlsVersion value */ @@ -221,7 +221,7 @@ public TlsVersion minimumTlsVersion() { } /** - * Set the minimumTlsVersion value. + * Set optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2'. * * @param minimumTlsVersion the minimumTlsVersion value to set * @return the RedisResourceInner object itself. @@ -232,7 +232,7 @@ public RedisResourceInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) { } /** - * Get the sku value. + * Get the SKU of the Redis cache to deploy. * * @return the sku value */ @@ -241,7 +241,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of the Redis cache to deploy. * * @param sku the sku value to set * @return the RedisResourceInner object itself. @@ -252,7 +252,7 @@ public RedisResourceInner withSku(Sku sku) { } /** - * Get the subnetId value. + * Get the full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. * * @return the subnetId value */ @@ -261,7 +261,7 @@ public String subnetId() { } /** - * Set the subnetId value. + * Set the full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. * * @param subnetId the subnetId value to set * @return the RedisResourceInner object itself. @@ -272,7 +272,7 @@ public RedisResourceInner withSubnetId(String subnetId) { } /** - * Get the staticIP value. + * Get static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. * * @return the staticIP value */ @@ -281,7 +281,7 @@ public String staticIP() { } /** - * Set the staticIP value. + * Set static IP address. Required when deploying a Redis cache inside an existing Azure Virtual Network. * * @param staticIP the staticIP value to set * @return the RedisResourceInner object itself. @@ -292,7 +292,7 @@ public RedisResourceInner withStaticIP(String staticIP) { } /** - * Get the redisVersion value. + * Get redis version. * * @return the redisVersion value */ @@ -301,7 +301,7 @@ public String redisVersion() { } /** - * Get the provisioningState value. + * Get redis instance provisioning status. Possible values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', 'Unlinking', 'Unprovisioning', 'Updating'. * * @return the provisioningState value */ @@ -310,7 +310,7 @@ public ProvisioningState provisioningState() { } /** - * Get the hostName value. + * Get redis host name. * * @return the hostName value */ @@ -319,7 +319,7 @@ public String hostName() { } /** - * Get the port value. + * Get redis non-SSL port. * * @return the port value */ @@ -328,7 +328,7 @@ public Integer port() { } /** - * Get the sslPort value. + * Get redis SSL port. * * @return the sslPort value */ @@ -337,7 +337,7 @@ public Integer sslPort() { } /** - * Get the accessKeys value. + * Get the keys of the Redis cache - not set if this object is not the response to Create or Update redis cache. * * @return the accessKeys value */ @@ -346,7 +346,7 @@ public RedisAccessKeysInner accessKeys() { } /** - * Get the linkedServers value. + * Get list of the linked servers associated with the cache. * * @return the linkedServers value */ @@ -355,7 +355,7 @@ public List linkedServers() { } /** - * Get the zones value. + * Get a list of availability zones denoting where the resource needs to come from. * * @return the zones value */ @@ -364,7 +364,7 @@ public List zones() { } /** - * Set the zones value. + * Set a list of availability zones denoting where the resource needs to come from. * * @param zones the zones value to set * @return the RedisResourceInner object itself. diff --git a/redis/resource-manager/v2018_03_01/src/test/java/com/microsoft/azure/management/redis/v2018_03_01/RedisTest.java b/redis/resource-manager/v2018_03_01/src/test/java/com/microsoft/azure/management/redis/v2018_03_01/RedisTest.java deleted file mode 100644 index 2736986e52a35..0000000000000 --- a/redis/resource-manager/v2018_03_01/src/test/java/com/microsoft/azure/management/redis/v2018_03_01/RedisTest.java +++ /dev/null @@ -1,45 +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.v2018_03_01; -import com.microsoft.azure.arm.core.TestBase; -import com.microsoft.azure.management.redis.v2018_03_01.implementation.RedisManager; -import com.microsoft.azure.management.resources.implementation.ResourceManager; -import com.microsoft.rest.RestClient; -import com.microsoft.azure.arm.utils.SdkContext; -import org.junit.Test; -import org.junit.Assert; -import com.microsoft.azure.arm.resources.Region; -import com.microsoft.azure.management.resources.ResourceGroup; - -public class RedisTest extends TestBase { - protected static ResourceManager resourceManager; - protected static RedisManager redisManager; - private static String rgName; - @Override - protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) { - resourceManager = ResourceManager - .authenticate(restClient) - .withSubscription(defaultSubscription); - redisManager = RedisManager - .authenticate(restClient, defaultSubscription); - } - @Override - protected void cleanUpResources() { - resourceManager.resourceGroups().deleteByName(rgName); - } - @Test - public void firstTest() { - rgName = SdkContext.randomResourceName("rg", 20); - ResourceGroup group = resourceManager.resourceGroups() - .define(rgName) - .withRegion(Region.US_WEST.toString()) - .create(); - Assert.assertNotNull(group); - } -}