From ed36cfca14fee0e0ba8a038111227c790a01deba Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 21 Mar 2019 21:54:52 -0700 Subject: [PATCH] Generated from df6ed133536ac9854663a1ea0958807915ae2cbd (#3176) resolve comments --- .../v2018_03_01_preview/pom.xml | 14 +- .../v2018_03_01_preview/Dimension.java | 122 + .../MetricSpecification.java | 59 +- .../v2018_03_01_preview/NameAvailability.java | 4 +- .../NameAvailabilityParameters.java | 8 +- .../v2018_03_01_preview/Operation.java | 4 +- .../v2018_03_01_preview/OperationDisplay.java | 16 +- .../OperationProperties.java | 4 +- .../RegenerateKeyParameters.java | 4 +- .../v2018_03_01_preview/ResourceSku.java | 27 +- .../ServiceSpecification.java | 4 +- .../SignalRCreateOrUpdateProperties.java | 6 +- .../SignalRCreateParameters.java | 6 +- .../v2018_03_01_preview/SignalRKeys.java | 14 +- .../v2018_03_01_preview/SignalRResource.java | 107 +- .../v2018_03_01_preview/SignalRSkuTier.java | 3 + .../SignalRUpdateParameters.java | 12 +- .../v2018_03_01_preview/SignalRUsage.java | 45 + .../v2018_03_01_preview/SignalRUsageName.java | 69 + .../signalr/v2018_03_01_preview/SignalRs.java | 74 +- .../signalr/v2018_03_01_preview/Usages.java | 28 + .../implementation/NameAvailabilityImpl.java | 6 +- .../implementation/NameAvailabilityInner.java | 12 +- .../implementation/OperationImpl.java | 6 +- .../implementation/OperationInner.java | 16 +- .../implementation/OperationsImpl.java | 29 +- .../implementation/SignalRKeysImpl.java | 16 +- .../implementation/SignalRKeysInner.java | 60 +- .../SignalRManagementClientImpl.java | 34 +- .../implementation/SignalRResourceImpl.java | 99 +- .../implementation/SignalRResourceInner.java | 47 +- .../implementation/SignalRServiceManager.java | 123 + .../implementation/SignalRUsageImpl.java | 56 + .../implementation/SignalRUsageInner.java | 150 ++ .../implementation/SignalRsImpl.java | 206 +- .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 292 +++ signalr/resource-manager/v2018_10_01/pom.xml | 133 + .../signalr/v2018_10_01/Dimension.java | 122 + .../signalr/v2018_10_01/KeyType.java | 41 + .../v2018_10_01/MetricSpecification.java | 237 ++ .../signalr/v2018_10_01/NameAvailability.java | 35 + .../NameAvailabilityParameters.java | 69 + .../signalr/v2018_10_01/Operation.java | 40 + .../signalr/v2018_10_01/OperationDisplay.java | 121 + .../v2018_10_01/OperationProperties.java | 43 + .../signalr/v2018_10_01/Operations.java | 27 + .../v2018_10_01/ProvisioningState.java | 62 + .../v2018_10_01/RegenerateKeyParameters.java | 45 + .../signalr/v2018_10_01/ResourceSku.java | 156 ++ .../v2018_10_01/ServiceSpecification.java | 44 + .../SignalRCreateOrUpdateProperties.java | 47 + .../v2018_10_01/SignalRCreateParameters.java | 50 + .../signalr/v2018_10_01/SignalRKeys.java | 40 + .../signalr/v2018_10_01/SignalRResource.java | 86 + .../signalr/v2018_10_01/SignalRSkuTier.java | 47 + .../v2018_10_01/SignalRUpdateParameters.java | 96 + .../signalr/v2018_10_01/SignalRUsage.java | 45 + .../signalr/v2018_10_01/SignalRUsageName.java | 69 + .../signalr/v2018_10_01/SignalRs.java | 114 + .../signalr/v2018_10_01/Usages.java | 28 + .../implementation/IdParsingUtils.java | 57 + .../implementation/NameAvailabilityImpl.java | 41 + .../implementation/NameAvailabilityInner.java | 96 + .../implementation/OperationImpl.java | 48 + .../implementation/OperationInner.java | 124 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 283 +++ .../v2018_10_01/implementation/PageImpl.java | 75 + .../implementation/SignalRKeysImpl.java | 46 + .../implementation/SignalRKeysInner.java | 121 + .../SignalRManagementClientImpl.java | 224 ++ .../implementation/SignalRResourceImpl.java | 94 + .../implementation/SignalRResourceInner.java | 186 ++ .../implementation/SignalRServiceManager.java | 123 + .../implementation/SignalRUsageImpl.java | 56 + .../implementation/SignalRUsageInner.java | 150 ++ .../implementation/SignalRsImpl.java | 154 ++ .../implementation/SignalRsInner.java | 2181 +++++++++++++++++ .../implementation/UsagesImpl.java | 53 + .../implementation/UsagesInner.java | 295 +++ .../implementation/package-info.java | 11 + .../signalr/v2018_10_01/package-info.java | 11 + 83 files changed, 7675 insertions(+), 435 deletions(-) create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java create mode 100644 signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java create mode 100644 signalr/resource-manager/v2018_10_01/pom.xml create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Dimension.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/KeyType.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/MetricSpecification.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailabilityParameters.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationDisplay.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationProperties.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operations.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ProvisioningState.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/RegenerateKeyParameters.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRSkuTier.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUpdateParameters.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsageName.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Usages.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/IdParsingUtils.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PageImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/package-info.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/package-info.java diff --git a/signalr/resource-manager/v2018_03_01_preview/pom.xml b/signalr/resource-manager/v2018_03_01_preview/pom.xml index 9e422bc90835..faf6e1a8f3be 100644 --- a/signalr/resource-manager/v2018_03_01_preview/pom.xml +++ b/signalr/resource-manager/v2018_03_01_preview/pom.xml @@ -7,19 +7,19 @@ --> 4.0.0 - com.microsoft.azure.azure-mgmt-signalr-2018-03-01-preview + com.microsoft.azure.signalr.v2018_03_01_preview com.microsoft.azure azure-arm-parent - 1.0.0 + 0.0.3-beta ../../../pom.xml - azure-mgmt-signalr - 1.0.0-beta-SNAPSHOT + azure-mgmt-signalrservice + 1.0.0-beta jar Microsoft Azure SDK for SignalRService Management This package contains Microsoft SignalRService 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/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java new file mode 100644 index 000000000000..6e3997973287 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java @@ -0,0 +1,122 @@ +/** + * 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.signalr.v2018_03_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Dimension of metrics. + */ +public class Dimension { + /** + * The public facing name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Name of the dimension as it appears in MDM. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /** + * A Boolean flag indicating whether this dimension should be included for + * the shoebox export scenario. + */ + @JsonProperty(value = "toBeExportedForShoebox") + private Boolean toBeExportedForShoebox; + + /** + * Get the public facing name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the public facing name of the dimension. + * + * @param name the name value to set + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the dimension. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get name of the dimension as it appears in MDM. + * + * @return the internalName value + */ + public String internalName() { + return this.internalName; + } + + /** + * Set name of the dimension as it appears in MDM. + * + * @param internalName the internalName value to set + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + + /** + * Get a Boolean flag indicating whether this dimension should be included for the shoebox export scenario. + * + * @return the toBeExportedForShoebox value + */ + public Boolean toBeExportedForShoebox() { + return this.toBeExportedForShoebox; + } + + /** + * Set a Boolean flag indicating whether this dimension should be included for the shoebox export scenario. + * + * @param toBeExportedForShoebox the toBeExportedForShoebox value to set + * @return the Dimension object itself. + */ + public Dimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { + this.toBeExportedForShoebox = toBeExportedForShoebox; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java index d9501a27b7e6..f5424d2a0df0 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.signalr.v2018_03_01_preview; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -64,7 +65,13 @@ public class MetricSpecification { private String category; /** - * Get the name value. + * The dimensions of the metrics. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Get name of the metric. * * @return the name value */ @@ -73,7 +80,7 @@ public String name() { } /** - * Set the name value. + * Set name of the metric. * * @param name the name value to set * @return the MetricSpecification object itself. @@ -84,7 +91,7 @@ public MetricSpecification withName(String name) { } /** - * Get the displayName value. + * Get localized friendly display name of the metric. * * @return the displayName value */ @@ -93,7 +100,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set localized friendly display name of the metric. * * @param displayName the displayName value to set * @return the MetricSpecification object itself. @@ -104,7 +111,7 @@ public MetricSpecification withDisplayName(String displayName) { } /** - * Get the displayDescription value. + * Get localized friendly description of the metric. * * @return the displayDescription value */ @@ -113,7 +120,7 @@ public String displayDescription() { } /** - * Set the displayDescription value. + * Set localized friendly description of the metric. * * @param displayDescription the displayDescription value to set * @return the MetricSpecification object itself. @@ -124,7 +131,7 @@ public MetricSpecification withDisplayDescription(String displayDescription) { } /** - * Get the unit value. + * Get the unit that makes sense for the metric. * * @return the unit value */ @@ -133,7 +140,7 @@ public String unit() { } /** - * Set the unit value. + * Set the unit that makes sense for the metric. * * @param unit the unit value to set * @return the MetricSpecification object itself. @@ -144,7 +151,7 @@ public MetricSpecification withUnit(String unit) { } /** - * Get the aggregationType value. + * Get only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. * * @return the aggregationType value */ @@ -153,7 +160,7 @@ public String aggregationType() { } /** - * Set the aggregationType value. + * Set only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. * * @param aggregationType the aggregationType value to set * @return the MetricSpecification object itself. @@ -164,7 +171,9 @@ public MetricSpecification withAggregationType(String aggregationType) { } /** - * Get the fillGapWithZero value. + * Get optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. * * @return the fillGapWithZero value */ @@ -173,7 +182,9 @@ public String fillGapWithZero() { } /** - * Set the fillGapWithZero value. + * Set optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. * * @param fillGapWithZero the fillGapWithZero value to set * @return the MetricSpecification object itself. @@ -184,7 +195,7 @@ public MetricSpecification withFillGapWithZero(String fillGapWithZero) { } /** - * Get the category value. + * Get the name of the metric category that the metric belongs to. A metric can only belong to a single category. * * @return the category value */ @@ -193,7 +204,7 @@ public String category() { } /** - * Set the category value. + * Set the name of the metric category that the metric belongs to. A metric can only belong to a single category. * * @param category the category value to set * @return the MetricSpecification object itself. @@ -203,4 +214,24 @@ public MetricSpecification withCategory(String category) { return this; } + /** + * Get the dimensions of the metrics. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set the dimensions of the metrics. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java index 3891e0bc4720..aa1415f25a94 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.NameAvailabilityInner; /** * Type representing NameAvailability. */ -public interface NameAvailability extends HasInner, HasManager { +public interface NameAvailability extends HasInner, HasManager { /** * @return the message value. */ diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java index b785b34ce6d0..a9fb48435f68 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java @@ -27,7 +27,7 @@ public class NameAvailabilityParameters { private String name; /** - * Get the type value. + * Get the resource type. Should be always "Microsoft.SignalRService/SignalR". * * @return the type value */ @@ -36,7 +36,7 @@ public String type() { } /** - * Set the type value. + * Set the resource type. Should be always "Microsoft.SignalRService/SignalR". * * @param type the type value to set * @return the NameAvailabilityParameters object itself. @@ -47,7 +47,7 @@ public NameAvailabilityParameters withType(String type) { } /** - * Get the name value. + * Get the SignalR service name to validate. e.g."my-signalR-name-here". * * @return the name value */ @@ -56,7 +56,7 @@ public String name() { } /** - * Set the name value. + * Set the SignalR service name to validate. e.g."my-signalR-name-here". * * @param name the name value to set * @return the NameAvailabilityParameters object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java index ee5957d39884..68347f022958 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.OperationInner; /** * Type representing Operation. */ -public interface Operation extends HasInner, HasManager { +public interface Operation extends HasInner, HasManager { /** * @return the display value. */ diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java index 7216433b17ee..d8bc471cdd84 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/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 resource value. + * Get resource type on which the operation is performed. * * @return the resource value */ @@ -68,7 +68,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. @@ -79,7 +79,7 @@ public OperationDisplay withResource(String resource) { } /** - * Get the operation value. + * Get the localized friendly name for the operation. * * @return the operation value */ @@ -88,7 +88,7 @@ public String operation() { } /** - * Set the operation value. + * Set the localized friendly name for the operation. * * @param operation the operation value to set * @return the OperationDisplay object itself. @@ -99,7 +99,7 @@ public OperationDisplay withOperation(String operation) { } /** - * Get the description value. + * Get the localized friendly description for the operation. * * @return the description value */ @@ -108,7 +108,7 @@ public String description() { } /** - * Set the description value. + * Set the localized friendly description for the operation. * * @param description the description value to set * @return the OperationDisplay object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java index d039682e8d11..b2f056716f06 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java @@ -21,7 +21,7 @@ public class OperationProperties { private ServiceSpecification serviceSpecification; /** - * Get the serviceSpecification value. + * Get the service specifications. * * @return the serviceSpecification value */ @@ -30,7 +30,7 @@ public ServiceSpecification serviceSpecification() { } /** - * Set the serviceSpecification value. + * Set the service specifications. * * @param serviceSpecification the serviceSpecification value to set * @return the OperationProperties object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java index 660fc6f82183..79b70891c330 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java @@ -23,7 +23,7 @@ public class RegenerateKeyParameters { private KeyType keyType; /** - * Get the keyType value. + * Get the keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary'. * * @return the keyType value */ @@ -32,7 +32,7 @@ public KeyType keyType() { } /** - * Set the keyType value. + * Set the keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary'. * * @param keyType the keyType value to set * @return the RegenerateKeyParameters object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java index 3ca7c7da34a0..d5366601b2f0 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java @@ -22,8 +22,9 @@ public class ResourceSku { private String name; /** - * The tier of this particular SKU. Optional. Possible values include: - * 'Free', 'Basic', 'Premium'. + * Optional tier of this particular SKU. `Basic` is deprecated, use + * `Standard` instead for Basic tier. Possible values include: 'Free', + * 'Basic', 'Standard', 'Premium'. */ @JsonProperty(value = "tier") private SignalRSkuTier tier; @@ -51,7 +52,7 @@ public class ResourceSku { private Integer capacity; /** - * Get the name value. + * Get the name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified). * * @return the name value */ @@ -60,7 +61,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified). * * @param name the name value to set * @return the ResourceSku object itself. @@ -71,7 +72,7 @@ public ResourceSku withName(String name) { } /** - * Get the tier value. + * Get optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead for Basic tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. * * @return the tier value */ @@ -80,7 +81,7 @@ public SignalRSkuTier tier() { } /** - * Set the tier value. + * Set optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead for Basic tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. * * @param tier the tier value to set * @return the ResourceSku object itself. @@ -91,7 +92,7 @@ public ResourceSku withTier(SignalRSkuTier tier) { } /** - * Get the size value. + * Get optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. * * @return the size value */ @@ -100,7 +101,7 @@ public String size() { } /** - * Set the size value. + * Set optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. * * @param size the size value to set * @return the ResourceSku object itself. @@ -111,7 +112,7 @@ public ResourceSku withSize(String size) { } /** - * Get the family value. + * Get optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here. * * @return the family value */ @@ -120,7 +121,7 @@ public String family() { } /** - * Set the family value. + * Set optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here. * * @param family the family value to set * @return the ResourceSku object itself. @@ -131,7 +132,8 @@ public ResourceSku withFamily(String family) { } /** - * Get the capacity value. + * Get optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not + possible for the resource this may be omitted. * * @return the capacity value */ @@ -140,7 +142,8 @@ public Integer capacity() { } /** - * Set the capacity value. + * Set optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not + possible for the resource this may be omitted. * * @param capacity the capacity value to set * @return the ResourceSku object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java index afce688433e4..d451a3bc4e4f 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java @@ -22,7 +22,7 @@ public class ServiceSpecification { private List metricSpecifications; /** - * Get the metricSpecifications value. + * Get specifications of the Metrics for Azure Monitoring. * * @return the metricSpecifications value */ @@ -31,7 +31,7 @@ public List metricSpecifications() { } /** - * Set the metricSpecifications value. + * Set specifications of the Metrics for Azure Monitoring. * * @param metricSpecifications the metricSpecifications value to set * @return the ServiceSpecification object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java index 91c8b23f9190..1f525bc71c8d 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java @@ -23,7 +23,8 @@ public class SignalRCreateOrUpdateProperties { private String hostNamePrefix; /** - * Get the hostNamePrefix value. + * Get prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. * * @return the hostNamePrefix value */ @@ -32,7 +33,8 @@ public String hostNamePrefix() { } /** - * Set the hostNamePrefix value. + * Set prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. * * @param hostNamePrefix the hostNamePrefix value to set * @return the SignalRCreateOrUpdateProperties object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java index 2113043de0ec..28ceeae121e7 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java @@ -26,7 +26,8 @@ public class SignalRCreateParameters extends SignalRUpdateParameters { private String location; /** - * Get the location value. + * Get azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. * * @return the location value */ @@ -35,7 +36,8 @@ public String location() { } /** - * Set the location value. + * Set azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. * * @param location the location value to set * @return the SignalRCreateParameters object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java index 422ff2ace763..8aa8423a6322 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java @@ -10,18 +10,28 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRKeysInner; /** * Type representing SignalRKeys. */ -public interface SignalRKeys extends HasInner, HasManager { +public interface SignalRKeys extends HasInner, HasManager { + /** + * @return the primaryConnectionString value. + */ + String primaryConnectionString(); + /** * @return the primaryKey value. */ String primaryKey(); + /** + * @return the secondaryConnectionString value. + */ + String secondaryConnectionString(); + /** * @return the secondaryKey value. */ diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java index 625c393925b3..4bd232b282fb 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java @@ -9,21 +9,15 @@ package com.microsoft.azure.management.signalr.v2018_03_01_preview; 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.signalr.v2018_03_01_preview.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRResourceInner; +import java.util.Map; /** * Type representing SignalRResource. */ -public interface SignalRResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { +public interface SignalRResource extends HasInner, HasManager { /** * @return the externalIP value. */ @@ -39,6 +33,21 @@ public interface SignalRResource extends HasInner, Resourc */ String hostNamePrefix(); + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + /** * @return the provisioningState value. */ @@ -60,84 +69,18 @@ public interface SignalRResource extends HasInner, Resourc ResourceSku sku(); /** - * The entirety of the SignalRResource definition. + * @return the tags value. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { - } + Map tags(); /** - * Grouping of SignalRResource definition stages. + * @return the type value. */ - interface DefinitionStages { - /** - * The first stage of a SignalRResource definition. - */ - interface Blank extends GroupableResourceCore.DefinitionWithRegion { - } - - /** - * The stage of the SignalRResource definition allowing to specify the resource group. - */ - interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { - } - - /** - * The stage of the signalrresource update allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - */ - WithCreate withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource update allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - */ - WithCreate withSku(ResourceSku sku); - } - - /** - * 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.WithProperties, DefinitionStages.WithSku { - } - } - /** - * The template for a SignalRResource update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProperties, UpdateStages.WithSku { - } + String type(); /** - * Grouping of SignalRResource update stages. + * @return the version value. */ - interface UpdateStages { - /** - * The stage of the signalrresource {0} allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - */ - Update withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource {0} allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - */ - Update withSku(ResourceSku sku); - } - - } + String version(); + } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java index 48bf4df812b8..daeee71e38a9 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java @@ -22,6 +22,9 @@ public final class SignalRSkuTier extends ExpandableStringEnum { /** Static value Basic for SignalRSkuTier. */ public static final SignalRSkuTier BASIC = fromString("Basic"); + /** Static value Standard for SignalRSkuTier. */ + public static final SignalRSkuTier STANDARD = fromString("Standard"); + /** Static value Premium for SignalRSkuTier. */ public static final SignalRSkuTier PREMIUM = fromString("Premium"); diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java index e0b6b95078ea..85feb498a99d 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java @@ -34,7 +34,7 @@ public class SignalRUpdateParameters { private SignalRCreateOrUpdateProperties properties; /** - * Get the tags value. + * Get a list of key value pairs that describe the resource. * * @return the tags value */ @@ -43,7 +43,7 @@ public Map tags() { } /** - * Set the tags value. + * Set a list of key value pairs that describe the resource. * * @param tags the tags value to set * @return the SignalRUpdateParameters object itself. @@ -54,7 +54,7 @@ public SignalRUpdateParameters withTags(Map tags) { } /** - * Get the sku value. + * Get the billing information of the resource.(e.g. basic vs. standard). * * @return the sku value */ @@ -63,7 +63,7 @@ public ResourceSku sku() { } /** - * Set the sku value. + * Set the billing information of the resource.(e.g. basic vs. standard). * * @param sku the sku value to set * @return the SignalRUpdateParameters object itself. @@ -74,7 +74,7 @@ public SignalRUpdateParameters withSku(ResourceSku sku) { } /** - * Get the properties value. + * Get settings used to provision or configure the resource. * * @return the properties value */ @@ -83,7 +83,7 @@ public SignalRCreateOrUpdateProperties properties() { } /** - * Set the properties value. + * Set settings used to provision or configure the resource. * * @param properties the properties value to set * @return the SignalRUpdateParameters object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java new file mode 100644 index 000000000000..154f1c2d752c --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java @@ -0,0 +1,45 @@ +/** + * 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.signalr.v2018_03_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRUsageInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRServiceManager; + +/** + * Type representing SignalRUsage. + */ +public interface SignalRUsage extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Long currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Long limit(); + + /** + * @return the name value. + */ + SignalRUsageName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java new file mode 100644 index 000000000000..5cae29591680 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java @@ -0,0 +1,69 @@ +/** + * 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.signalr.v2018_03_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localizable String object containing the name and a localized value. + */ +public class SignalRUsageName { + /** + * The identifier of the usage. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Localized name of the usage. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get the identifier of the usage. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the identifier of the usage. + * + * @param value the value value to set + * @return the SignalRUsageName object itself. + */ + public SignalRUsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get localized name of the usage. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set localized name of the usage. + * + * @param localizedValue the localizedValue value to set + * @return the SignalRUsageName object itself. + */ + public SignalRUsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java index 284c920f38f0..aa3e089caa67 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java @@ -8,20 +8,22 @@ package com.microsoft.azure.management.signalr.v2018_03_01_preview; -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 com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.SignalRsInner; -import com.microsoft.azure.arm.model.HasInner; +import rx.Completable; /** * Type representing SignalRs. */ -public interface SignalRs extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +public interface SignalRs { + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location); + /** * Get the access keys of the SignalR resource. * @@ -43,12 +45,60 @@ public interface SignalRs extends SupportsCreating regenerateKeyAsync(String resourceGroupName, String resourceName); /** - * Checks that the SignalR name is valid and is not already in use. + * Get the SignalR service and its properties. * - * @param location the region + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable checkNameAvailabilityAsync(String location); + Observable getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateAsync(String resourceGroupName, String resourceName); + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName); + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String resourceGroupName, String resourceName); + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName); } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java new file mode 100644 index 000000000000..c384d2a61153 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java @@ -0,0 +1,28 @@ +/** + * 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.signalr.v2018_03_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java index f5fe5b08bbb1..c045d29e9693 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java @@ -12,14 +12,14 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; class NameAvailabilityImpl extends WrapperImpl implements NameAvailability { - private final SignalRManager manager; - NameAvailabilityImpl(NameAvailabilityInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + NameAvailabilityImpl(NameAvailabilityInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java index f248ec901cf0..568816e1a0e8 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java @@ -34,7 +34,7 @@ public class NameAvailabilityInner { private String message; /** - * Get the nameAvailable value. + * Get indicates whether the name is available or not. * * @return the nameAvailable value */ @@ -43,7 +43,7 @@ public Boolean nameAvailable() { } /** - * Set the nameAvailable value. + * Set indicates whether the name is available or not. * * @param nameAvailable the nameAvailable value to set * @return the NameAvailabilityInner object itself. @@ -54,7 +54,7 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { } /** - * Get the reason value. + * Get the reason of the availability. Required if name is not available. * * @return the reason value */ @@ -63,7 +63,7 @@ public String reason() { } /** - * Set the reason value. + * Set the reason of the availability. Required if name is not available. * * @param reason the reason value to set * @return the NameAvailabilityInner object itself. @@ -74,7 +74,7 @@ public NameAvailabilityInner withReason(String reason) { } /** - * Get the message value. + * Get the message of the operation. * * @return the message value */ @@ -83,7 +83,7 @@ public String message() { } /** - * Set the message value. + * Set the message of the operation. * * @param message the message value to set * @return the NameAvailabilityInner object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java index bf9786d35abe..01fcf5eae08c 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java @@ -14,14 +14,14 @@ import com.microsoft.azure.management.signalr.v2018_03_01_preview.OperationProperties; class OperationImpl extends WrapperImpl implements Operation { - private final SignalRManager manager; - OperationImpl(OperationInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + OperationImpl(OperationInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java index 62802ec67815..47f92a20adb0 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java @@ -42,7 +42,7 @@ public class OperationInner { private OperationProperties properties; /** - * Get the name value. + * Get name of the operation with format: {provider}/{resource}/{operation}. * * @return the name value */ @@ -51,7 +51,7 @@ public String name() { } /** - * Set the name value. + * Set name of the operation with format: {provider}/{resource}/{operation}. * * @param name the name value to set * @return the OperationInner object itself. @@ -62,7 +62,7 @@ public OperationInner withName(String name) { } /** - * Get the display value. + * Get the object that describes the operation. * * @return the display value */ @@ -71,7 +71,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. @@ -82,7 +82,7 @@ public OperationInner withDisplay(OperationDisplay display) { } /** - * Get the origin value. + * Get optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. * * @return the origin value */ @@ -91,7 +91,7 @@ public String origin() { } /** - * Set the origin value. + * Set optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. * * @param origin the origin value to set * @return the OperationInner object itself. @@ -102,7 +102,7 @@ public OperationInner withOrigin(String origin) { } /** - * Get the properties value. + * Get extra properties for the operation. * * @return the properties value */ @@ -111,7 +111,7 @@ public OperationProperties properties() { } /** - * Set the properties value. + * Set extra properties for the operation. * * @param properties the properties value to set * @return the OperationInner object itself. diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java index 2f6950660935..ea8399a692b2 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java @@ -17,52 +17,33 @@ import com.microsoft.azure.management.signalr.v2018_03_01_preview.Operation; class OperationsImpl extends WrapperImpl implements Operations { - private final SignalRManager manager; + private final SignalRServiceManager manager; - OperationsImpl(SignalRManager manager) { + OperationsImpl(SignalRServiceManager manager) { super(manager.inner().operations()); this.manager = manager; } - public SignalRManager manager() { + public SignalRServiceManager 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/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java index 9ac6081a8ad9..36e638949a6f 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java @@ -12,22 +12,32 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; class SignalRKeysImpl extends WrapperImpl implements SignalRKeys { - private final SignalRManager manager; - SignalRKeysImpl(SignalRKeysInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + SignalRKeysImpl(SignalRKeysInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + @Override public String primaryKey() { return this.inner().primaryKey(); } + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } + @Override public String secondaryKey() { return this.inner().secondaryKey(); diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java index 191027b015ba..c8a0dce771ee 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java @@ -27,7 +27,19 @@ public class SignalRKeysInner { private String secondaryKey; /** - * Get the primaryKey value. + * SignalR connection string constructed via the primaryKey. + */ + @JsonProperty(value = "primaryConnectionString") + private String primaryConnectionString; + + /** + * SignalR connection string constructed via the secondaryKey. + */ + @JsonProperty(value = "secondaryConnectionString") + private String secondaryConnectionString; + + /** + * Get the primary access key. * * @return the primaryKey value */ @@ -36,7 +48,7 @@ public String primaryKey() { } /** - * Set the primaryKey value. + * Set the primary access key. * * @param primaryKey the primaryKey value to set * @return the SignalRKeysInner object itself. @@ -47,7 +59,7 @@ public SignalRKeysInner withPrimaryKey(String primaryKey) { } /** - * Get the secondaryKey value. + * Get the secondary access key. * * @return the secondaryKey value */ @@ -56,7 +68,7 @@ public String secondaryKey() { } /** - * Set the secondaryKey value. + * Set the secondary access key. * * @param secondaryKey the secondaryKey value to set * @return the SignalRKeysInner object itself. @@ -66,4 +78,44 @@ public SignalRKeysInner withSecondaryKey(String secondaryKey) { return this; } + /** + * Get signalR connection string constructed via the primaryKey. + * + * @return the primaryConnectionString value + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Set signalR connection string constructed via the primaryKey. + * + * @param primaryConnectionString the primaryConnectionString value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withPrimaryConnectionString(String primaryConnectionString) { + this.primaryConnectionString = primaryConnectionString; + return this; + } + + /** + * Get signalR connection string constructed via the secondaryKey. + * + * @return the secondaryConnectionString value + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Set signalR connection string constructed via the secondaryKey. + * + * @param secondaryConnectionString the secondaryConnectionString value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withSecondaryConnectionString(String secondaryConnectionString) { + this.secondaryConnectionString = secondaryConnectionString; + return this; + } + } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java index 6b2f40e33c10..fa0ac0201378 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java @@ -63,11 +63,11 @@ public SignalRManagementClientImpl withSubscriptionId(String subscriptionId) { return this; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +76,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +86,11 @@ public SignalRManagementClientImpl withAcceptLanguage(String acceptLanguage) { return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** 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. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +109,11 @@ public SignalRManagementClientImpl withLongRunningOperationRetryTimeout(int long return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** Whether a unique x-ms-client-request-id should be generated. 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. + * Gets Whether a unique x-ms-client-request-id should be generated. 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. */ @@ -122,7 +122,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Sets Whether a unique x-ms-client-request-id should be generated. 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 @@ -158,6 +158,19 @@ public SignalRsInner signalRs() { return this.signalRs; } + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + /** * Initializes an instance of SignalRManagementClient client. * @@ -195,6 +208,7 @@ protected void initialize() { this.generateClientRequestId = true; this.operations = new OperationsInner(restClient().retrofit(), this); this.signalRs = new SignalRsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } @@ -205,6 +219,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "SignalRManagementClient", "2018-03-01-preview"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "SignalRManagementClient", "2018-03-01-preview"); } } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java index 8fb6105d6933..3eb2d322b47f 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java @@ -8,84 +8,52 @@ package com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation; -import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRResource; -import rx.Observable; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRUpdateParameters; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRCreateParameters; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.signalr.v2018_03_01_preview.ProvisioningState; import com.microsoft.azure.management.signalr.v2018_03_01_preview.ResourceSku; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRCreateOrUpdateProperties; -import rx.functions.Func1; - -class SignalRResourceImpl extends GroupableResourceCoreImpl implements SignalRResource, SignalRResource.Definition, SignalRResource.Update { - private SignalRCreateParameters createParameter; - private SignalRUpdateParameters updateParameter; - SignalRResourceImpl(String name, SignalRResourceInner inner, SignalRManager manager) { - super(name, inner, manager); - this.createParameter = new SignalRCreateParameters(); - this.updateParameter = new SignalRUpdateParameters(); - } +import java.util.Map; - @Override - public Observable createResourceAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - this.createParameter.withLocation(inner().location()); - this.createParameter.withTags(inner().getTags()); - return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.createParameter) - .map(new Func1() { - @Override - public SignalRResourceInner call(SignalRResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); +class SignalRResourceImpl extends WrapperImpl implements SignalRResource { + private final SignalRServiceManager manager; + SignalRResourceImpl(SignalRResourceInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; } @Override - public Observable updateResourceAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) - .map(new Func1() { - @Override - public SignalRResourceInner call(SignalRResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); + public SignalRServiceManager manager() { + return this.manager; } @Override - protected Observable getInnerAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + public String externalIP() { + return this.inner().externalIP(); } @Override - public boolean isInCreateMode() { - return this.inner().id() == null; + public String hostName() { + return this.inner().hostName(); } - private void resetCreateUpdateParameters() { - this.createParameter = new SignalRCreateParameters(); - this.updateParameter = new SignalRUpdateParameters(); + @Override + public String hostNamePrefix() { + return this.inner().hostNamePrefix(); } @Override - public String externalIP() { - return this.inner().externalIP(); + public String id() { + return this.inner().id(); } @Override - public String hostName() { - return this.inner().hostName(); + public String location() { + return this.inner().location(); } @Override - public String hostNamePrefix() { - return this.inner().hostNamePrefix(); + public String name() { + return this.inner().name(); } @Override @@ -109,23 +77,18 @@ public ResourceSku sku() { } @Override - public SignalRResourceImpl withProperties(SignalRCreateOrUpdateProperties properties) { - if (isInCreateMode()) { - this.createParameter.withProperties(properties); - } else { - this.updateParameter.withProperties(properties); - } - return this; + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); } @Override - public SignalRResourceImpl withSku(ResourceSku sku) { - if (isInCreateMode()) { - this.createParameter.withSku(sku); - } else { - this.updateParameter.withSku(sku); - } - return this; + public String version() { + return this.inner().version(); } } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java index 7341491a4acf..88e046ba69ba 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java @@ -70,7 +70,14 @@ public class SignalRResourceInner extends Resource { private Integer serverPort; /** - * Get the sku value. + * Version of the SignalR resource. Probably you need the same or higher + * version of client SDKs. + */ + @JsonProperty(value = "properties.version") + private String version; + + /** + * Get sKU of the service. * * @return the sku value */ @@ -79,7 +86,7 @@ public ResourceSku sku() { } /** - * Set the sku value. + * Set sKU of the service. * * @param sku the sku value to set * @return the SignalRResourceInner object itself. @@ -90,7 +97,8 @@ public SignalRResourceInner withSku(ResourceSku sku) { } /** - * Get the hostNamePrefix value. + * Get prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. * * @return the hostNamePrefix value */ @@ -99,7 +107,8 @@ public String hostNamePrefix() { } /** - * Set the hostNamePrefix value. + * Set prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. * * @param hostNamePrefix the hostNamePrefix value to set * @return the SignalRResourceInner object itself. @@ -110,7 +119,7 @@ public SignalRResourceInner withHostNamePrefix(String hostNamePrefix) { } /** - * Get the provisioningState value. + * Get provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'. * * @return the provisioningState value */ @@ -119,7 +128,7 @@ public ProvisioningState provisioningState() { } /** - * Get the externalIP value. + * Get the publicly accessible IP of the SignalR service. * * @return the externalIP value */ @@ -128,7 +137,7 @@ public String externalIP() { } /** - * Get the hostName value. + * Get fQDN of the SignalR service instance. Format: xxx.service.signalr.net. * * @return the hostName value */ @@ -137,7 +146,7 @@ public String hostName() { } /** - * Get the publicPort value. + * Get the publicly accessibly port of the SignalR service which is designed for browser/client side usage. * * @return the publicPort value */ @@ -146,7 +155,7 @@ public Integer publicPort() { } /** - * Get the serverPort value. + * Get the publicly accessibly port of the SignalR service which is designed for customer server side usage. * * @return the serverPort value */ @@ -154,4 +163,24 @@ public Integer serverPort() { return this.serverPort; } + /** + * Get version of the SignalR resource. Probably you need the same or higher version of client SDKs. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set version of the SignalR resource. Probably you need the same or higher version of client SDKs. + * + * @param version the version value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withVersion(String version) { + this.version = version; + return this; + } + } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java new file mode 100644 index 000000000000..e3b7dc91c301 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java @@ -0,0 +1,123 @@ +/** + * 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.signalr.v2018_03_01_preview.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.signalr.v2018_03_01_preview.Operations; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRs; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.Usages; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure SignalRService resource management. + */ +public final class SignalRServiceManager extends ManagerCore { + private Operations operations; + private SignalRs signalRs; + private Usages usages; + /** + * Get a Configurable instance that can be used to create SignalRServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new SignalRServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new SignalRServiceManager(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 SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(RestClient restClient, String subscriptionId) { + return new SignalRServiceManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing SignalRService management API entry points that work across subscriptions + */ + SignalRServiceManager 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 SignalRs. + */ + public SignalRs signalRs() { + if (this.signalRs == null) { + this.signalRs = new SignalRsImpl(this); + } + return this.signalRs; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return SignalRServiceManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private SignalRServiceManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new SignalRManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java new file mode 100644 index 000000000000..f81bcd2d9eb3 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java @@ -0,0 +1,56 @@ +/** + * 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.signalr.v2018_03_01_preview.implementation; + +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRUsage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRUsageName; + +class SignalRUsageImpl extends WrapperImpl implements SignalRUsage { + private final SignalRServiceManager manager; + + SignalRUsageImpl(SignalRUsageInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + + + @Override + public Long currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long limit() { + return this.inner().limit(); + } + + @Override + public SignalRUsageName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java new file mode 100644 index 000000000000..5e736bc884e9 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java @@ -0,0 +1,150 @@ +/** + * 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.signalr.v2018_03_01_preview.implementation; + +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRUsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object that describes a specific usage of SignalR resources. + */ +public class SignalRUsageInner { + /** + * Fully qualified ARM resource id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Current value for the usage quota. + */ + @JsonProperty(value = "currentValue") + private Long currentValue; + + /** + * The maximum permitted value for the usage quota. If there is no limit, + * this value will be -1. + */ + @JsonProperty(value = "limit") + private Long limit; + + /** + * Localizable String object containing the name and a localized value. + */ + @JsonProperty(value = "name") + private SignalRUsageName name; + + /** + * Representing the units of the usage quota. Possible values are: Count, + * Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get fully qualified ARM resource id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set fully qualified ARM resource id. + * + * @param id the id value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get current value for the usage quota. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Set current value for the usage quota. + * + * @param currentValue the currentValue value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withCurrentValue(Long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the maximum permitted value for the usage quota. If there is no limit, this value will be -1. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Set the maximum permitted value for the usage quota. If there is no limit, this value will be -1. + * + * @param limit the limit value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Get localizable String object containing the name and a localized value. + * + * @return the name value + */ + public SignalRUsageName name() { + return this.name; + } + + /** + * Set localizable String object containing the name and a localized value. + * + * @param name the name value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withName(SignalRUsageName name) { + this.name = name; + return this; + } + + /** + * Get representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + * + * @param unit the unit value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java index 632e8ca79cdb..3712cc6ff105 100644 --- a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java @@ -4,209 +4,143 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * def + * abc */ package com.microsoft.azure.management.signalr.v2018_03_01_preview.implementation; -import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRs; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRResource; +import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRKeys; 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.signalr.v2018_03_01_preview.SignalRKeys; -import com.microsoft.azure.management.signalr.v2018_03_01_preview.NameAvailability; - -class SignalRsImpl extends GroupableResourcesCoreImpl implements SignalRs { - protected SignalRsImpl(SignalRManager manager) { - super(manager.inner().signalRs(), manager); - } - - @Override - protected Observable getInnerAsync(String resourceGroupName, String name) { - SignalRsInner client = this.inner(); - return client.getByResourceGroupAsync(resourceGroupName, name); - } +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRResource; - @Override - protected Completable deleteInnerAsync(String resourceGroupName, String name) { - SignalRsInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name).toCompletable(); - } +class SignalRsImpl extends WrapperImpl implements SignalRs { + private final SignalRServiceManager manager; - @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); + SignalRsImpl(SignalRServiceManager manager) { + super(manager.inner().signalRs()); + this.manager = manager; } - @Override - public Observable deleteByIdsAsync(String...ids) { - return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + public SignalRServiceManager manager() { + return this.manager; } @Override - public void deleteByIds(Collection ids) { - if (ids != null && !ids.isEmpty()) { - this.deleteByIdsAsync(ids).toBlocking().last(); - } + public Observable checkNameAvailabilityAsync(String location) { + SignalRsInner client = this.inner(); + return client.checkNameAvailabilityAsync(location) + .map(new Func1() { + @Override + public NameAvailability call(NameAvailabilityInner inner) { + return new NameAvailabilityImpl(inner, manager()); + } + }); } @Override - public void deleteByIds(String...ids) { - this.deleteByIds(new ArrayList(Arrays.asList(ids))); + public Observable listKeysAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } @Override - public PagedList listByResourceGroup(String resourceGroupName) { + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.listByResourceGroup(resourceGroupName)); + return client.regenerateKeyAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } - private Observable> listByResourceGroupNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return client.listByResourceGroupNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { + return client.getByResourceGroupAsync(resourceGroupName, resourceName) + .map(new Func1() { @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listByResourceGroupNextInnerPageAsync(page.nextPageLink())); + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); } }); } + @Override - public Observable listByResourceGroupAsync(String resourceGroupName) { + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName) { SignalRsInner 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(); - } - }) + return client.createOrUpdateAsync(resourceGroupName, resourceName) .map(new Func1() { @Override public SignalRResource call(SignalRResourceInner inner) { - return wrapModel(inner); + return new SignalRResourceImpl(inner, manager()); } - }); + }); } @Override - public PagedList list() { + public Completable deleteAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.list()); + return client.deleteAsync(resourceGroupName, resourceName).toCompletable(); } - private Observable> listNextInnerPageAsync(String nextLink) { - if (nextLink == null) { - Observable.empty(); - } + @Override + public Observable updateAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return client.listNextAsync(nextLink) - .flatMap(new Func1, Observable>>() { + return client.updateAsync(resourceGroupName, resourceName) + .map(new Func1() { @Override - public Observable> call(Page page) { - return Observable.just(page).concatWith(listNextInnerPageAsync(page.nextPageLink())); + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); } }); } + @Override public Observable listAsync() { SignalRsInner 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 SignalRResource call(SignalRResourceInner inner) { - return wrapModel(inner); - } - }); - } - - @Override - public SignalRResourceImpl define(String name) { - return wrapModel(name); - } - - @Override - public Observable listKeysAsync(String resourceGroupName, String resourceName) { - SignalRsInner client = this.inner(); - return client.listKeysAsync(resourceGroupName, resourceName) - .map(new Func1() { - @Override - public SignalRKeys call(SignalRKeysInner inner) { - return new SignalRKeysImpl(inner, manager()); + return new SignalRResourceImpl(inner, manager()); } }); } @Override - public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { + public Observable listByResourceGroupAsync(final String resourceGroupName) { SignalRsInner client = this.inner(); - return client.regenerateKeyAsync(resourceGroupName, resourceName) - .map(new Func1() { + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { @Override - public SignalRKeys call(SignalRKeysInner inner) { - return new SignalRKeysImpl(inner, manager()); + public Iterable call(Page page) { + return page.items(); } - }); - } - - @Override - protected SignalRResourceImpl wrapModel(SignalRResourceInner inner) { - return new SignalRResourceImpl(inner.name(), inner, manager()); - } - - @Override - protected SignalRResourceImpl wrapModel(String name) { - return new SignalRResourceImpl(name, new SignalRResourceInner(), this.manager()); - } - - @Override - public Observable checkNameAvailabilityAsync(String location) { - SignalRsInner client = this.inner(); - return client.checkNameAvailabilityAsync(location) - .map(new Func1() { + }) + .map(new Func1() { @Override - public NameAvailability call(NameAvailabilityInner inner) { - return new NameAvailabilityImpl(inner, manager()); + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); } }); } diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java new file mode 100644 index 000000000000..a21bdc78f890 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * 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.signalr.v2018_03_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.signalr.v2018_03_01_preview.SignalRUsage; + +class UsagesImpl extends WrapperImpl implements Usages { + private final SignalRServiceManager manager; + + UsagesImpl(SignalRServiceManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + private SignalRUsageImpl wrapModel(SignalRUsageInner inner) { + return new SignalRUsageImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SignalRUsage call(SignalRUsageInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java new file mode 100644 index 000000000000..6a1381ccc326 --- /dev/null +++ b/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java @@ -0,0 +1,292 @@ +/** + * 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.signalr.v2018_03_01_preview.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.Path; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private SignalRManagementClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, SignalRManagementClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_03_01_preview.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages") + Observable> list(@Path("location") String location, @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.signalr.v2018_03_01_preview.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @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<SignalRUsageInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRUsageInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRUsageInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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)); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + ServiceResponse> * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRUsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + return service.list(location, 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); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> 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(); + } + }; + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> 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)); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRUsageInner> 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/signalr/resource-manager/v2018_10_01/pom.xml b/signalr/resource-manager/v2018_10_01/pom.xml new file mode 100644 index 000000000000..58fc695ee719 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + com.microsoft.azure.signalr.v2018_10_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-signalrservice + 1.0.0-beta + jar + Microsoft Azure SDK for SignalRService Management + This package contains Microsoft SignalRService Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Dimension.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Dimension.java new file mode 100644 index 000000000000..738629168dc7 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Dimension.java @@ -0,0 +1,122 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Dimension of metrics. + */ +public class Dimension { + /** + * The public facing name of the dimension. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the dimension. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Name of the dimension as it appears in MDM. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /** + * A Boolean flag indicating whether this dimension should be included for + * the shoebox export scenario. + */ + @JsonProperty(value = "toBeExportedForShoebox") + private Boolean toBeExportedForShoebox; + + /** + * Get the public facing name of the dimension. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the public facing name of the dimension. + * + * @param name the name value to set + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the dimension. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the dimension. + * + * @param displayName the displayName value to set + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get name of the dimension as it appears in MDM. + * + * @return the internalName value + */ + public String internalName() { + return this.internalName; + } + + /** + * Set name of the dimension as it appears in MDM. + * + * @param internalName the internalName value to set + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + + /** + * Get a Boolean flag indicating whether this dimension should be included for the shoebox export scenario. + * + * @return the toBeExportedForShoebox value + */ + public Boolean toBeExportedForShoebox() { + return this.toBeExportedForShoebox; + } + + /** + * Set a Boolean flag indicating whether this dimension should be included for the shoebox export scenario. + * + * @param toBeExportedForShoebox the toBeExportedForShoebox value to set + * @return the Dimension object itself. + */ + public Dimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { + this.toBeExportedForShoebox = toBeExportedForShoebox; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/KeyType.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/KeyType.java new file mode 100644 index 000000000000..c777183b2036 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/KeyType.java @@ -0,0 +1,41 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for KeyType. + */ +public final class KeyType extends ExpandableStringEnum { + /** Static value Primary for KeyType. */ + public static final KeyType PRIMARY = fromString("Primary"); + + /** Static value Secondary for KeyType. */ + public static final KeyType SECONDARY = fromString("Secondary"); + + /** + * Creates or finds a KeyType from its string representation. + * @param name a name to look for + * @return the corresponding KeyType + */ + @JsonCreator + public static KeyType fromString(String name) { + return fromString(name, KeyType.class); + } + + /** + * @return known KeyType values + */ + public static Collection values() { + return values(KeyType.class); + } +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/MetricSpecification.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/MetricSpecification.java new file mode 100644 index 000000000000..2dbdc5777158 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/MetricSpecification.java @@ -0,0 +1,237 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Metrics for Azure Monitoring. + */ +public class MetricSpecification { + /** + * Name of the metric. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Localized friendly description of the metric. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /** + * The unit that makes sense for the metric. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Only provide one value for this field. Valid values: Average, Minimum, + * Maximum, Total, Count. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /** + * Optional. If set to true, then zero will be returned for time duration + * where no metric is emitted/published. + * Ex. a metric that returns the number of times a particular error code + * was emitted. The error code may not appear + * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for + * time periods where nothing was emitted. + */ + @JsonProperty(value = "fillGapWithZero") + private String fillGapWithZero; + + /** + * The name of the metric category that the metric belongs to. A metric can + * only belong to a single category. + */ + @JsonProperty(value = "category") + private String category; + + /** + * The dimensions of the metrics. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Get name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the metric. + * + * @param name the name value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the metric. + * + * @param displayName the displayName value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get localized friendly description of the metric. + * + * @return the displayDescription value + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set localized friendly description of the metric. + * + * @param displayDescription the displayDescription value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get the unit that makes sense for the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit that makes sense for the metric. + * + * @param unit the unit value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @return the aggregationType value + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + * + * @param aggregationType the aggregationType value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. + * + * @return the fillGapWithZero value + */ + public String fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. + * + * @param fillGapWithZero the fillGapWithZero value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(String fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get the name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the name of the metric category that the metric belongs to. A metric can only belong to a single category. + * + * @param category the category value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the dimensions of the metrics. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set the dimensions of the metrics. + * + * @param dimensions the dimensions value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java new file mode 100644 index 000000000000..d63103b27011 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java @@ -0,0 +1,35 @@ +/** + * 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.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.NameAvailabilityInner; + +/** + * Type representing NameAvailability. + */ +public interface NameAvailability extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * @return the reason value. + */ + String reason(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailabilityParameters.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailabilityParameters.java new file mode 100644 index 000000000000..6d0d76d1f5d6 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailabilityParameters.java @@ -0,0 +1,69 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data POST-ed to the nameAvailability action. + */ +public class NameAvailabilityParameters { + /** + * The resource type. Should be always "Microsoft.SignalRService/SignalR". + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * The SignalR service name to validate. e.g."my-signalR-name-here". + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the resource type. Should be always "Microsoft.SignalRService/SignalR". + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the resource type. Should be always "Microsoft.SignalRService/SignalR". + * + * @param type the type value to set + * @return the NameAvailabilityParameters object itself. + */ + public NameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + + /** + * Get the SignalR service name to validate. e.g."my-signalR-name-here". + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the SignalR service name to validate. e.g."my-signalR-name-here". + * + * @param name the name value to set + * @return the NameAvailabilityParameters object itself. + */ + public NameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java new file mode 100644 index 000000000000..5a3a86492dee --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java @@ -0,0 +1,40 @@ +/** + * 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.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_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(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + OperationProperties properties(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationDisplay.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationDisplay.java new file mode 100644 index 000000000000..3c907bb1251a --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object that describes a operation. + */ +public class OperationDisplay { + /** + * Friendly name of the resource provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Resource type on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /** + * The localized friendly name for the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The localized friendly description for the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get friendly name of the resource provider. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set friendly name of the resource provider. + * + * @param provider the provider value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get resource type on which the operation is performed. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set resource type on which the operation is performed. + * + * @param resource the resource value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the localized friendly name for the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the localized friendly name for the operation. + * + * @param operation the operation value to set + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the localized friendly description for the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the localized friendly description for the operation. + * + * @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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationProperties.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationProperties.java new file mode 100644 index 000000000000..cf8e26d552cf --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/OperationProperties.java @@ -0,0 +1,43 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Extra Operation properties. + */ +public class OperationProperties { + /** + * The service specifications. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get the service specifications. + * + * @return the serviceSpecification value + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the service specifications. + * + * @param serviceSpecification the serviceSpecification value to set + * @return the OperationProperties object itself. + */ + public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operations.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operations.java new file mode 100644 index 000000000000..a2578ae3c1bd --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operations.java @@ -0,0 +1,27 @@ +/** + * 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.signalr.v2018_10_01; + +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_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.SignalRService provider. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ProvisioningState.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ProvisioningState.java new file mode 100644 index 000000000000..7690d6b0f0f4 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ProvisioningState.java @@ -0,0 +1,62 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Unknown for ProvisioningState. */ + public static final ProvisioningState UNKNOWN = fromString("Unknown"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Running for ProvisioningState. */ + public static final ProvisioningState RUNNING = fromString("Running"); + + /** Static value Creating for ProvisioningState. */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Moving for ProvisioningState. */ + public static final ProvisioningState MOVING = fromString("Moving"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/RegenerateKeyParameters.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/RegenerateKeyParameters.java new file mode 100644 index 000000000000..d619d17aa442 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/RegenerateKeyParameters.java @@ -0,0 +1,45 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters describes the request to regenerate access keys. + */ +public class RegenerateKeyParameters { + /** + * The keyType to regenerate. Must be either 'primary' or + * 'secondary'(case-insensitive). Possible values include: 'Primary', + * 'Secondary'. + */ + @JsonProperty(value = "keyType") + private KeyType keyType; + + /** + * Get the keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary'. + * + * @return the keyType value + */ + public KeyType keyType() { + return this.keyType; + } + + /** + * Set the keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary'. + * + * @param keyType the keyType value to set + * @return the RegenerateKeyParameters object itself. + */ + public RegenerateKeyParameters withKeyType(KeyType keyType) { + this.keyType = keyType; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java new file mode 100644 index 000000000000..ca0736a9b6f7 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java @@ -0,0 +1,156 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The billing information of the resource.(e.g. basic vs. standard). + */ +public class ResourceSku { + /** + * The name of the SKU. This is typically a letter + number code, such as + * A0 or P3. Required (if sku is specified). + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Optional tier of this particular SKU. `Basic` is deprecated, use + * `Standard` instead. Possible values include: 'Free', 'Basic', + * 'Standard', 'Premium'. + */ + @JsonProperty(value = "tier") + private SignalRSkuTier tier; + + /** + * Optional, string. When the name field is the combination of tier and + * some other value, this would be the standalone code. + */ + @JsonProperty(value = "size") + private String size; + + /** + * Optional, string. If the service has different generations of hardware, + * for the same SKU, then that can be captured here. + */ + @JsonProperty(value = "family") + private String family; + + /** + * Optional, integer. If the SKU supports scale out/in then the capacity + * integer should be included. If scale out/in is not + * possible for the resource this may be omitted. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Get the name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified). + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified). + * + * @param name the name value to set + * @return the ResourceSku object itself. + */ + public ResourceSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. + * + * @return the tier value + */ + public SignalRSkuTier tier() { + return this.tier; + } + + /** + * Set optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. + * + * @param tier the tier value to set + * @return the ResourceSku object itself. + */ + public ResourceSku withTier(SignalRSkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set optional, string. When the name field is the combination of tier and some other value, this would be the standalone code. + * + * @param size the size value to set + * @return the ResourceSku object itself. + */ + public ResourceSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here. + * + * @param family the family value to set + * @return the ResourceSku object itself. + */ + public ResourceSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not + possible for the resource this may be omitted. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not + possible for the resource this may be omitted. + * + * @param capacity the capacity value to set + * @return the ResourceSku object itself. + */ + public ResourceSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java new file mode 100644 index 000000000000..91198028db82 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java @@ -0,0 +1,44 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An object that describes a specification. + */ +public class ServiceSpecification { + /** + * Specifications of the Metrics for Azure Monitoring. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /** + * Get specifications of the Metrics for Azure Monitoring. + * + * @return the metricSpecifications value + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set specifications of the Metrics for Azure Monitoring. + * + * @param metricSpecifications the metricSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java new file mode 100644 index 000000000000..ba4ad5ecff64 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java @@ -0,0 +1,47 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings used to provision or configure the resource. + */ +public class SignalRCreateOrUpdateProperties { + /** + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: + * &lt;hostNamePrefix&gt;.service.signalr.net. + */ + @JsonProperty(value = "hostNamePrefix") + private String hostNamePrefix; + + /** + * Get prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. + * + * @return the hostNamePrefix value + */ + public String hostNamePrefix() { + return this.hostNamePrefix; + } + + /** + * Set prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. + * + * @param hostNamePrefix the hostNamePrefix value to set + * @return the SignalRCreateOrUpdateProperties object itself. + */ + public SignalRCreateOrUpdateProperties withHostNamePrefix(String hostNamePrefix) { + this.hostNamePrefix = hostNamePrefix; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java new file mode 100644 index 000000000000..e73f20492c62 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java @@ -0,0 +1,50 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for SignalR service create/update operation. + * + * Keep the same schema as AzSignalR.Models.SignalRResource. + */ +public class SignalRCreateParameters extends SignalRUpdateParameters { + /** + * Azure GEO region: e.g. West US | East US | North Central US | South + * Central US | West Europe | North Europe | East Asia | Southeast Asia | + * etc. + * The geo region of a resource never changes after it is created. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Get azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + * + * @param location the location value to set + * @return the SignalRCreateParameters object itself. + */ + public SignalRCreateParameters withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java new file mode 100644 index 000000000000..d297b5d80ec7 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java @@ -0,0 +1,40 @@ +/** + * 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.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRKeysInner; + +/** + * Type representing SignalRKeys. + */ +public interface SignalRKeys extends HasInner, HasManager { + /** + * @return the primaryConnectionString value. + */ + String primaryConnectionString(); + + /** + * @return the primaryKey value. + */ + String primaryKey(); + + /** + * @return the secondaryConnectionString value. + */ + String secondaryConnectionString(); + + /** + * @return the secondaryKey value. + */ + String secondaryKey(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java new file mode 100644 index 000000000000..0cdbd389a77d --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java @@ -0,0 +1,86 @@ +/** + * 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.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRResourceInner; +import java.util.Map; + +/** + * Type representing SignalRResource. + */ +public interface SignalRResource extends HasInner, HasManager { + /** + * @return the externalIP value. + */ + String externalIP(); + + /** + * @return the hostName value. + */ + String hostName(); + + /** + * @return the hostNamePrefix value. + */ + String hostNamePrefix(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the publicPort value. + */ + Integer publicPort(); + + /** + * @return the serverPort value. + */ + Integer serverPort(); + + /** + * @return the sku value. + */ + ResourceSku sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the version value. + */ + String version(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRSkuTier.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRSkuTier.java new file mode 100644 index 000000000000..420bd3513753 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRSkuTier.java @@ -0,0 +1,47 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SignalRSkuTier. + */ +public final class SignalRSkuTier extends ExpandableStringEnum { + /** Static value Free for SignalRSkuTier. */ + public static final SignalRSkuTier FREE = fromString("Free"); + + /** Static value Basic for SignalRSkuTier. */ + public static final SignalRSkuTier BASIC = fromString("Basic"); + + /** Static value Standard for SignalRSkuTier. */ + public static final SignalRSkuTier STANDARD = fromString("Standard"); + + /** Static value Premium for SignalRSkuTier. */ + public static final SignalRSkuTier PREMIUM = fromString("Premium"); + + /** + * Creates or finds a SignalRSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding SignalRSkuTier + */ + @JsonCreator + public static SignalRSkuTier fromString(String name) { + return fromString(name, SignalRSkuTier.class); + } + + /** + * @return known SignalRSkuTier values + */ + public static Collection values() { + return values(SignalRSkuTier.class); + } +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUpdateParameters.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUpdateParameters.java new file mode 100644 index 000000000000..e306b3c0a5dd --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUpdateParameters.java @@ -0,0 +1,96 @@ +/** + * 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.signalr.v2018_10_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for SignalR service update operation. + */ +public class SignalRUpdateParameters { + /** + * A list of key value pairs that describe the resource. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The billing information of the resource.(e.g. basic vs. standard). + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /** + * Settings used to provision or configure the resource. + */ + @JsonProperty(value = "properties") + private SignalRCreateOrUpdateProperties properties; + + /** + * Get a list of key value pairs that describe the resource. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set a list of key value pairs that describe the resource. + * + * @param tags the tags value to set + * @return the SignalRUpdateParameters object itself. + */ + public SignalRUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the billing information of the resource.(e.g. basic vs. standard). + * + * @return the sku value + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the billing information of the resource.(e.g. basic vs. standard). + * + * @param sku the sku value to set + * @return the SignalRUpdateParameters object itself. + */ + public SignalRUpdateParameters withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get settings used to provision or configure the resource. + * + * @return the properties value + */ + public SignalRCreateOrUpdateProperties properties() { + return this.properties; + } + + /** + * Set settings used to provision or configure the resource. + * + * @param properties the properties value to set + * @return the SignalRUpdateParameters object itself. + */ + public SignalRUpdateParameters withProperties(SignalRCreateOrUpdateProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java new file mode 100644 index 000000000000..06ee3c348d0d --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java @@ -0,0 +1,45 @@ +/** + * 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.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRUsageInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; + +/** + * Type representing SignalRUsage. + */ +public interface SignalRUsage extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Long currentValue(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the limit value. + */ + Long limit(); + + /** + * @return the name value. + */ + SignalRUsageName name(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsageName.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsageName.java new file mode 100644 index 000000000000..7659ee3bb581 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsageName.java @@ -0,0 +1,69 @@ +/** + * 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.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localizable String object containing the name and a localized value. + */ +public class SignalRUsageName { + /** + * The identifier of the usage. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Localized name of the usage. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get the identifier of the usage. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the identifier of the usage. + * + * @param value the value value to set + * @return the SignalRUsageName object itself. + */ + public SignalRUsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get localized name of the usage. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set localized name of the usage. + * + * @param localizedValue the localizedValue value to set + * @return the SignalRUsageName object itself. + */ + public SignalRUsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java new file mode 100644 index 000000000000..2ca10f950126 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java @@ -0,0 +1,114 @@ +/** + * 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.signalr.v2018_10_01; + +import rx.Observable; +import rx.Completable; + +/** + * Type representing SignalRs. + */ +public interface SignalRs { + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location); + + /** + * Get the access keys of the SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listKeysAsync(String resourceGroupName, String resourceName); + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regenerateKeyAsync(String resourceGroupName, String resourceName); + + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateAsync(String resourceGroupName, String resourceName); + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName); + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String resourceGroupName, String resourceName); + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restartAsync(String resourceGroupName, String resourceName); + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Usages.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Usages.java new file mode 100644 index 000000000000..b334c0390547 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Usages.java @@ -0,0 +1,28 @@ +/** + * 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.signalr.v2018_10_01; + +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.UsagesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Usages. + */ +public interface Usages extends HasInner { + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/IdParsingUtils.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/IdParsingUtils.java new file mode 100644 index 000000000000..7593095d432b --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * 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.signalr.v2018_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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java new file mode 100644 index 000000000000..8c6768c159f5 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java @@ -0,0 +1,41 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NameAvailabilityImpl extends WrapperImpl implements NameAvailability { + private final SignalRServiceManager manager; + NameAvailabilityImpl(NameAvailabilityInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public String reason() { + return this.inner().reason(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityInner.java new file mode 100644 index 000000000000..a998a34c77ef --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityInner.java @@ -0,0 +1,96 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Result of the request to check name availability. It contains a flag and + * possible reason of failure. + */ +public class NameAvailabilityInner { + /** + * Indicates whether the name is available or not. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason of the availability. Required if name is not available. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * The message of the operation. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get indicates whether the name is available or not. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set indicates whether the name is available or not. + * + * @param nameAvailable the nameAvailable value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason of the availability. Required if name is not available. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason of the availability. Required if name is not available. + * + * @param reason the reason value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the message of the operation. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message of the operation. + * + * @param message the message value to set + * @return the NameAvailabilityInner object itself. + */ + public NameAvailabilityInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java new file mode 100644 index 000000000000..b45aa8930444 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java @@ -0,0 +1,48 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.OperationDisplay; +import com.microsoft.azure.management.signalr.v2018_10_01.OperationProperties; + +class OperationImpl extends WrapperImpl implements Operation { + private final SignalRServiceManager manager; + OperationImpl(OperationInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public OperationProperties properties() { + return this.inner().properties(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java new file mode 100644 index 000000000000..5a92aa05e8f4 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java @@ -0,0 +1,124 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.OperationDisplay; +import com.microsoft.azure.management.signalr.v2018_10_01.OperationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API operation supported by SignalR resource provider. + */ +public class OperationInner { + /** + * Name of the operation with format: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The object that describes the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Optional. The intended executor of the operation; governs the display of + * the operation in the RBAC UX and the audit logs UX. + */ + @JsonProperty(value = "origin") + private String origin; + + /** + * Extra properties for the operation. + */ + @JsonProperty(value = "properties") + private OperationProperties properties; + + /** + * Get name of the operation with format: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the operation with format: {provider}/{resource}/{operation}. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the object that describes the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the object that describes the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Set optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. + * + * @param origin the origin value to set + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get extra properties for the operation. + * + * @return the properties value + */ + public OperationProperties properties() { + return this.properties; + } + + /** + * Set extra properties for the operation. + * + * @param properties the properties value to set + * @return the OperationInner object itself. + */ + public OperationInner withProperties(OperationProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java new file mode 100644 index 000000000000..64b3c156fd18 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.signalr.v2018_10_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final SignalRServiceManager manager; + + OperationsImpl(SignalRServiceManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java new file mode 100644 index 000000000000..14e1c8e375cc --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * 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.signalr.v2018_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 SignalRManagementClientImpl 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, SignalRManagementClientImpl 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.signalr.v2018_10_01.Operations list" }) + @GET("providers/Microsoft.SignalRService/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.signalr.v2018_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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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.SignalRService 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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PageImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PageImpl.java new file mode 100644 index 000000000000..0e845887c591 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * 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.signalr.v2018_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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java new file mode 100644 index 000000000000..e2d18e642289 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java @@ -0,0 +1,46 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SignalRKeysImpl extends WrapperImpl implements SignalRKeys { + private final SignalRServiceManager manager; + SignalRKeysImpl(SignalRKeysInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public String primaryConnectionString() { + return this.inner().primaryConnectionString(); + } + + @Override + public String primaryKey() { + return this.inner().primaryKey(); + } + + @Override + public String secondaryConnectionString() { + return this.inner().secondaryConnectionString(); + } + + @Override + public String secondaryKey() { + return this.inner().secondaryKey(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysInner.java new file mode 100644 index 000000000000..6253805f97e4 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysInner.java @@ -0,0 +1,121 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class represents the access keys of SignalR service. + */ +public class SignalRKeysInner { + /** + * The primary access key. + */ + @JsonProperty(value = "primaryKey") + private String primaryKey; + + /** + * The secondary access key. + */ + @JsonProperty(value = "secondaryKey") + private String secondaryKey; + + /** + * SignalR connection string constructed via the primaryKey. + */ + @JsonProperty(value = "primaryConnectionString") + private String primaryConnectionString; + + /** + * SignalR connection string constructed via the secondaryKey. + */ + @JsonProperty(value = "secondaryConnectionString") + private String secondaryConnectionString; + + /** + * Get the primary access key. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Set the primary access key. + * + * @param primaryKey the primaryKey value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withPrimaryKey(String primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get the secondary access key. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Set the secondary access key. + * + * @param secondaryKey the secondaryKey value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withSecondaryKey(String secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Get signalR connection string constructed via the primaryKey. + * + * @return the primaryConnectionString value + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Set signalR connection string constructed via the primaryKey. + * + * @param primaryConnectionString the primaryConnectionString value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withPrimaryConnectionString(String primaryConnectionString) { + this.primaryConnectionString = primaryConnectionString; + return this; + } + + /** + * Get signalR connection string constructed via the secondaryKey. + * + * @return the secondaryConnectionString value + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Set signalR connection string constructed via the secondaryKey. + * + * @param secondaryConnectionString the secondaryConnectionString value to set + * @return the SignalRKeysInner object itself. + */ + public SignalRKeysInner withSecondaryConnectionString(String secondaryConnectionString) { + this.secondaryConnectionString = secondaryConnectionString; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java new file mode 100644 index 000000000000..5b69d69b3373 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java @@ -0,0 +1,224 @@ +/** + * 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.signalr.v2018_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 SignalRManagementClientImpl class. + */ +public class SignalRManagementClientImpl 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; + } + + /** Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. */ + private String apiVersion; + + /** + * Gets Client Api Version. Possible values include: '2018-03-01-preview', '2018-10-01'. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** Gets subscription Id 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 Id 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 Id 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 SignalRManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public SignalRManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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 SignalRManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 Whether a unique x-ms-client-request-id should be generated. 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 SignalRManagementClientImpl 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 SignalRsInner object to access its operations. + */ + private SignalRsInner signalRs; + + /** + * Gets the SignalRsInner object to access its operations. + * @return the SignalRsInner object. + */ + public SignalRsInner signalRs() { + return this.signalRs; + } + + /** + * The UsagesInner object to access its operations. + */ + private UsagesInner usages; + + /** + * Gets the UsagesInner object to access its operations. + * @return the UsagesInner object. + */ + public UsagesInner usages() { + return this.usages; + } + + /** + * Initializes an instance of SignalRManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public SignalRManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of SignalRManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public SignalRManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of SignalRManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public SignalRManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = 2018-10-01; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); + this.signalRs = new SignalRsInner(restClient().retrofit(), this); + this.usages = new UsagesInner(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, auto-generated)", super.userAgent(), "SignalRManagementClient", "2018-10-01"); + } +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java new file mode 100644 index 000000000000..bfff4e1cbfb5 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java @@ -0,0 +1,94 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; +import com.microsoft.azure.management.signalr.v2018_10_01.ResourceSku; +import java.util.Map; + +class SignalRResourceImpl extends WrapperImpl implements SignalRResource { + private final SignalRServiceManager manager; + SignalRResourceImpl(SignalRResourceInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public String externalIP() { + return this.inner().externalIP(); + } + + @Override + public String hostName() { + return this.inner().hostName(); + } + + @Override + public String hostNamePrefix() { + return this.inner().hostNamePrefix(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Integer publicPort() { + return this.inner().publicPort(); + } + + @Override + public Integer serverPort() { + return this.inner().serverPort(); + } + + @Override + public ResourceSku sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String version() { + return this.inner().version(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java new file mode 100644 index 000000000000..faaae2dad79f --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java @@ -0,0 +1,186 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.ResourceSku; +import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * A class represent a SignalR service resource. + */ +@JsonFlatten +@SkipParentValidation +public class SignalRResourceInner extends Resource { + /** + * SKU of the service. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /** + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: + * &lt;hostNamePrefix&gt;.service.signalr.net. + */ + @JsonProperty(value = "properties.hostNamePrefix") + private String hostNamePrefix; + + /** + * Provisioning state of the resource. Possible values include: 'Unknown', + * 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', + * 'Deleting', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The publicly accessible IP of the SignalR service. + */ + @JsonProperty(value = "properties.externalIP", access = JsonProperty.Access.WRITE_ONLY) + private String externalIP; + + /** + * FQDN of the SignalR service instance. Format: xxx.service.signalr.net. + */ + @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostName; + + /** + * The publicly accessible port of the SignalR service which is designed + * for browser/client side usage. + */ + @JsonProperty(value = "properties.publicPort", access = JsonProperty.Access.WRITE_ONLY) + private Integer publicPort; + + /** + * The publicly accessible port of the SignalR service which is designed + * for customer server side usage. + */ + @JsonProperty(value = "properties.serverPort", access = JsonProperty.Access.WRITE_ONLY) + private Integer serverPort; + + /** + * Version of the SignalR resource. Probably you need the same or higher + * version of client SDKs. + */ + @JsonProperty(value = "properties.version") + private String version; + + /** + * Get sKU of the service. + * + * @return the sku value + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set sKU of the service. + * + * @param sku the sku value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. + * + * @return the hostNamePrefix value + */ + public String hostNamePrefix() { + return this.hostNamePrefix; + } + + /** + * Set prefix for the hostName of the SignalR service. Retained for future use. + The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. + * + * @param hostNamePrefix the hostNamePrefix value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withHostNamePrefix(String hostNamePrefix) { + this.hostNamePrefix = hostNamePrefix; + return this; + } + + /** + * Get provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicly accessible IP of the SignalR service. + * + * @return the externalIP value + */ + public String externalIP() { + return this.externalIP; + } + + /** + * Get fQDN of the SignalR service instance. Format: xxx.service.signalr.net. + * + * @return the hostName value + */ + public String hostName() { + return this.hostName; + } + + /** + * Get the publicly accessible port of the SignalR service which is designed for browser/client side usage. + * + * @return the publicPort value + */ + public Integer publicPort() { + return this.publicPort; + } + + /** + * Get the publicly accessible port of the SignalR service which is designed for customer server side usage. + * + * @return the serverPort value + */ + public Integer serverPort() { + return this.serverPort; + } + + /** + * Get version of the SignalR resource. Probably you need the same or higher version of client SDKs. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set version of the SignalR resource. Probably you need the same or higher version of client SDKs. + * + * @param version the version value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withVersion(String version) { + this.version = version; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java new file mode 100644 index 000000000000..c5b95cee035f --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java @@ -0,0 +1,123 @@ +/** + * 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.signalr.v2018_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.signalr.v2018_10_01.Operations; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRs; +import com.microsoft.azure.management.signalr.v2018_10_01.Usages; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure SignalRService resource management. + */ +public final class SignalRServiceManager extends ManagerCore { + private Operations operations; + private SignalRs signalRs; + private Usages usages; + /** + * Get a Configurable instance that can be used to create SignalRServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new SignalRServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new SignalRServiceManager(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 SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(RestClient restClient, String subscriptionId) { + return new SignalRServiceManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing SignalRService management API entry points that work across subscriptions + */ + SignalRServiceManager 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 SignalRs. + */ + public SignalRs signalRs() { + if (this.signalRs == null) { + this.signalRs = new SignalRsImpl(this); + } + return this.signalRs; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return SignalRServiceManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private SignalRServiceManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new SignalRManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java new file mode 100644 index 000000000000..82292f4377bd --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java @@ -0,0 +1,56 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsageName; + +class SignalRUsageImpl extends WrapperImpl implements SignalRUsage { + private final SignalRServiceManager manager; + + SignalRUsageImpl(SignalRUsageInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + + + @Override + public Long currentValue() { + return this.inner().currentValue(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Long limit() { + return this.inner().limit(); + } + + @Override + public SignalRUsageName name() { + return this.inner().name(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageInner.java new file mode 100644 index 000000000000..80c4664d1478 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageInner.java @@ -0,0 +1,150 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object that describes a specific usage of SignalR resources. + */ +public class SignalRUsageInner { + /** + * Fully qualified ARM resource id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Current value for the usage quota. + */ + @JsonProperty(value = "currentValue") + private Long currentValue; + + /** + * The maximum permitted value for the usage quota. If there is no limit, + * this value will be -1. + */ + @JsonProperty(value = "limit") + private Long limit; + + /** + * Localizable String object containing the name and a localized value. + */ + @JsonProperty(value = "name") + private SignalRUsageName name; + + /** + * Representing the units of the usage quota. Possible values are: Count, + * Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get fully qualified ARM resource id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set fully qualified ARM resource id. + * + * @param id the id value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get current value for the usage quota. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Set current value for the usage quota. + * + * @param currentValue the currentValue value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withCurrentValue(Long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the maximum permitted value for the usage quota. If there is no limit, this value will be -1. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Set the maximum permitted value for the usage quota. If there is no limit, this value will be -1. + * + * @param limit the limit value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Get localizable String object containing the name and a localized value. + * + * @return the name value + */ + public SignalRUsageName name() { + return this.name; + } + + /** + * Set localizable String object containing the name and a localized value. + * + * @param name the name value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withName(SignalRUsageName name) { + this.name = name; + return this; + } + + /** + * Get representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + * + * @param unit the unit value to set + * @return the SignalRUsageInner object itself. + */ + public SignalRUsageInner withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java new file mode 100644 index 000000000000..1781d9cb2c12 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java @@ -0,0 +1,154 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRs; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRKeys; +import rx.Completable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; + +class SignalRsImpl extends WrapperImpl implements SignalRs { + private final SignalRServiceManager manager; + + SignalRsImpl(SignalRServiceManager manager) { + super(manager.inner().signalRs()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public Observable checkNameAvailabilityAsync(String location) { + SignalRsInner client = this.inner(); + return client.checkNameAvailabilityAsync(location) + .map(new Func1() { + @Override + public NameAvailability call(NameAvailabilityInner inner) { + return new NameAvailabilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable listKeysAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.createOrUpdateAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, resourceName).toCompletable(); + } + + @Override + public Observable updateAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.updateAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable restartAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.restartAsync(resourceGroupName, resourceName).toCompletable(); + } + + @Override + public Observable listAsync() { + SignalRsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByResourceGroupAsync(final String resourceGroupName) { + SignalRsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java new file mode 100644 index 000000000000..a63731977beb --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java @@ -0,0 +1,2181 @@ +/** + * 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.signalr.v2018_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.signalr.v2018_10_01.KeyType; +import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailabilityParameters; +import com.microsoft.azure.management.signalr.v2018_10_01.RegenerateKeyParameters; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateParameters; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUpdateParameters; +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 SignalRs. + */ +public class SignalRsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private SignalRsService service; + /** The service client containing this operation class. */ + private SignalRManagementClientImpl client; + + /** + * Initializes an instance of SignalRsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SignalRsInner(Retrofit retrofit, SignalRManagementClientImpl client) { + this.service = retrofit.create(SignalRsService.class); + this.client = client; + } + + /** + * The interface defining all the services for SignalRs to be + * used by Retrofit to perform actually REST calls. + */ + interface SignalRsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs checkNameAvailability" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability") + Observable> checkNameAvailability(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Body NameAvailabilityParameters 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.signalr.v2018_10_01.SignalRs list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR") + 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.signalr.v2018_10_01.SignalRs listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @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.signalr.v2018_10_01.SignalRs listKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys") + Observable> listKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs regenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey") + Observable> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs beginRegenerateKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey") + Observable> beginRegenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRCreateParameters 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.signalr.v2018_10_01.SignalRs beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRCreateParameters 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.signalr.v2018_10_01.SignalRs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRUpdateParameters 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.signalr.v2018_10_01.SignalRs beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRUpdateParameters 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.signalr.v2018_10_01.SignalRs restart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart") + Observable> restart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs beginRestart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart") + Observable> beginRestart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.signalr.v2018_10_01.SignalRs listNext" }) + @GET + Observable> listNext(@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.signalr.v2018_10_01.SignalRs listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @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 NameAvailabilityInner object if successful. + */ + public NameAvailabilityInner checkNameAvailability(String location) { + return checkNameAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @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(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable checkNameAvailabilityAsync(String location) { + return checkNameAvailabilityWithServiceResponseAsync(location).map(new Func1, NameAvailabilityInner>() { + @Override + public NameAvailabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location 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 NameAvailabilityParameters parameters = null; + return service.checkNameAvailability(location, 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); + } + } + }); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @param parameters Parameters supplied to the 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 NameAvailabilityInner object if successful. + */ + public NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).toBlocking().single().body(); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @param parameters Parameters supplied to the 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 checkNameAvailabilityAsync(String location, NameAvailabilityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @param parameters Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable checkNameAvailabilityAsync(String location, NameAvailabilityParameters parameters) { + return checkNameAvailabilityWithServiceResponseAsync(location, parameters).map(new Func1, NameAvailabilityInner>() { + @Override + public NameAvailabilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @param parameters Parameters supplied to the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NameAvailabilityInner object + */ + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, NameAvailabilityParameters parameters) { + if (location == null) { + throw new IllegalArgumentException("Parameter location 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."); + } + Validator.validate(parameters); + return service.checkNameAvailability(location, 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); + } + + /** + * Handles requests to list all resources in a 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<SignalRResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a 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); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRResourceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRResourceInner> 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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @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<SignalRResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @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); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, 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); + } + + /** + * Get the access keys of the SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRKeysInner object if successful. + */ + public SignalRKeysInner listKeys(String resourceGroupName, String resourceName) { + return listKeysWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Get the access keys of the SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Get the access keys of the SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable listKeysAsync(String resourceGroupName, String resourceName) { + return listKeysWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRKeysInner>() { + @Override + public SignalRKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the access keys of the SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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(this.client.subscriptionId(), resourceGroupName, resourceName, 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 SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRKeysInner object if successful. + */ + public SignalRKeysInner regenerateKey(String resourceGroupName, String resourceName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRKeysInner>() { + @Override + public SignalRKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 KeyType keyType = null; + RegenerateKeyParameters parameters = new RegenerateKeyParameters(); + parameters.withKeyType(null); + Observable> observable = service.regenerateKey(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). 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 SignalRKeysInner object if successful. + */ + public SignalRKeysInner regenerateKey(String resourceGroupName, String resourceName, KeyType keyType) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType).toBlocking().last().body(); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). 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 resourceName, KeyType keyType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType), serviceCallback); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName, KeyType keyType) { + return regenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType).map(new Func1, SignalRKeysInner>() { + @Override + public SignalRKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String resourceName, KeyType keyType) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + RegenerateKeyParameters parameters = null; + if (keyType != null) { + parameters = new RegenerateKeyParameters(); + parameters.withKeyType(keyType); + } + Observable> observable = service.regenerateKey(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRKeysInner object if successful. + */ + public SignalRKeysInner beginRegenerateKey(String resourceGroupName, String resourceName) { + return beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 beginRegenerateKeyAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable beginRegenerateKeyAsync(String resourceGroupName, String resourceName) { + return beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRKeysInner>() { + @Override + public SignalRKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable> beginRegenerateKeyWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 KeyType keyType = null; + RegenerateKeyParameters parameters = new RegenerateKeyParameters(); + parameters.withKeyType(null); + return service.beginRegenerateKey(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRegenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). 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 SignalRKeysInner object if successful. + */ + public SignalRKeysInner beginRegenerateKey(String resourceGroupName, String resourceName, KeyType keyType) { + return beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType).toBlocking().single().body(); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). 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 beginRegenerateKeyAsync(String resourceGroupName, String resourceName, KeyType keyType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType), serviceCallback); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable beginRegenerateKeyAsync(String resourceGroupName, String resourceName, KeyType keyType) { + return beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, resourceName, keyType).map(new Func1, SignalRKeysInner>() { + @Override + public SignalRKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRKeysInner object + */ + public Observable> beginRegenerateKeyWithServiceResponseAsync(String resourceGroupName, String resourceName, KeyType keyType) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + RegenerateKeyParameters parameters = null; + if (keyType != null) { + parameters = new RegenerateKeyParameters(); + parameters.withKeyType(keyType); + } + return service.beginRegenerateKey(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRegenerateKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRegenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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(this.client.subscriptionId(), resourceGroupName, resourceName, 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); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner createOrUpdate(String resourceGroupName, String resourceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 SignalRCreateParameters parameters = null; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update 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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner createOrUpdate(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update 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 resourceName, SignalRCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 SignalRCreateParameters parameters = null; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update 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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner beginCreateOrUpdate(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update 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 beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the create or update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName) { + deleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String resourceName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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(this.client.subscriptionId(), resourceGroupName, resourceName, 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(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner update(String resourceGroupName, String resourceName) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String resourceName) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 SignalRUpdateParameters parameters = null; + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update 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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner update(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update 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 resourceName, SignalRUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + return updateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.update(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner beginUpdate(String resourceGroupName, String resourceName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 beginUpdateAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String resourceName) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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 SignalRUpdateParameters parameters = null; + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update 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 SignalRResourceInner object if successful. + */ + public SignalRResourceInner beginUpdate(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update 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 beginUpdateAsync(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1, SignalRResourceInner>() { + @Override + public SignalRResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters Parameters for the update operation + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, SignalRUpdateParameters parameters) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(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()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 restart(String resourceGroupName, String resourceName) { + restartWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 restartAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restartAsync(String resourceGroupName, String resourceName) { + return restartWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.restart(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 beginRestart(String resourceGroupName, String resourceName) { + beginRestartWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @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 beginRestartAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestartAsync(String resourceGroupName, String resourceName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String resourceName) { + 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 (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName 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.beginRestart(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Handles requests to list all resources in a 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<SignalRResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources in a 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); + } + + /** + * Handles requests to list all resources in a 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<SignalRResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources in a 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<SignalRResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources in a 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<SignalRResourceInner> 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); + } + + /** + * Handles requests to list all resources 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<SignalRResourceInner> 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(); + } + }; + } + + /** + * Handles requests to list all resources 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); + } + + /** + * Handles requests to list all resources 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<SignalRResourceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Handles requests to list all resources 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<SignalRResourceInner> 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)); + } + }); + } + + /** + * Handles requests to list all resources 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<SignalRResourceInner> 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); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java new file mode 100644 index 000000000000..1c971f5b65a8 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java @@ -0,0 +1,53 @@ +/** + * 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.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.Usages; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsage; + +class UsagesImpl extends WrapperImpl implements Usages { + private final SignalRServiceManager manager; + + UsagesImpl(SignalRServiceManager manager) { + super(manager.inner().usages()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + private SignalRUsageImpl wrapModel(SignalRUsageInner inner) { + return new SignalRUsageImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String location) { + UsagesInner client = this.inner(); + return client.listAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SignalRUsage call(SignalRUsageInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java new file mode 100644 index 000000000000..475fc7a3ae8a --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java @@ -0,0 +1,295 @@ +/** + * 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.signalr.v2018_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.Path; +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 Usages. + */ +public class UsagesInner { + /** The Retrofit service to perform REST calls. */ + private UsagesService service; + /** The service client containing this operation class. */ + private SignalRManagementClientImpl client; + + /** + * Initializes an instance of UsagesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UsagesInner(Retrofit retrofit, SignalRManagementClientImpl client) { + this.service = retrofit.create(UsagesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Usages to be + * used by Retrofit to perform actually REST calls. + */ + interface UsagesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.Usages list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages") + Observable> list(@Path("location") String location, @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.signalr.v2018_10_01.Usages listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @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<SignalRUsageInner> object if successful. + */ + public PagedList list(final String location) { + ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @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 location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRUsageInner> object + */ + public Observable> listAsync(final String location) { + return listWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SignalRUsageInner> object + */ + public Observable>> listWithServiceResponseAsync(final String location) { + return listSinglePageAsync(location) + .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)); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + ServiceResponse> * @param location the location like "eastus" + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRUsageInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location 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(location, 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); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> 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(); + } + }; + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + * @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<SignalRUsageInner> 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)); + } + }); + } + + /** + * List usage quotas for Azure SignalR service by location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SignalRUsageInner> 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/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/package-info.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/package-info.java new file mode 100644 index 000000000000..9c1cd75831a0 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/package-info.java @@ -0,0 +1,11 @@ +// 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 SignalRManagementClient. + * REST API for Azure SignalR Service. + */ +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/package-info.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/package-info.java new file mode 100644 index 000000000000..ec8875797b25 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/package-info.java @@ -0,0 +1,11 @@ +// 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 SignalRManagementClient. + * REST API for Azure SignalR Service. + */ +package com.microsoft.azure.management.signalr.v2018_10_01;