diff --git a/sdk/signalr/mgmt-v2018_10_01/pom.xml b/sdk/signalr/mgmt-v2018_10_01/pom.xml index 05047378920b..50b4fbaa4c4a 100644 --- a/sdk/signalr/mgmt-v2018_10_01/pom.xml +++ b/sdk/signalr/mgmt-v2018_10_01/pom.xml @@ -11,10 +11,10 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml - azure-mgmt-signalr + azure-mgmt-signalrservice 1.0.0-beta jar Microsoft Azure SDK for SignalRService Management diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java new file mode 100644 index 000000000000..c7e895316c99 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about an API error. + */ +public class ErrorResponse { + /** + * Describes a particular API error with an error code and a message. + */ + @JsonProperty(value = "error") + private ErrorResponseBody error; + + /** + * Get describes a particular API error with an error code and a message. + * + * @return the error value + */ + public ErrorResponseBody error() { + return this.error; + } + + /** + * Set describes a particular API error with an error code and a message. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorResponseBody error) { + this.error = error; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java new file mode 100644 index 000000000000..91a0c9c0a070 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a particular API error with an error code and a message. + */ +public class ErrorResponseBody { + /** + * An error code that describes the error condition more precisely than an + * HTTP status code. + * Can be used to programmatically handle specific error cases. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A message that describes the error in detail and provides debugging + * information. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * The target of the particular error (for example, the name of the + * property in error). + */ + @JsonProperty(value = "target") + private String target; + + /** + * Contains nested errors that are related to this error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an error code that describes the error condition more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an error code that describes the error condition more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + * + * @param code the code value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message that describes the error in detail and provides debugging information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message that describes the error in detail and provides debugging information. + * + * @param message the message value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target of the particular error (for example, the name of the property in error). + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target of the particular error (for example, the name of the property in error). + * + * @param target the target value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get contains nested errors that are related to this error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set contains nested errors that are related to this error. + * + * @param details the details value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java new file mode 100644 index 000000000000..b1a2fc05ce4f --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java new file mode 100644 index 000000000000..54dc9411fb7c --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FeatureFlags. + */ +public final class FeatureFlags extends ExpandableStringEnum { + /** Static value ServiceMode for FeatureFlags. */ + public static final FeatureFlags SERVICE_MODE = fromString("ServiceMode"); + + /** Static value EnableConnectivityLogs for FeatureFlags. */ + public static final FeatureFlags ENABLE_CONNECTIVITY_LOGS = fromString("EnableConnectivityLogs"); + + /** + * Creates or finds a FeatureFlags from its string representation. + * @param name a name to look for + * @return the corresponding FeatureFlags + */ + @JsonCreator + public static FeatureFlags fromString(String name) { + return fromString(name, FeatureFlags.class); + } + + /** + * @return known FeatureFlags values + */ + public static Collection values() { + return values(FeatureFlags.class); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java new file mode 100644 index 000000000000..23235178b46e --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Logs for Azure Monitoring. + */ +public class LogSpecification { + /** + * Name of the log. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the log. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get name of the log. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the log. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the log. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the log. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java index 001917819772..d63103b27011 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/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_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.NameAvailabilityInner; /** * Type representing NameAvailability. */ -public interface NameAvailability extends HasInner, HasManager { +public interface NameAvailability extends HasInner, HasManager { /** * @return the message value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java index 04fb47e406b7..5a3a86492dee 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.OperationInner; /** * Type representing Operation. */ -public interface Operation extends HasInner, HasManager { +public interface Operation extends HasInner, HasManager { /** * @return the display value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java index 91198028db82..16ba7c2c5c20 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java @@ -21,6 +21,12 @@ public class ServiceSpecification { @JsonProperty(value = "metricSpecifications") private List metricSpecifications; + /** + * Specifications of the Logs for Azure Monitoring. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + /** * Get specifications of the Metrics for Azure Monitoring. * @@ -41,4 +47,24 @@ public ServiceSpecification withMetricSpecifications(List m return this; } + /** + * Get specifications of the Logs for Azure Monitoring. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set specifications of the Logs for Azure Monitoring. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java index 5c30b34c063d..da11c217dc38 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java @@ -16,15 +16,22 @@ */ public class SignalRFeature { /** - * Kind of feature. Required. + * FeatureFlags is the supported features of Azure SignalR service. + * - ServiceMode: Flag for backend server for SignalR service. Values + * allowed: "Default": have your own backend server; "Serverless": your + * application doesn't have a backend server; "Classic": for backward + * compatibility. Support both Default and Serverless mode but not + * recommended; "PredefinedOnly": for future use. + * - EnableConnectivityLogs: "true"/"false", to enable/disable the + * connectivity log category respectively. Possible values include: + * 'ServiceMode', 'EnableConnectivityLogs'. */ @JsonProperty(value = "flag", required = true) - private String flag; + private FeatureFlags flag; /** * Value of the feature flag. See Azure SignalR service document - * https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed - * values. + * https://docs.microsoft.com/azure/azure-signalr/ for allowed values. */ @JsonProperty(value = "value", required = true) private String value; @@ -36,35 +43,31 @@ public class SignalRFeature { private Map properties; /** - * Creates an instance of SignalRFeature class. - * @param value value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. - */ - public SignalRFeature() { - flag = "ServiceMode"; - } - - /** - * Get kind of feature. Required. + * Get featureFlags is the supported features of Azure SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs'. * * @return the flag value */ - public String flag() { + public FeatureFlags flag() { return this.flag; } /** - * Set kind of feature. Required. + * Set featureFlags is the supported features of Azure SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs'. * * @param flag the flag value to set * @return the SignalRFeature object itself. */ - public SignalRFeature withFlag(String flag) { + public SignalRFeature withFlag(FeatureFlags flag) { this.flag = flag; return this; } /** - * Get value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + * Get value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values. * * @return the value value */ @@ -73,7 +76,7 @@ public String value() { } /** - * Set value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + * Set value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values. * * @param value the value value to set * @return the SignalRFeature object itself. diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java index 4db36385894f..d297b5d80ec7 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.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_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRKeysInner; /** * Type representing SignalRKeys. */ -public interface SignalRKeys extends HasInner, HasManager { +public interface SignalRKeys extends HasInner, HasManager { /** * @return the primaryConnectionString value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java index cc3089b85072..3b40149343d9 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java @@ -9,22 +9,16 @@ package com.microsoft.azure.management.signalr.v2018_10_01; import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.Resource; -import com.microsoft.azure.arm.resources.models.GroupableResourceCore; -import com.microsoft.azure.arm.resources.models.HasResourceGroup; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -import com.microsoft.azure.arm.model.Appliable; -import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; -import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRResourceInner; +import java.util.List; +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 cors value. */ @@ -50,6 +44,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. */ @@ -71,97 +80,18 @@ public interface SignalRResource extends HasInner, Resourc ResourceSku sku(); /** - * @return the version value. + * @return the tags value. */ - String version(); + Map tags(); /** - * The entirety of the SignalRResource definition. + * @return the type value. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { - } + String type(); /** - * Grouping of SignalRResource definition stages. - */ - 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 definition allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - * @param properties Settings used to provision or configure the resource - * @return the next definition stage - */ - WithCreate withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource definition allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - * @param sku The billing information of the resource.(e.g. basic vs. standard) - * @return the next definition stage - */ - 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. + * @return the version value. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProperties, UpdateStages.WithSku { - } + String version(); - /** - * Grouping of SignalRResource update stages. - */ - interface UpdateStages { - /** - * The stage of the signalrresource update allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - * @param properties Settings used to provision or configure the resource - * @return the next update stage - */ - Update withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource update allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - * @param sku The billing information of the resource.(e.g. basic vs. standard) - * @return the next update stage - */ - Update withSku(ResourceSku sku); - } - - } } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java index e5ab78e6944f..06ee3c348d0d 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java @@ -11,12 +11,12 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRUsageInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; /** * Type representing SignalRUsage. */ -public interface SignalRUsage extends HasInner, HasManager { +public interface SignalRUsage extends HasInner, HasManager { /** * @return the currentValue value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java index dbcb36c88c94..2ca10f950126 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java @@ -8,21 +8,22 @@ package com.microsoft.azure.management.signalr.v2018_10_01; -import com.microsoft.azure.arm.collection.SupportsCreating; -import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; -import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; -import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; import rx.Observable; -import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; -import com.microsoft.azure.arm.collection.SupportsListing; import rx.Completable; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRsInner; -import com.microsoft.azure.arm.model.HasInner; /** * 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,6 +44,46 @@ public interface SignalRs extends SupportsCreating regenerateKeyAsync(String resourceGroupName, String resourceName); + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateAsync(String resourceGroupName, String resourceName); + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName); + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String resourceGroupName, String resourceName); + /** * Operation to restart a SignalR service. * @@ -54,12 +95,20 @@ public interface SignalRs extends SupportsCreating checkNameAvailabilityAsync(String location); + 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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java index 552563a0b4d1..8c6768c159f5 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java index 74bae25940e9..b45aa8930444 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java @@ -14,14 +14,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java index 4af31a9e5b87..64b3c156fd18 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java @@ -17,14 +17,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.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; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java index 14e1c8e375cc..f2d57589c3f2 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceFuture; @@ -69,7 +69,7 @@ interface OperationsService { * Lists all of the available REST API operations of the Microsoft.SignalRService provider. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<OperationInner> object if successful. */ @@ -162,10 +162,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -174,7 +174,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java index 48874f604771..e2d18e642289 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java @@ -12,14 +12,14 @@ 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; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java index a91761180c80..8f48ecb129ac 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java @@ -10,6 +10,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java index c34adf5b31d7..f95303e4b3da 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java @@ -8,72 +8,25 @@ package com.microsoft.azure.management.signalr.v2018_10_01.implementation; -import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; -import rx.Observable; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUpdateParameters; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateParameters; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCorsSettings; import java.util.List; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; import com.microsoft.azure.management.signalr.v2018_10_01.ResourceSku; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateOrUpdateProperties; -import rx.functions.Func1; +import java.util.Map; -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(); +class SignalRResourceImpl extends WrapperImpl implements SignalRResource { + private final SignalRServiceManager manager; + SignalRResourceImpl(SignalRResourceInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; } @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)); - } - - @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)); - } - - @Override - protected Observable getInnerAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); - } - - @Override - public boolean isInCreateMode() { - return this.inner().id() == null; - } - - private void resetCreateUpdateParameters() { - this.createParameter = new SignalRCreateParameters(); - this.updateParameter = new SignalRUpdateParameters(); + public SignalRServiceManager manager() { + return this.manager; } @Override @@ -101,6 +54,21 @@ public String hostNamePrefix() { return this.inner().hostNamePrefix(); } + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + @Override public ProvisioningState provisioningState() { return this.inner().provisioningState(); @@ -122,28 +90,18 @@ public ResourceSku sku() { } @Override - public String version() { - return this.inner().version(); + public Map tags() { + return this.inner().getTags(); } @Override - public SignalRResourceImpl withProperties(SignalRCreateOrUpdateProperties properties) { - if (isInCreateMode()) { - this.createParameter.withProperties(properties); - } else { - this.updateParameter.withProperties(properties); - } - return this; + 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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java new file mode 100644 index 000000000000..c5b95cee035f --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.signalr.v2018_10_01.Operations; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRs; +import com.microsoft.azure.management.signalr.v2018_10_01.Usages; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure SignalRService resource management. + */ +public final class SignalRServiceManager extends ManagerCore { + private Operations operations; + private SignalRs signalRs; + private Usages usages; + /** + * Get a Configurable instance that can be used to create SignalRServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new SignalRServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new SignalRServiceManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(RestClient restClient, String subscriptionId) { + return new SignalRServiceManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing SignalRService management API entry points that work across subscriptions + */ + SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage SignalRs. + */ + public SignalRs signalRs() { + if (this.signalRs == null) { + this.signalRs = new SignalRsImpl(this); + } + return this.signalRs; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return SignalRServiceManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private SignalRServiceManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new SignalRManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java index 4cf9afbc0550..82292f4377bd 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java @@ -14,15 +14,15 @@ import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsageName; class SignalRUsageImpl extends WrapperImpl implements SignalRUsage { - private final SignalRManager manager; + private final SignalRServiceManager manager; - SignalRUsageImpl(SignalRUsageInner inner, SignalRManager manager) { + SignalRUsageImpl(SignalRUsageInner 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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java index e1aa06a1b2b4..1781d9cb2c12 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java @@ -4,104 +4,115 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * def + * abc */ package com.microsoft.azure.management.signalr.v2018_10_01.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_10_01.SignalRs; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; +import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRKeys; import rx.Completable; -import 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_10_01.SignalRKeys; -import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; + +class SignalRsImpl extends WrapperImpl implements SignalRs { + private final SignalRServiceManager manager; -class SignalRsImpl extends GroupableResourcesCoreImpl implements SignalRs { - protected SignalRsImpl(SignalRManager manager) { - super(manager.inner().signalRs(), manager); + SignalRsImpl(SignalRServiceManager manager) { + super(manager.inner().signalRs()); + this.manager = manager; } - @Override - protected Observable getInnerAsync(String resourceGroupName, String name) { - SignalRsInner client = this.inner(); - return client.getByResourceGroupAsync(resourceGroupName, name); + public SignalRServiceManager manager() { + return this.manager; } @Override - protected Completable deleteInnerAsync(String resourceGroupName, String name) { + public Observable checkNameAvailabilityAsync(String location) { SignalRsInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name).toCompletable(); + return client.checkNameAvailabilityAsync(location) + .map(new Func1() { + @Override + public NameAvailability call(NameAvailabilityInner inner) { + return new NameAvailabilityImpl(inner, 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); + public Observable listKeysAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } @Override - public Observable deleteByIdsAsync(String...ids) { - return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } @Override - public void deleteByIds(Collection ids) { - if (ids != null && !ids.isEmpty()) { - this.deleteByIdsAsync(ids).toBlocking().last(); - } + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); } @Override - public void deleteByIds(String...ids) { - this.deleteByIds(new ArrayList(Arrays.asList(ids))); + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.createOrUpdateAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); } @Override - public PagedList listByResourceGroup(String resourceGroupName) { + public Completable deleteAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.listByResourceGroup(resourceGroupName)); + return client.deleteAsync(resourceGroupName, resourceName).toCompletable(); } @Override - public Observable listByResourceGroupAsync(String resourceGroupName) { + public Observable updateAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return client.listByResourceGroupAsync(resourceGroupName) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) + return client.updateAsync(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 restartAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.list()); + return client.restartAsync(resourceGroupName, resourceName).toCompletable(); } @Override @@ -117,64 +128,25 @@ public Iterable call(Page page) { .map(new Func1() { @Override public SignalRResource call(SignalRResourceInner inner) { - return wrapModel(inner); + return new SignalRResourceImpl(inner, manager()); } }); } @Override - public SignalRResourceImpl define(String name) { - return wrapModel(name); - } - - @Override - public Observable listKeysAsync(String resourceGroupName, String resourceName) { + public Observable listByResourceGroupAsync(final String resourceGroupName) { SignalRsInner client = this.inner(); - return client.listKeysAsync(resourceGroupName, resourceName) - .map(new Func1() { - @Override - public SignalRKeys call(SignalRKeysInner inner) { - return new SignalRKeysImpl(inner, manager()); - } - }); - } - - @Override - public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { - SignalRsInner client = this.inner(); - return client.regenerateKeyAsync(resourceGroupName, resourceName) - .map(new Func1() { + 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 - public Completable restartAsync(String resourceGroupName, String resourceName) { - SignalRsInner client = this.inner(); - return client.restartAsync(resourceGroupName, resourceName).toCompletable(); - } - - @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_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java index af45331cea68..9ee12efa80c6 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java @@ -14,8 +14,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.management.signalr.v2018_10_01.KeyType; import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailabilityParameters; import com.microsoft.azure.management.signalr.v2018_10_01.RegenerateKeyParameters; @@ -46,8 +46,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -150,7 +148,7 @@ interface SignalRsService { * * @param location the region * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NameAvailabilityInner object if successful. */ @@ -224,7 +222,7 @@ public Observable> call(Response> call(Response checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -306,7 +304,7 @@ private ServiceResponse checkNameAvailabilityDelegate(Res * Handles requests to list all resources in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -402,10 +400,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -414,7 +412,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -530,7 +528,7 @@ private ServiceResponse> listByResourceGroupDeleg * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -603,10 +601,10 @@ public Observable> call(Response }); } - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -616,7 +614,7 @@ private ServiceResponse listKeysDelegate(Response> regenerateKeyWithServiceRes * @param resourceName The name of the SignalR resource. * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -765,7 +763,7 @@ public Observable> regenerateKeyWithServiceRes * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -848,7 +846,7 @@ public Observable> call(Response * @param resourceName The name of the SignalR resource. * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -929,10 +927,10 @@ public Observable> call(Response }); } - private ServiceResponse beginRegenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginRegenerateKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -942,7 +940,7 @@ private ServiceResponse beginRegenerateKeyDelegate(Response> call(Response getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1028,7 +1026,7 @@ private ServiceResponse getByResourceGroupDelegate(Respons * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1098,7 +1096,7 @@ public Observable> createOrUpdateWithServi * @param resourceName The name of the SignalR resource. * @param parameters Parameters for the create or update operation * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1171,7 +1169,7 @@ public Observable> createOrUpdateWithServi * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1252,7 +1250,7 @@ public Observable> call(Response> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, 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) + .registerError(ErrorResponseException.class) .build(response); } @@ -1343,7 +1342,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respon * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void delete(String resourceGroupName, String resourceName) { @@ -1411,7 +1410,7 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete(String resourceGroupName, String resourceName) { @@ -1483,11 +1482,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1497,7 +1496,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1567,7 +1566,7 @@ public Observable> updateWithServiceRespon * @param resourceName The name of the SignalR resource. * @param parameters Parameters for the update operation * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1640,7 +1639,7 @@ public Observable> updateWithServiceRespon * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1721,7 +1720,7 @@ public Observable> call(Response> call(Response beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1812,7 +1811,7 @@ private ServiceResponse beginUpdateDelegate(Response> restartWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginRestart(String resourceGroupName, String resourceName) { @@ -1952,11 +1951,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginRestartDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1965,7 +1964,7 @@ private ServiceResponse beginRestartDelegate(Response respon * * @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 ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -2064,10 +2063,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -2076,7 +2075,7 @@ private ServiceResponse> listNextDelegate(Respons * * @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 ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -2175,10 +2174,10 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java index 7d8b34c893b5..1c971f5b65a8 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java @@ -17,14 +17,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsage; class UsagesImpl extends WrapperImpl implements Usages { - private final SignalRManager manager; + private final SignalRServiceManager manager; - UsagesImpl(SignalRManager manager) { + UsagesImpl(SignalRServiceManager manager) { super(manager.inner().usages()); this.manager = manager; } - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java index 475fc7a3ae8a..b4497a1727e0 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceFuture; @@ -71,7 +71,7 @@ interface UsagesService { * * @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 ErrorResponseException 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. */ @@ -174,10 +174,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -186,7 +186,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); }