From 6f863273406923b08a4909932517c017e2d58359 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 25 Jan 2019 03:22:04 +0000 Subject: [PATCH] Generated from 11688ecee0e4debad9c3bc5dade3ea5134e89279 fix typos --- .../signalr/v2018_10_01/ResourceSku.java | 8 +- .../signalr/v2018_10_01/SignalRFeature.java | 106 ++++ .../v2018_10_01/SignalRFeatureList.java | 31 ++ .../SignalRFeaturesParameters.java | 53 ++ .../signalr/v2018_10_01/SignalRs.java | 34 ++ .../SignalRFeatureListImpl.java | 38 ++ .../SignalRFeatureListInner.java | 84 ++++ .../implementation/SignalRResourceInner.java | 8 +- .../implementation/SignalRsImpl.java | 33 ++ .../implementation/SignalRsInner.java | 453 ++++++++++++++++++ 10 files changed, 840 insertions(+), 8 deletions(-) create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeatureList.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeaturesParameters.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListImpl.java create mode 100644 signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListInner.java diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java index f53f19503317..ca0736a9b6f7 100644 --- a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ResourceSku.java @@ -23,8 +23,8 @@ public class ResourceSku { /** * Optional tier of this particular SKU. `Basic` is deprecated, use - * `Standard` instead for Basic tier. Possible values include: 'Free', - * 'Basic', 'Standard', 'Premium'. + * `Standard` instead. Possible values include: 'Free', 'Basic', + * 'Standard', 'Premium'. */ @JsonProperty(value = "tier") private SignalRSkuTier tier; @@ -72,7 +72,7 @@ public ResourceSku withName(String name) { } /** - * Get optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead for Basic tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. + * Get optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. * * @return the tier value */ @@ -81,7 +81,7 @@ public SignalRSkuTier tier() { } /** - * Set optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead for Basic tier. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. + * Set optional tier of this particular SKU. `Basic` is deprecated, use `Standard` instead. Possible values include: 'Free', 'Basic', 'Standard', 'Premium'. * * @param tier the tier value to set * @return the ResourceSku object itself. diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java new file mode 100644 index 000000000000..8fa926a669b3 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Feature of a SignalR resource, which controls the SignalR runtime behavior. + */ +public class SignalRFeature { + /** + * Name of the feature. Required. + */ + @JsonProperty(value = "flag", required = true) + private String flag; + + /** + * Value of the feature flag. See Azure SignalR service document + * https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed + * values. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Optional properties related to this feature. + */ + @JsonProperty(value = "properties") + 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 name of the feature. Required. + * + * @return the flag value + */ + public String flag() { + return this.flag; + } + + /** + * Set name of the feature. Required. + * + * @param flag the flag value to set + * @return the SignalRFeature object itself. + */ + public SignalRFeature withFlag(String 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. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + * + * @param value the value value to set + * @return the SignalRFeature object itself. + */ + public SignalRFeature withValue(String value) { + this.value = value; + return this; + } + + /** + * Get optional properties related to this feature. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set optional properties related to this feature. + * + * @param properties the properties value to set + * @return the SignalRFeature object itself. + */ + public SignalRFeature withProperties(Map properties) { + this.properties = properties; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeatureList.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeatureList.java new file mode 100644 index 000000000000..352cfdf8c961 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeatureList.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRFeatureListInner; +import java.util.List; + +/** + * Type representing SignalRFeatureList. + */ +public interface SignalRFeatureList extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeaturesParameters.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeaturesParameters.java new file mode 100644 index 000000000000..3d08391d0e1f --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeaturesParameters.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for SignalR service instance features management opreations. + */ +public class SignalRFeaturesParameters { + /** + * List of features. + * + * If certain feature is not present, SignalR service will remain it + * unchanged or use the global default value. + * Note that, default value doesn't mean "false". It varies in terms of + * different FeatureFlags. + */ + @JsonProperty(value = "features", required = true) + private List features; + + /** + * Get list of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * + * @return the features value + */ + public List features() { + return this.features; + } + + /** + * Set list of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * + * @param features the features value to set + * @return the SignalRFeaturesParameters object itself. + */ + public SignalRFeaturesParameters withFeatures(List features) { + this.features = features; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java index 01eb2fe0771e..bdbcf6e55868 100644 --- a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java @@ -10,6 +10,7 @@ import rx.Observable; import rx.Completable; +import java.util.List; /** * Type representing SignalRs. @@ -84,6 +85,16 @@ public interface SignalRs { */ Observable updateAsync(String resourceGroupName, String resourceName); + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restartAsync(String resourceGroupName, String resourceName); + /** * Handles requests to list all resources in a subscription. * @@ -101,4 +112,27 @@ public interface SignalRs { */ Observable listByResourceGroupAsync(final String resourceGroupName); + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable switchFeaturesAsync(String resourceGroupName, String resourceName, List features); + + /** + * List SignalR resource features. + * + * @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 listFeaturesAsync(String resourceGroupName, String resourceName); + } diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListImpl.java new file mode 100644 index 000000000000..9f9523de2449 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeatureList; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; + +class SignalRFeatureListImpl extends WrapperImpl implements SignalRFeatureList { + private final SignalRServiceManager manager; + SignalRFeatureListImpl(SignalRFeatureListInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListInner.java new file mode 100644 index 000000000000..0d7a8f7c8929 --- /dev/null +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRFeatureListInner.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A class that represents a list of SignalRFeatures related to SignalR + * resource. + */ +public class SignalRFeatureListInner { + /** + * List of features. + * Note that, if a feature is not included in the list, which only means + * user never set it explicitly rather than 'false'. + * In this case, SignalR service will use a globally default value which + * might be 'true' or 'false'. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL the client should use to fetch the next page (per server side + * paging). + * It's null for now, added for future use. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get list of features. + Note that, if a feature is not included in the list, which only means user never set it explicitly rather than 'false'. + In this case, SignalR service will use a globally default value which might be 'true' or 'false'. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set list of features. + Note that, if a feature is not included in the list, which only means user never set it explicitly rather than 'false'. + In this case, SignalR service will use a globally default value which might be 'true' or 'false'. + * + * @param value the value value to set + * @return the SignalRFeatureListInner object itself. + */ + public SignalRFeatureListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + * + * @param nextLink the nextLink value to set + * @return the SignalRFeatureListInner object itself. + */ + public SignalRFeatureListInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java index 102d76a99bfe..faaae2dad79f 100644 --- a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java @@ -56,14 +56,14 @@ public class SignalRResourceInner extends Resource { private String hostName; /** - * The publicly accessibly port of the SignalR service which is designed + * The publicly accessible port of the SignalR service which is designed * for browser/client side usage. */ @JsonProperty(value = "properties.publicPort", access = JsonProperty.Access.WRITE_ONLY) private Integer publicPort; /** - * The publicly accessibly port of the SignalR service which is designed + * The publicly accessible port of the SignalR service which is designed * for customer server side usage. */ @JsonProperty(value = "properties.serverPort", access = JsonProperty.Access.WRITE_ONLY) @@ -146,7 +146,7 @@ public String hostName() { } /** - * Get the publicly accessibly port of the SignalR service which is designed for browser/client side usage. + * Get the publicly accessible port of the SignalR service which is designed for browser/client side usage. * * @return the publicPort value */ @@ -155,7 +155,7 @@ public Integer publicPort() { } /** - * Get the publicly accessibly port of the SignalR service which is designed for customer server side usage. + * Get the publicly accessible port of the SignalR service which is designed for customer server side usage. * * @return the serverPort value */ diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java index 3e820869960f..73b3fcdf2a0f 100644 --- a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java @@ -18,6 +18,9 @@ import rx.Completable; import com.microsoft.azure.Page; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeatureList; +import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; class SignalRsImpl extends WrapperImpl implements SignalRs { private final SignalRServiceManager manager; @@ -109,6 +112,12 @@ public SignalRResource call(SignalRResourceInner inner) { }); } + @Override + public Completable restartAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.restartAsync(resourceGroupName, resourceName).toCompletable(); + } + @Override public Observable listAsync() { SignalRsInner client = this.inner(); @@ -145,4 +154,28 @@ public SignalRResource call(SignalRResourceInner inner) { }); } + @Override + public Observable switchFeaturesAsync(String resourceGroupName, String resourceName, List features) { + SignalRsInner client = this.inner(); + return client.switchFeaturesAsync(resourceGroupName, resourceName, features) + .map(new Func1() { + @Override + public SignalRFeatureList call(SignalRFeatureListInner inner) { + return new SignalRFeatureListImpl(inner, manager()); + } + }); + } + + @Override + public Observable listFeaturesAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.listFeaturesAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRFeatureList call(SignalRFeatureListInner inner) { + return new SignalRFeatureListImpl(inner, manager()); + } + }); + } + } diff --git a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java index 5ed15691b047..b0552f468694 100644 --- a/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java +++ b/signalr/resource-manager/v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java @@ -20,6 +20,8 @@ import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailabilityParameters; import com.microsoft.azure.management.signalr.v2018_10_01.RegenerateKeyParameters; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateParameters; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeaturesParameters; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; @@ -123,6 +125,26 @@ interface SignalRsService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}") Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body SignalRUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs restart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/restart") + Observable> restart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs beginRestart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/restart") + Observable> beginRestart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs switchFeatures" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/switchFeatures") + Observable> switchFeatures(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SignalRFeaturesParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs beginSwitchFeatures" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/switchFeatures") + Observable> beginSwitchFeatures(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SignalRFeaturesParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs listFeatures" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listFeatures") + Observable> listFeatures(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1794,6 +1816,437 @@ private ServiceResponse beginUpdateDelegate(Response restartAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restartAsync(String resourceGroupName, String resourceName) { + return restartWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.restart(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestart(String resourceGroupName, String resourceName) { + beginRestartWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRestartAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestartAsync(String resourceGroupName, String resourceName) { + return beginRestartWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Operation to restart a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestartWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginRestart(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @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 SignalRFeatureListInner object if successful. + */ + public SignalRFeatureListInner switchFeatures(String resourceGroupName, String resourceName, List features) { + return switchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features).toBlocking().last().body(); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @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 switchFeaturesAsync(String resourceGroupName, String resourceName, List features, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(switchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features), serviceCallback); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable switchFeaturesAsync(String resourceGroupName, String resourceName, List features) { + return switchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features).map(new Func1, SignalRFeatureListInner>() { + @Override + public SignalRFeatureListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> switchFeaturesWithServiceResponseAsync(String resourceGroupName, String resourceName, List features) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (features == null) { + throw new IllegalArgumentException("Parameter features is required and cannot be null."); + } + Validator.validate(features); + SignalRFeaturesParameters parameters = new SignalRFeaturesParameters(); + parameters.withFeatures(features); + Observable> observable = service.switchFeatures(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @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 SignalRFeatureListInner object if successful. + */ + public SignalRFeatureListInner beginSwitchFeatures(String resourceGroupName, String resourceName, List features) { + return beginSwitchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features).toBlocking().single().body(); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @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 beginSwitchFeaturesAsync(String resourceGroupName, String resourceName, List features, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwitchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features), serviceCallback); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRFeatureListInner object + */ + public Observable beginSwitchFeaturesAsync(String resourceGroupName, String resourceName, List features) { + return beginSwitchFeaturesWithServiceResponseAsync(resourceGroupName, resourceName, features).map(new Func1, SignalRFeatureListInner>() { + @Override + public SignalRFeatureListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Switch on/off SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param features List of features. + If certain feature is not present, SignalR service will remain it unchanged or use the global default value. + Note that, default value doesn't mean "false". It varies in terms of different FeatureFlags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRFeatureListInner object + */ + public Observable> beginSwitchFeaturesWithServiceResponseAsync(String resourceGroupName, String resourceName, List features) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (features == null) { + throw new IllegalArgumentException("Parameter features is required and cannot be null."); + } + Validator.validate(features); + SignalRFeaturesParameters parameters = new SignalRFeaturesParameters(); + parameters.withFeatures(features); + return service.beginSwitchFeatures(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSwitchFeaturesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSwitchFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SignalRFeatureListInner object if successful. + */ + public SignalRFeatureListInner listFeatures(String resourceGroupName, String resourceName) { + return listFeaturesWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * List SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listFeaturesAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listFeaturesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); + } + + /** + * List SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRFeatureListInner object + */ + public Observable listFeaturesAsync(String resourceGroupName, String resourceName) { + return listFeaturesWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, SignalRFeatureListInner>() { + @Override + public SignalRFeatureListInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List SignalR resource features. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SignalRFeatureListInner object + */ + public Observable> listFeaturesWithServiceResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFeatures(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFeaturesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Handles requests to list all resources in a subscription. *