From 62d4158c6c7366d2b77a6a6c6ca3d46fe5484425 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 27 May 2020 02:38:26 +0000 Subject: [PATCH] Generated from afd3ea04ce56392f017e6a53af48d47ae8b4d85e Removing legacy file --- sdk/signalr/mgmt-v2018_03_01_preview/pom.xml | 18 +- .../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/SignalRsInner.java | 1 + .../implementation/UsagesImpl.java | 53 ++++ .../implementation/UsagesInner.java | 292 ++++++++++++++++++ 38 files changed, 1404 insertions(+), 436 deletions(-) create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java create mode 100644 sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java diff --git a/sdk/signalr/mgmt-v2018_03_01_preview/pom.xml b/sdk/signalr/mgmt-v2018_03_01_preview/pom.xml index ad176a3573861..65eaa8c8fbe48 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/pom.xml +++ b/sdk/signalr/mgmt-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.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.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 @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Dimension.java new file mode 100644 index 0000000000000..6e39979732879 --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java index d9501a27b7e65..f5424d2a0df07 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/MetricSpecification.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java index 3891e0bc47209..aa1415f25a94d 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailability.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java index b785b34ce6d01..a9fb48435f68e 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/NameAvailabilityParameters.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java index ee5957d398842..68347f0229581 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Operation.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java index 7216433b17ee5..d8bc471cdd84f 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationDisplay.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java index d039682e8d110..b2f056716f060 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/OperationProperties.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java index 660fc6f821834..79b70891c330e 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/RegenerateKeyParameters.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java index 3ca7c7da34a03..d5366601b2f0d 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ResourceSku.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java index afce688433e41..d451a3bc4e4f7 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/ServiceSpecification.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java index 91c8b23f91907..1f525bc71c8df 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateOrUpdateProperties.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java index 2113043de0ec0..28ceeae121e75 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRCreateParameters.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java index 422ff2ace7639..8aa8423a6322b 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRKeys.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java index 625c393925b38..4bd232b282fbf 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRResource.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java index 48bf4df812b81..daeee71e38a99 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRSkuTier.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java index e0b6b95078ea1..85feb498a99df 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUpdateParameters.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsage.java new file mode 100644 index 0000000000000..154f1c2d752cb --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRUsageName.java new file mode 100644 index 0000000000000..5cae295916805 --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java index 284c920f38f04..aa3e089caa67c 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/SignalRs.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/Usages.java new file mode 100644 index 0000000000000..c384d2a611532 --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java index f5fe5b08bbb12..c045d29e96935 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java index f248ec901cf0c..568816e1a0e8b 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/NameAvailabilityInner.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java index bf9786d35abe5..01fcf5eae08c9 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java index 62802ec67815f..47f92a20adb0d 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationInner.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java index 2f69506609352..ea8399a692b2f 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/OperationsImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java index 9ac6081a8ad93..36e638949a6f2 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java index 191027b015bad..c8a0dce771ee4 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRKeysInner.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java index 6b2f40e33c10b..fa0ac02013782 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRManagementClientImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java index 8fb6105d6933e..3eb2d322b47fe 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java index 7341491a4acfa..88e046ba69ba2 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRResourceInner.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRServiceManager.java new file mode 100644 index 0000000000000..e3b7dc91c301c --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageImpl.java new file mode 100644 index 0000000000000..f81bcd2d9eb3d --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRUsageInner.java new file mode 100644 index 0000000000000..5e736bc884e94 --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java index 632e8ca79cdb5..3712cc6ff1055 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsImpl.java +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java index 2c979a3c274e4..9ecaeca117ac2 100644 --- a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java +++ b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java @@ -1277,6 +1277,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) diff --git a/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesImpl.java new file mode 100644 index 0000000000000..a21bdc78f8907 --- /dev/null +++ b/sdk/signalr/mgmt-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/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java b/sdk/signalr/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/UsagesInner.java new file mode 100644 index 0000000000000..6a1381ccc3267 --- /dev/null +++ b/sdk/signalr/mgmt-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); + } + +}