From 17b3f0db0438aa88addbe9778174c3662027e8c0 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 13 Oct 2016 18:09:18 -0700 Subject: [PATCH] Regenerate web app from 2016-09-01 api --- .../website/CheckNameResourceTypes.java | 62 + .../azure/management/website/CloningInfo.java | 2 + .../management/website/ConnStringInfo.java | 94 - .../website/ConnStringValueTypePair.java | 9 +- .../website/ConnectionStringType.java | 77 + ...pe.java => DnsVerificationTestResult.java} | 33 +- .../azure/management/website/ErrorEntity.java | 167 + .../website/IpSecurityRestriction.java | 2 + .../website/KeyVaultSecretStatus.java | 3 + .../ManagedHostingEnvironmentStatus.java | 56 - .../website/NetworkAccessControlEntry.java | 2 +- .../management/website/OperationStatus.java | 62 + .../management/website/PerfMonSample.java | 92 + .../azure/management/website/PerfMonSet.java | 143 + .../website/ResourceMetricName.java | 25 +- ...tring.java => ResourceMetricProperty.java} | 33 +- .../website/ResourceMetricValue.java | 83 +- .../azure/management/website/RoutingRule.java | 42 - .../management/website/SiteMachineKey.java | 116 + .../management/website/SiteProperties.java | 92 - .../management/website/SkuDescription.java | 77 + .../management/website/SlotConfigNames.java | 70 - .../website/ValidateProperties.java | 117 + .../website/ValidateResourceTypes.java | 59 + .../website/ValidateResponseError.java | 66 + .../website/VirtualApplication.java | 10 +- .../management/website/VirtualDirectory.java | 6 +- .../website/VirtualNetworkProfile.java | 25 +- ...r.java => AppServiceCertificateInner.java} | 17 +- ...a => AppServiceCertificateOrderInner.java} | 96 +- ... => AppServiceCertificateOrdersInner.java} | 1500 +- ...r.java => AppServiceEnvironmentInner.java} | 219 +- ....java => AppServiceEnvironmentsInner.java} | 6835 ++--- ...SkuInner.java => AppServicePlanInner.java} | 111 +- .../implementation/AppServicePlansInner.java | 4110 +++ .../implementation/CapabilityInner.java | 91 + .../implementation/CertificatesInner.java | 487 +- .../ClassicMobileServicesInner.java | 450 - .../CustomHostnameAnalysisResultInner.java | 311 + .../implementation/DeletedSiteInner.java | 281 +- .../website/implementation/DomainsInner.java | 1145 +- .../GlobalCertificateOrdersInner.java | 354 - .../GlobalDomainRegistrationsInner.java | 782 - .../GlobalResourceGroupsInner.java | 138 - .../website/implementation/GlobalsInner.java | 2196 -- .../implementation/HybridConnectionInner.java | 205 + .../HybridConnectionKeyInner.java | 73 + .../ManagedHostingEnvironmentInner.java | 341 - .../ManagedHostingEnvironmentsInner.java | 1812 -- .../MigrateMySqlRequestInner.java | 47 + .../implementation/NetworkFeaturesInner.java | 26 + .../implementation/OperationInner.java | 223 + .../implementation/PerfMonResponseInner.java | 92 + .../PremierAddOnRequestInner.java | 2 +- .../implementation/ProvidersInner.java | 571 - .../implementation/PushSettingsInner.java | 119 + .../implementation/RecommendationsInner.java | 420 +- .../implementation/RecoverResponseInner.java | 47 + .../ReissueCertificateOrderRequestInner.java | 53 + .../RenewCertificateOrderRequestInner.java | 53 + .../implementation/ResourceMetricInner.java | 108 +- .../ResourceNameAvailabilityRequestInner.java | 10 +- .../implementation/ServerFarmsInner.java | 2942 -- .../implementation/SiteConfigInner.java | 181 +- .../website/implementation/SiteInner.java | 283 +- .../website/implementation/SnapshotInner.java | 47 + .../StorageMigrationOptionsInner.java | 124 + .../StorageMigrationResponseInner.java | 47 + .../implementation/TopLevelDomainsInner.java | 223 +- .../website/implementation/UsagesInner.java | 152 - .../website/implementation/UserInner.java | 48 +- .../implementation/ValidateRequestInner.java | 119 + .../implementation/ValidateResponseInner.java | 67 + .../{SitesInner.java => WebAppsInner.java} | 23866 ++++++++++------ .../WebSiteManagementClientImpl.java | 1543 +- .../website/implementation/package-info.java | 2 +- .../management/website/package-info.java | 2 +- gulpfile.js | 2 +- 78 files changed, 29859 insertions(+), 24739 deletions(-) create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CheckNameResourceTypes.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringInfo.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnectionStringType.java rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/{DatabaseServerType.java => DnsVerificationTestResult.java} (51%) create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ErrorEntity.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentStatus.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/OperationStatus.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSample.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSet.java rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/{KeyValuePairStringString.java => ResourceMetricProperty.java} (50%) delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RoutingRule.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteMachineKey.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteProperties.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SlotConfigNames.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateProperties.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResourceTypes.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResponseError.java rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{CertificateOrderCertificateInner.java => AppServiceCertificateInner.java} (80%) rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{CertificateOrderInner.java => AppServiceCertificateOrderInner.java} (72%) rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{CertificateOrdersInner.java => AppServiceCertificateOrdersInner.java} (52%) rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{HostingEnvironmentInner.java => AppServiceEnvironmentInner.java} (72%) rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{HostingEnvironmentsInner.java => AppServiceEnvironmentsInner.java} (59%) rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{ServerFarmWithRichSkuInner.java => AppServicePlanInner.java} (64%) create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlansInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CapabilityInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CustomHostnameAnalysisResultInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionKeyInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/MigrateMySqlRequestInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/OperationInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PerfMonResponseInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PushSettingsInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecoverResponseInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SnapshotInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationOptionsInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationResponseInner.java delete mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateRequestInner.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateResponseInner.java rename azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/{SitesInner.java => WebAppsInner.java} (59%) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CheckNameResourceTypes.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CheckNameResourceTypes.java new file mode 100644 index 000000000000..a4552efa9d30 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CheckNameResourceTypes.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CheckNameResourceTypes. + */ +public final class CheckNameResourceTypes { + /** Static value Site for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SITE = new CheckNameResourceTypes("Site"); + + /** Static value Slot for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SLOT = new CheckNameResourceTypes("Slot"); + + /** Static value HostingEnvironment for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes HOSTING_ENVIRONMENT = new CheckNameResourceTypes("HostingEnvironment"); + + private String value; + + /** + * Creates a custom value for CheckNameResourceTypes. + * @param value the custom value + */ + public CheckNameResourceTypes(String value) { + this.value = value; + } + + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof CheckNameResourceTypes)) { + return false; + } + if (obj == this) { + return true; + } + CheckNameResourceTypes rhs = (CheckNameResourceTypes) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } + } +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CloningInfo.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CloningInfo.java index 0fcce5b29808..a3fe2cee5bc7 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CloningInfo.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/CloningInfo.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.website; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Represents information needed for cloning operation. @@ -44,6 +45,7 @@ public class CloningInfo { * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} * for other slots. */ + @JsonProperty(required = true) private String sourceWebAppId; /** diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringInfo.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringInfo.java deleted file mode 100644 index 6590ab77138f..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringInfo.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents database connection string information. - */ -public class ConnStringInfo { - /** - * Name of connection string. - */ - private String name; - - /** - * Connection string value. - */ - private String connectionString; - - /** - * Type of database. Possible values include: 'MySql', 'SQLServer', - * 'SQLAzure', 'Custom'. - */ - @JsonProperty(required = true) - private DatabaseServerType type; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ConnStringInfo object itself. - */ - public ConnStringInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the connectionString value. - * - * @return the connectionString value - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString value. - * - * @param connectionString the connectionString value to set - * @return the ConnStringInfo object itself. - */ - public ConnStringInfo withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public DatabaseServerType type() { - return this.type; - } - - /** - * Set the type value. - * - * @param type the type value to set - * @return the ConnStringInfo object itself. - */ - public ConnStringInfo withType(DatabaseServerType type) { - this.type = type; - return this; - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringValueTypePair.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringValueTypePair.java index 0f52c6c93646..30de41f369c6 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringValueTypePair.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnStringValueTypePair.java @@ -21,10 +21,11 @@ public class ConnStringValueTypePair { /** * Type of database. Possible values include: 'MySql', 'SQLServer', - * 'SQLAzure', 'Custom'. + * 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', + * 'ApiHub', 'DocDb', 'RedisCache'. */ @JsonProperty(required = true) - private DatabaseServerType type; + private ConnectionStringType type; /** * Get the value value. @@ -51,7 +52,7 @@ public ConnStringValueTypePair withValue(String value) { * * @return the type value */ - public DatabaseServerType type() { + public ConnectionStringType type() { return this.type; } @@ -61,7 +62,7 @@ public DatabaseServerType type() { * @param type the type value to set * @return the ConnStringValueTypePair object itself. */ - public ConnStringValueTypePair withType(DatabaseServerType type) { + public ConnStringValueTypePair withType(ConnectionStringType type) { this.type = type; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnectionStringType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnectionStringType.java new file mode 100644 index 000000000000..b9f247e545cc --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ConnectionStringType.java @@ -0,0 +1,77 @@ +/** + * 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.website; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ConnectionStringType. + */ +public enum ConnectionStringType { + /** Enum value MySql. */ + MY_SQL("MySql"), + + /** Enum value SQLServer. */ + SQLSERVER("SQLServer"), + + /** Enum value SQLAzure. */ + SQLAZURE("SQLAzure"), + + /** Enum value Custom. */ + CUSTOM("Custom"), + + /** Enum value NotificationHub. */ + NOTIFICATION_HUB("NotificationHub"), + + /** Enum value ServiceBus. */ + SERVICE_BUS("ServiceBus"), + + /** Enum value EventHub. */ + EVENT_HUB("EventHub"), + + /** Enum value ApiHub. */ + API_HUB("ApiHub"), + + /** Enum value DocDb. */ + DOC_DB("DocDb"), + + /** Enum value RedisCache. */ + REDIS_CACHE("RedisCache"); + + /** The actual serialized value for a ConnectionStringType instance. */ + private String value; + + ConnectionStringType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ConnectionStringType instance. + * + * @param value the serialized value to parse. + * @return the parsed ConnectionStringType object, or null if unable to parse. + */ + @JsonCreator + public static ConnectionStringType fromString(String value) { + ConnectionStringType[] items = ConnectionStringType.values(); + for (ConnectionStringType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DatabaseServerType.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DnsVerificationTestResult.java similarity index 51% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DatabaseServerType.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DnsVerificationTestResult.java index eaac01566980..f8b9456254f0 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DatabaseServerType.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/DnsVerificationTestResult.java @@ -12,38 +12,35 @@ import com.fasterxml.jackson.annotation.JsonValue; /** - * Defines values for DatabaseServerType. + * Defines values for DnsVerificationTestResult. */ -public enum DatabaseServerType { - /** Enum value MySql. */ - MY_SQL("MySql"), +public enum DnsVerificationTestResult { + /** Enum value Passed. */ + PASSED("Passed"), - /** Enum value SQLServer. */ - SQLSERVER("SQLServer"), + /** Enum value Failed. */ + FAILED("Failed"), - /** Enum value SQLAzure. */ - SQLAZURE("SQLAzure"), + /** Enum value Skipped. */ + SKIPPED("Skipped"); - /** Enum value Custom. */ - CUSTOM("Custom"); - - /** The actual serialized value for a DatabaseServerType instance. */ + /** The actual serialized value for a DnsVerificationTestResult instance. */ private String value; - DatabaseServerType(String value) { + DnsVerificationTestResult(String value) { this.value = value; } /** - * Parses a serialized value to a DatabaseServerType instance. + * Parses a serialized value to a DnsVerificationTestResult instance. * * @param value the serialized value to parse. - * @return the parsed DatabaseServerType object, or null if unable to parse. + * @return the parsed DnsVerificationTestResult object, or null if unable to parse. */ @JsonCreator - public static DatabaseServerType fromString(String value) { - DatabaseServerType[] items = DatabaseServerType.values(); - for (DatabaseServerType item : items) { + public static DnsVerificationTestResult fromString(String value) { + DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); + for (DnsVerificationTestResult item : items) { if (item.toString().equalsIgnoreCase(value)) { return item; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ErrorEntity.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ErrorEntity.java new file mode 100644 index 000000000000..bc722f1a0775 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ErrorEntity.java @@ -0,0 +1,167 @@ +/** + * 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.website; + +import java.util.List; + +/** + * Body of the error response returned from the API. + */ +public class ErrorEntity { + /** + * Basic error code. + */ + private String code; + + /** + * Any details of the error. + */ + private String message; + + /** + * Type of error. + */ + private String extendedCode; + + /** + * Message template. + */ + private String messageTemplate; + + /** + * Parameters for the template. + */ + private List parameters; + + /** + * Inner errors. + */ + private List innerErrors; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the extendedCode value. + * + * @return the extendedCode value + */ + public String extendedCode() { + return this.extendedCode; + } + + /** + * Set the extendedCode value. + * + * @param extendedCode the extendedCode value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withExtendedCode(String extendedCode) { + this.extendedCode = extendedCode; + return this; + } + + /** + * Get the messageTemplate value. + * + * @return the messageTemplate value + */ + public String messageTemplate() { + return this.messageTemplate; + } + + /** + * Set the messageTemplate value. + * + * @param messageTemplate the messageTemplate value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withMessageTemplate(String messageTemplate) { + this.messageTemplate = messageTemplate; + return this; + } + + /** + * Get the parameters value. + * + * @return the parameters value + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters value. + * + * @param parameters the parameters value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the innerErrors value. + * + * @return the innerErrors value + */ + public List innerErrors() { + return this.innerErrors; + } + + /** + * Set the innerErrors value. + * + * @param innerErrors the innerErrors value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withInnerErrors(List innerErrors) { + this.innerErrors = innerErrors; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/IpSecurityRestriction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/IpSecurityRestriction.java index 5566f72a8219..27ab7a3cc1ce 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/IpSecurityRestriction.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/IpSecurityRestriction.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.website; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Represents an ip security restriction on a web app. @@ -16,6 +17,7 @@ public class IpSecurityRestriction { /** * IP address the security restriction is valid for. */ + @JsonProperty(required = true) private String ipAddress; /** diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyVaultSecretStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyVaultSecretStatus.java index ce8a4c5a901d..849dd9feefe2 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyVaultSecretStatus.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyVaultSecretStatus.java @@ -42,6 +42,9 @@ public enum KeyVaultSecretStatus { /** Enum value UnknownError. */ UNKNOWN_ERROR("UnknownError"), + /** Enum value ExternalPrivateKey. */ + EXTERNAL_PRIVATE_KEY("ExternalPrivateKey"), + /** Enum value Unknown. */ UNKNOWN("Unknown"); diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentStatus.java deleted file mode 100644 index 5f3939c94c99..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Defines values for ManagedHostingEnvironmentStatus. - */ -public enum ManagedHostingEnvironmentStatus { - /** Enum value Preparing. */ - PREPARING("Preparing"), - - /** Enum value Ready. */ - READY("Ready"), - - /** Enum value Deleting. */ - DELETING("Deleting"); - - /** The actual serialized value for a ManagedHostingEnvironmentStatus instance. */ - private String value; - - ManagedHostingEnvironmentStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ManagedHostingEnvironmentStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed ManagedHostingEnvironmentStatus object, or null if unable to parse. - */ - @JsonCreator - public static ManagedHostingEnvironmentStatus fromString(String value) { - ManagedHostingEnvironmentStatus[] items = ManagedHostingEnvironmentStatus.values(); - for (ManagedHostingEnvironmentStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/NetworkAccessControlEntry.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/NetworkAccessControlEntry.java index e1d337b533b8..d79c7ff9ca71 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/NetworkAccessControlEntry.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/NetworkAccessControlEntry.java @@ -10,7 +10,7 @@ /** - * The NetworkAccessControlEntry model. + * Network Access control entry. */ public class NetworkAccessControlEntry { /** diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/OperationStatus.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/OperationStatus.java new file mode 100644 index 000000000000..a5e8231e3ea2 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/OperationStatus.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for OperationStatus. + */ +public enum OperationStatus { + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value TimedOut. */ + TIMED_OUT("TimedOut"), + + /** Enum value Created. */ + CREATED("Created"); + + /** The actual serialized value for a OperationStatus instance. */ + private String value; + + OperationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a OperationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed OperationStatus object, or null if unable to parse. + */ + @JsonCreator + public static OperationStatus fromString(String value) { + OperationStatus[] items = OperationStatus.values(); + for (OperationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSample.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSample.java new file mode 100644 index 000000000000..d5229dbc591b --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSample.java @@ -0,0 +1,92 @@ +/** + * 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.website; + +import org.joda.time.DateTime; + +/** + * Class representing a Perf Mon Sample. + */ +public class PerfMonSample { + /** + * Point in time for which counter was measured. + */ + private DateTime time; + + /** + * Name of the server on which the measurement is made. + */ + private String instanceName; + + /** + * Value of Counter at certain time. + */ + private Double value; + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time value. + * + * @param time the time value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withTime(DateTime time) { + this.time = time; + return this; + } + + /** + * Get the instanceName value. + * + * @return the instanceName value + */ + public String instanceName() { + return this.instanceName; + } + + /** + * Set the instanceName value. + * + * @param instanceName the instanceName value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withInstanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSet.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSet.java new file mode 100644 index 000000000000..7eef87c58dea --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/PerfMonSet.java @@ -0,0 +1,143 @@ +/** + * 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.website; + +import org.joda.time.DateTime; +import java.util.List; + +/** + * Class containing metric information. + */ +public class PerfMonSet { + /** + * Unique key name of the counter. + */ + private String name; + + /** + * Start time of the period. + */ + private DateTime startTime; + + /** + * End time of the period. + */ + private DateTime endTime; + + /** + * Presented time grain. + */ + private String timeGrain; + + /** + * Collection of workers that are active during this time. + */ + private List values; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime value. + * + * @param endTime the endTime value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the timeGrain value. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the timeGrain value. + * + * @param timeGrain the timeGrain value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the values value. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the values value. + * + * @param values the values value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricName.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricName.java index 66203d808c1b..19206b4b1fe4 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricName.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricName.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.website; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Name of a metric for any resource. @@ -16,11 +17,13 @@ public class ResourceMetricName { /** * metric name value. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String value; /** * Localized metric name value. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; /** @@ -32,17 +35,6 @@ public String value() { return this.value; } - /** - * Set the value value. - * - * @param value the value value to set - * @return the ResourceMetricName object itself. - */ - public ResourceMetricName withValue(String value) { - this.value = value; - return this; - } - /** * Get the localizedValue value. * @@ -52,15 +44,4 @@ public String localizedValue() { return this.localizedValue; } - /** - * Set the localizedValue value. - * - * @param localizedValue the localizedValue value to set - * @return the ResourceMetricName object itself. - */ - public ResourceMetricName withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyValuePairStringString.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricProperty.java similarity index 50% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyValuePairStringString.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricProperty.java index 167de2995b86..a44e880314a1 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/KeyValuePairStringString.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricProperty.java @@ -8,22 +8,19 @@ package com.microsoft.azure.management.website; -import com.fasterxml.jackson.annotation.JsonProperty; /** - * The KeyValuePairStringString model. + * Resource metric property. */ -public class KeyValuePairStringString { +public class ResourceMetricProperty { /** - * The key property. + * Key for resource metric property. */ - @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String key; /** - * The value property. + * Value of pair. */ - @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String value; /** @@ -35,6 +32,17 @@ public String key() { return this.key; } + /** + * Set the key value. + * + * @param key the key value to set + * @return the ResourceMetricProperty object itself. + */ + public ResourceMetricProperty withKey(String key) { + this.key = key; + return this; + } + /** * Get the value value. * @@ -44,4 +52,15 @@ public String value() { return this.value; } + /** + * Set the value value. + * + * @param value the value value to set + * @return the ResourceMetricProperty object itself. + */ + public ResourceMetricProperty withValue(String value) { + this.value = value; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricValue.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricValue.java index 3121857831c1..40ee53007935 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricValue.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ResourceMetricValue.java @@ -8,6 +8,8 @@ package com.microsoft.azure.management.website; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Value of resource metric. @@ -16,51 +18,52 @@ public class ResourceMetricValue { /** * Value timestamp. */ - private String timeStamp; + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private String timestamp; /** * Value average. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private Double average; /** * Value minimum. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private Double minimum; /** * Value maximum. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private Double maximum; /** * Value total. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private Double total; /** * Value count. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private Double count; /** - * Get the timeStamp value. - * - * @return the timeStamp value + * Properties. */ - public String timeStamp() { - return this.timeStamp; - } + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private List properties; /** - * Set the timeStamp value. + * Get the timestamp value. * - * @param timeStamp the timeStamp value to set - * @return the ResourceMetricValue object itself. + * @return the timestamp value */ - public ResourceMetricValue withTimeStamp(String timeStamp) { - this.timeStamp = timeStamp; - return this; + public String timestamp() { + return this.timestamp; } /** @@ -72,17 +75,6 @@ public Double average() { return this.average; } - /** - * Set the average value. - * - * @param average the average value to set - * @return the ResourceMetricValue object itself. - */ - public ResourceMetricValue withAverage(Double average) { - this.average = average; - return this; - } - /** * Get the minimum value. * @@ -92,17 +84,6 @@ public Double minimum() { return this.minimum; } - /** - * Set the minimum value. - * - * @param minimum the minimum value to set - * @return the ResourceMetricValue object itself. - */ - public ResourceMetricValue withMinimum(Double minimum) { - this.minimum = minimum; - return this; - } - /** * Get the maximum value. * @@ -112,17 +93,6 @@ public Double maximum() { return this.maximum; } - /** - * Set the maximum value. - * - * @param maximum the maximum value to set - * @return the ResourceMetricValue object itself. - */ - public ResourceMetricValue withMaximum(Double maximum) { - this.maximum = maximum; - return this; - } - /** * Get the total value. * @@ -132,17 +102,6 @@ public Double total() { return this.total; } - /** - * Set the total value. - * - * @param total the total value to set - * @return the ResourceMetricValue object itself. - */ - public ResourceMetricValue withTotal(Double total) { - this.total = total; - return this; - } - /** * Get the count value. * @@ -153,14 +112,12 @@ public Double count() { } /** - * Set the count value. + * Get the properties value. * - * @param count the count value to set - * @return the ResourceMetricValue object itself. + * @return the properties value */ - public ResourceMetricValue withCount(Double count) { - this.count = count; - return this; + public List properties() { + return this.properties; } } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RoutingRule.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RoutingRule.java deleted file mode 100644 index 958233bd84dd..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RoutingRule.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website; - - -/** - * Routing rules for TiP. - */ -public class RoutingRule { - /** - * Name of the routing rule. The recommended name would be to point to the - * slot which will receive the traffic in the experiment. - */ - private String name; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the RoutingRule object itself. - */ - public RoutingRule withName(String name) { - this.name = name; - return this; - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteMachineKey.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteMachineKey.java new file mode 100644 index 000000000000..5f158a901352 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteMachineKey.java @@ -0,0 +1,116 @@ +/** + * 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.website; + + +/** + * MachineKey of Azure web site. + */ +public class SiteMachineKey { + /** + * MachineKeyValidation. + */ + private String validation; + + /** + * ValidationKey. + */ + private String validationKey; + + /** + * Decryption. + */ + private String decryption; + + /** + * DecryptionKey. + */ + private String decryptionKey; + + /** + * Get the validation value. + * + * @return the validation value + */ + public String validation() { + return this.validation; + } + + /** + * Set the validation value. + * + * @param validation the validation value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidation(String validation) { + this.validation = validation; + return this; + } + + /** + * Get the validationKey value. + * + * @return the validationKey value + */ + public String validationKey() { + return this.validationKey; + } + + /** + * Set the validationKey value. + * + * @param validationKey the validationKey value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidationKey(String validationKey) { + this.validationKey = validationKey; + return this; + } + + /** + * Get the decryption value. + * + * @return the decryption value + */ + public String decryption() { + return this.decryption; + } + + /** + * Set the decryption value. + * + * @param decryption the decryption value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withDecryption(String decryption) { + this.decryption = decryption; + return this; + } + + /** + * Get the decryptionKey value. + * + * @return the decryptionKey value + */ + public String decryptionKey() { + return this.decryptionKey; + } + + /** + * Set the decryptionKey value. + * + * @param decryptionKey the decryptionKey value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withDecryptionKey(String decryptionKey) { + this.decryptionKey = decryptionKey; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteProperties.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteProperties.java deleted file mode 100644 index 7b3d82bcb33a..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SiteProperties.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website; - -import java.util.List; - -/** - * The SiteProperties model. - */ -public class SiteProperties { - /** - * The metadata property. - */ - private List metadata; - - /** - * The properties property. - */ - private List properties; - - /** - * The appSettings property. - */ - private List appSettings; - - /** - * Get the metadata value. - * - * @return the metadata value - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata value. - * - * @param metadata the metadata value to set - * @return the SiteProperties object itself. - */ - public SiteProperties withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the properties value. - * - * @return the properties value - */ - public List properties() { - return this.properties; - } - - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the SiteProperties object itself. - */ - public SiteProperties withProperties(List properties) { - this.properties = properties; - return this; - } - - /** - * Get the appSettings value. - * - * @return the appSettings value - */ - public List appSettings() { - return this.appSettings; - } - - /** - * Set the appSettings value. - * - * @param appSettings the appSettings value to set - * @return the SiteProperties object itself. - */ - public SiteProperties withAppSettings(List appSettings) { - this.appSettings = appSettings; - return this; - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SkuDescription.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SkuDescription.java index 250bdd07270f..cdec843e08a6 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SkuDescription.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SkuDescription.java @@ -8,6 +8,8 @@ package com.microsoft.azure.management.website; +import java.util.List; +import com.microsoft.azure.management.website.implementation.CapabilityInner; /** * Describes a sku for a scalable resource. @@ -38,6 +40,21 @@ public class SkuDescription { */ private Integer capacity; + /** + * Min, max, and default scale values of the sku. + */ + private SkuCapacity skuCapacity; + + /** + * Locations of the sku. + */ + private List locations; + + /** + * Capabilities of the sku, eg., is traffic manager enabled?. + */ + private List capabilities; + /** * Get the name value. * @@ -138,4 +155,64 @@ public SkuDescription withCapacity(Integer capacity) { return this; } + /** + * Get the skuCapacity value. + * + * @return the skuCapacity value + */ + public SkuCapacity skuCapacity() { + return this.skuCapacity; + } + + /** + * Set the skuCapacity value. + * + * @param skuCapacity the skuCapacity value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withSkuCapacity(SkuCapacity skuCapacity) { + this.skuCapacity = skuCapacity; + return this; + } + + /** + * Get the locations value. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations value. + * + * @param locations the locations value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the capabilities value. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities value. + * + * @param capabilities the capabilities value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SlotConfigNames.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SlotConfigNames.java deleted file mode 100644 index 098b8c4c6c7e..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SlotConfigNames.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website; - -import java.util.List; - -/** - * Class containing names for connection strings and application settings to - * be marked as sticky to the slot - * and not moved during swap operation - * This is valid for all deployment slots under the site. - */ -public class SlotConfigNames { - /** - * List of connection string names. - */ - private List connectionStringNames; - - /** - * List of application settings names. - */ - private List appSettingNames; - - /** - * Get the connectionStringNames value. - * - * @return the connectionStringNames value - */ - public List connectionStringNames() { - return this.connectionStringNames; - } - - /** - * Set the connectionStringNames value. - * - * @param connectionStringNames the connectionStringNames value to set - * @return the SlotConfigNames object itself. - */ - public SlotConfigNames withConnectionStringNames(List connectionStringNames) { - this.connectionStringNames = connectionStringNames; - return this; - } - - /** - * Get the appSettingNames value. - * - * @return the appSettingNames value - */ - public List appSettingNames() { - return this.appSettingNames; - } - - /** - * Set the appSettingNames value. - * - * @param appSettingNames the appSettingNames value to set - * @return the SlotConfigNames object itself. - */ - public SlotConfigNames withAppSettingNames(List appSettingNames) { - this.appSettingNames = appSettingNames; - return this; - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateProperties.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateProperties.java new file mode 100644 index 000000000000..c162c38891a1 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateProperties.java @@ -0,0 +1,117 @@ +/** + * 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.website; + + +/** + * Site properties used for validation. + */ +public class ValidateProperties { + /** + * ARM resource id of an app service plan that would host the web app. + */ + private String serverFarmId; + + /** + * Name of the target SKU for the server farm. + */ + private String skuName; + + /** + * Target capacity of the server farm (number of VM's). + */ + private Integer capacity; + + /** + * Name of app service environment where site or server farm should be + * created. + */ + private String hostingEnvironment; + + /** + * Get the serverFarmId value. + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId value. + * + * @param serverFarmId the serverFarmId value to set + * @return the ValidateProperties object itself. + */ + public ValidateProperties withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the skuName value. + * + * @return the skuName value + */ + public String skuName() { + return this.skuName; + } + + /** + * Set the skuName value. + * + * @param skuName the skuName value to set + * @return the ValidateProperties object itself. + */ + public ValidateProperties withSkuName(String skuName) { + this.skuName = skuName; + return this; + } + + /** + * Get the capacity value. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity value. + * + * @param capacity the capacity value to set + * @return the ValidateProperties object itself. + */ + public ValidateProperties withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the hostingEnvironment value. + * + * @return the hostingEnvironment value + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set the hostingEnvironment value. + * + * @param hostingEnvironment the hostingEnvironment value to set + * @return the ValidateProperties object itself. + */ + public ValidateProperties withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResourceTypes.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResourceTypes.java new file mode 100644 index 000000000000..4458cdcc73ce --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResourceTypes.java @@ -0,0 +1,59 @@ +/** + * 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.website; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ValidateResourceTypes. + */ +public final class ValidateResourceTypes { + /** Static value ServerFarm for ValidateResourceTypes. */ + public static final ValidateResourceTypes SERVER_FARM = new ValidateResourceTypes("ServerFarm"); + + /** Static value Site for ValidateResourceTypes. */ + public static final ValidateResourceTypes SITE = new ValidateResourceTypes("Site"); + + private String value; + + /** + * Creates a custom value for ValidateResourceTypes. + * @param value the custom value + */ + public ValidateResourceTypes(String value) { + this.value = value; + } + + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ValidateResourceTypes)) { + return false; + } + if (obj == this) { + return true; + } + ValidateResourceTypes rhs = (ValidateResourceTypes) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } + } +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResponseError.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResponseError.java new file mode 100644 index 000000000000..40f5854a800e --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ValidateResponseError.java @@ -0,0 +1,66 @@ +/** + * 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.website; + + +/** + * Error details for when validation fails. + */ +public class ValidateResponseError { + /** + * Validation error code. + */ + private String code; + + /** + * Validation error message. + */ + private String message; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the ValidateResponseError object itself. + */ + public ValidateResponseError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the ValidateResponseError object itself. + */ + public ValidateResponseError withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualApplication.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualApplication.java index f86f12c52abc..e0a1ffe2537e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualApplication.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualApplication.java @@ -11,26 +11,26 @@ import java.util.List; /** - * The VirtualApplication model. + * Virtual application under web app. */ public class VirtualApplication { /** - * The virtualPath property. + * Virtual path. */ private String virtualPath; /** - * The physicalPath property. + * Physical path. */ private String physicalPath; /** - * The preloadEnabled property. + * Is preload enabled. */ private Boolean preloadEnabled; /** - * The virtualDirectories property. + * Virtual Directories for virtual application. */ private List virtualDirectories; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualDirectory.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualDirectory.java index 6c616cedc36f..400cf6575d07 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualDirectory.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualDirectory.java @@ -10,16 +10,16 @@ /** - * The VirtualDirectory model. + * Directory for virtual application. */ public class VirtualDirectory { /** - * The virtualPath property. + * Path to virtual application. */ private String virtualPath; /** - * The physicalPath property. + * Physical path. */ private String physicalPath; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualNetworkProfile.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualNetworkProfile.java index 1f3f40232836..271cc36cca27 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualNetworkProfile.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/VirtualNetworkProfile.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.website; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Specification for using a virtual network. @@ -21,11 +22,13 @@ public class VirtualNetworkProfile { /** * Name of the virtual network (read-only). */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String name; /** * Resource type of the virtual network (read-only). */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String type; /** @@ -62,17 +65,6 @@ public String name() { return this.name; } - /** - * Set the name value. - * - * @param name the name value to set - * @return the VirtualNetworkProfile object itself. - */ - public VirtualNetworkProfile withName(String name) { - this.name = name; - return this; - } - /** * Get the type value. * @@ -82,17 +74,6 @@ public String type() { return this.type; } - /** - * Set the type value. - * - * @param type the type value to set - * @return the VirtualNetworkProfile object itself. - */ - public VirtualNetworkProfile withType(String type) { - this.type = type; - return this; - } - /** * Get the subnet value. * diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderCertificateInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateInner.java similarity index 80% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderCertificateInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateInner.java index c8c9b82bae8d..3d77751b2ef9 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderCertificateInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateInner.java @@ -18,7 +18,7 @@ * through Azure. */ @JsonFlatten -public class CertificateOrderCertificateInner extends Resource { +public class AppServiceCertificateInner extends Resource { /** * Key Vault Csm resource Id. */ @@ -36,7 +36,8 @@ public class CertificateOrderCertificateInner extends Resource { * 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', * 'OperationNotPermittedOnKeyVault', * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'Unknown'. + * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', + * 'Unknown'. */ @JsonProperty(value = "properties.provisioningState") private KeyVaultSecretStatus provisioningState; @@ -54,9 +55,9 @@ public String keyVaultId() { * Set the keyVaultId value. * * @param keyVaultId the keyVaultId value to set - * @return the CertificateOrderCertificateInner object itself. + * @return the AppServiceCertificateInner object itself. */ - public CertificateOrderCertificateInner withKeyVaultId(String keyVaultId) { + public AppServiceCertificateInner withKeyVaultId(String keyVaultId) { this.keyVaultId = keyVaultId; return this; } @@ -74,9 +75,9 @@ public String keyVaultSecretName() { * Set the keyVaultSecretName value. * * @param keyVaultSecretName the keyVaultSecretName value to set - * @return the CertificateOrderCertificateInner object itself. + * @return the AppServiceCertificateInner object itself. */ - public CertificateOrderCertificateInner withKeyVaultSecretName(String keyVaultSecretName) { + public AppServiceCertificateInner withKeyVaultSecretName(String keyVaultSecretName) { this.keyVaultSecretName = keyVaultSecretName; return this; } @@ -94,9 +95,9 @@ public KeyVaultSecretStatus provisioningState() { * Set the provisioningState value. * * @param provisioningState the provisioningState value to set - * @return the CertificateOrderCertificateInner object itself. + * @return the AppServiceCertificateInner object itself. */ - public CertificateOrderCertificateInner withProvisioningState(KeyVaultSecretStatus provisioningState) { + public AppServiceCertificateInner withProvisioningState(KeyVaultSecretStatus provisioningState) { this.provisioningState = provisioningState; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrderInner.java similarity index 72% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrderInner.java index 663a1f3e88a4..9df800b8c1b0 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrderInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrderInner.java @@ -21,12 +21,12 @@ * Certificate purchase order. */ @JsonFlatten -public class CertificateOrderInner extends Resource { +public class AppServiceCertificateOrderInner extends Resource { /** * State of the Key Vault secret. */ @JsonProperty(value = "properties.certificates") - private Map certificates; + private Map certificates; /** * Certificate distinguished name. @@ -122,12 +122,18 @@ public class CertificateOrderInner extends Resource { @JsonProperty(value = "properties.expirationTime") private DateTime expirationTime; + /** + * Is Private Key External. + */ + @JsonProperty(value = "properties.isPrivateKeyExternal") + private Boolean isPrivateKeyExternal; + /** * Get the certificates value. * * @return the certificates value */ - public Map certificates() { + public Map certificates() { return this.certificates; } @@ -135,9 +141,9 @@ public Map certificates() { * Set the certificates value. * * @param certificates the certificates value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withCertificates(Map certificates) { + public AppServiceCertificateOrderInner withCertificates(Map certificates) { this.certificates = certificates; return this; } @@ -155,9 +161,9 @@ public String distinguishedName() { * Set the distinguishedName value. * * @param distinguishedName the distinguishedName value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withDistinguishedName(String distinguishedName) { + public AppServiceCertificateOrderInner withDistinguishedName(String distinguishedName) { this.distinguishedName = distinguishedName; return this; } @@ -175,9 +181,9 @@ public String domainVerificationToken() { * Set the domainVerificationToken value. * * @param domainVerificationToken the domainVerificationToken value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withDomainVerificationToken(String domainVerificationToken) { + public AppServiceCertificateOrderInner withDomainVerificationToken(String domainVerificationToken) { this.domainVerificationToken = domainVerificationToken; return this; } @@ -195,9 +201,9 @@ public Integer validityInYears() { * Set the validityInYears value. * * @param validityInYears the validityInYears value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withValidityInYears(Integer validityInYears) { + public AppServiceCertificateOrderInner withValidityInYears(Integer validityInYears) { this.validityInYears = validityInYears; return this; } @@ -215,9 +221,9 @@ public Integer keySize() { * Set the keySize value. * * @param keySize the keySize value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withKeySize(Integer keySize) { + public AppServiceCertificateOrderInner withKeySize(Integer keySize) { this.keySize = keySize; return this; } @@ -235,9 +241,9 @@ public CertificateProductType productType() { * Set the productType value. * * @param productType the productType value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withProductType(CertificateProductType productType) { + public AppServiceCertificateOrderInner withProductType(CertificateProductType productType) { this.productType = productType; return this; } @@ -255,9 +261,9 @@ public Boolean autoRenew() { * Set the autoRenew value. * * @param autoRenew the autoRenew value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withAutoRenew(Boolean autoRenew) { + public AppServiceCertificateOrderInner withAutoRenew(Boolean autoRenew) { this.autoRenew = autoRenew; return this; } @@ -275,9 +281,9 @@ public ProvisioningState provisioningState() { * Set the provisioningState value. * * @param provisioningState the provisioningState value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withProvisioningState(ProvisioningState provisioningState) { + public AppServiceCertificateOrderInner withProvisioningState(ProvisioningState provisioningState) { this.provisioningState = provisioningState; return this; } @@ -295,9 +301,9 @@ public CertificateOrderStatus status() { * Set the status value. * * @param status the status value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withStatus(CertificateOrderStatus status) { + public AppServiceCertificateOrderInner withStatus(CertificateOrderStatus status) { this.status = status; return this; } @@ -315,9 +321,9 @@ public CertificateDetailsInner signedCertificate() { * Set the signedCertificate value. * * @param signedCertificate the signedCertificate value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withSignedCertificate(CertificateDetailsInner signedCertificate) { + public AppServiceCertificateOrderInner withSignedCertificate(CertificateDetailsInner signedCertificate) { this.signedCertificate = signedCertificate; return this; } @@ -335,9 +341,9 @@ public String csr() { * Set the csr value. * * @param csr the csr value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withCsr(String csr) { + public AppServiceCertificateOrderInner withCsr(String csr) { this.csr = csr; return this; } @@ -355,9 +361,9 @@ public CertificateDetailsInner intermediate() { * Set the intermediate value. * * @param intermediate the intermediate value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withIntermediate(CertificateDetailsInner intermediate) { + public AppServiceCertificateOrderInner withIntermediate(CertificateDetailsInner intermediate) { this.intermediate = intermediate; return this; } @@ -375,9 +381,9 @@ public CertificateDetailsInner root() { * Set the root value. * * @param root the root value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withRoot(CertificateDetailsInner root) { + public AppServiceCertificateOrderInner withRoot(CertificateDetailsInner root) { this.root = root; return this; } @@ -395,9 +401,9 @@ public String serialNumber() { * Set the serialNumber value. * * @param serialNumber the serialNumber value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withSerialNumber(String serialNumber) { + public AppServiceCertificateOrderInner withSerialNumber(String serialNumber) { this.serialNumber = serialNumber; return this; } @@ -415,9 +421,9 @@ public DateTime lastCertificateIssuanceTime() { * Set the lastCertificateIssuanceTime value. * * @param lastCertificateIssuanceTime the lastCertificateIssuanceTime value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withLastCertificateIssuanceTime(DateTime lastCertificateIssuanceTime) { + public AppServiceCertificateOrderInner withLastCertificateIssuanceTime(DateTime lastCertificateIssuanceTime) { this.lastCertificateIssuanceTime = lastCertificateIssuanceTime; return this; } @@ -435,11 +441,31 @@ public DateTime expirationTime() { * Set the expirationTime value. * * @param expirationTime the expirationTime value to set - * @return the CertificateOrderInner object itself. + * @return the AppServiceCertificateOrderInner object itself. */ - public CertificateOrderInner withExpirationTime(DateTime expirationTime) { + public AppServiceCertificateOrderInner withExpirationTime(DateTime expirationTime) { this.expirationTime = expirationTime; return this; } + /** + * Get the isPrivateKeyExternal value. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set the isPrivateKeyExternal value. + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrdersInner.java similarity index 52% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrdersInner.java index a81e24655eae..e2a3221129b7 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceCertificateOrdersInner.java @@ -28,7 +28,6 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -39,77 +38,89 @@ /** * An instance of this class provides access to all the operations defined - * in CertificateOrders. + * in AppServiceCertificateOrders. */ -public final class CertificateOrdersInner { +public final class AppServiceCertificateOrdersInner { /** The Retrofit service to perform REST calls. */ - private CertificateOrdersService service; + private AppServiceCertificateOrdersService service; /** The service client containing this operation class. */ private WebSiteManagementClientImpl client; /** - * Initializes an instance of CertificateOrdersInner. + * Initializes an instance of AppServiceCertificateOrdersInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CertificateOrdersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(CertificateOrdersService.class); + public AppServiceCertificateOrdersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(AppServiceCertificateOrdersService.class); this.client = client; } /** - * The interface defining all the services for CertificateOrders to be + * The interface defining all the services for AppServiceCertificateOrders to be * used by Retrofit to perform actually REST calls. */ - interface CertificateOrdersService { + interface AppServiceCertificateOrdersService { + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") + Observable> validatePurchaseInformation(@Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateOrderInner appServiceCertificateOrder, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") + Observable> listCertificates(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") Observable> getCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") - Observable> createOrUpdateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateOrderCertificateInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") + Observable> beginCreateOrUpdateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}", method = "DELETE", hasBody = true) Observable> deleteCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") - Observable> updateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateOrderCertificateInner keyVaultCertificate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}") - Observable> getCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateOrderInner certificateDistinguishedName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}") - Observable> createOrUpdateCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateOrderInner certificateDistinguishedName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceCertificateOrderInner certificateDistinguishedName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}", method = "DELETE", hasBody = true) Observable> deleteCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}") - Observable> updateCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateOrderInner certificateDistinguishedName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") - Observable> getCertificateOrders(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") - Observable> getCertificates(@Path("resourceGroupName") String resourceGroupName, @Path("certificateOrderName") String certificateOrderName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/reissue") - Observable> reissueCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ReissueCertificateOrderRequestInner reissueCertificateOrderRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> reissue(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ReissueCertificateOrderRequestInner reissueCertificateOrderRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/renew") - Observable> renewCertificateOrder(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RenewCertificateOrderRequestInner renewCertificateOrderRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> renew(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RenewCertificateOrderRequestInner renewCertificateOrderRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/resendEmail") + Observable> resendCertificateEmail(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") @@ -119,97 +130,300 @@ interface CertificateOrdersService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") Observable> retrieveCertificateEmailHistory(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/resendEmail") - Observable> resendCertificateEmail(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/verifyDomainOwnership") Observable> verifyDomainOwnership(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getCertificateOrdersNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getCertificatesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCertificatesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } /** - * Get certificate associated with the certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @param name Certificate name - * @return the CertificateOrderCertificateInner object if successful. + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. */ - public CertificateOrderCertificateInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { - return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get certificate associated with the certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @param name Certificate name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get certificate associated with the certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @param name Certificate name - * @return the observable to the CertificateOrderCertificateInner object + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { - return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, CertificateOrderCertificateInner>() { + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the PagedList<AppServiceCertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validate certificate purchase information. + * Validate certificate purchase information. + * + * @param appServiceCertificateOrder Certificate order + * @return the Object object if successful. + */ + public Object validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder) { + return validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder).toBlocking().single().getBody(); + } + + /** + * Validate certificate purchase information. + * Validate certificate purchase information. + * + * @param appServiceCertificateOrder Certificate order + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder, final ServiceCallback serviceCallback) { + return ServiceCall.create(validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder), serviceCallback); + } + + /** + * Validate certificate purchase information. + * Validate certificate purchase information. + * + * @param appServiceCertificateOrder Certificate order + * @return the observable to the Object object + */ + public Observable validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder) { + return validatePurchaseInformationWithServiceResponseAsync(appServiceCertificateOrder).map(new Func1, Object>() { @Override - public CertificateOrderCertificateInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get certificate associated with the certificate order. + * Validate certificate purchase information. + * Validate certificate purchase information. + * + * @param appServiceCertificateOrder Certificate order + * @return the observable to the Object object + */ + public Observable> validatePurchaseInformationWithServiceResponseAsync(AppServiceCertificateOrderInner appServiceCertificateOrder) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appServiceCertificateOrder == null) { + throw new IllegalArgumentException("Parameter appServiceCertificateOrder is required and cannot be null."); + } + Validator.validate(appServiceCertificateOrder); + final String apiVersion = "2016-03-01"; + return service.validatePurchaseInformation(this.client.subscriptionId(), appServiceCertificateOrder, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validatePurchaseInformationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validatePurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. * * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @param name Certificate name - * @return the observable to the CertificateOrderCertificateInner object + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Azure resource group name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Azure resource group name + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable> getCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name) { + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + * @param resourceGroupName Azure resource group name + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get certificate orders in a resource group. + * Get certificate orders in a resource group. + * + ServiceResponse> * @param resourceGroupName Azure resource group name + * @return the PagedList<AppServiceCertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (certificateOrderName == null) { - throw new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-03-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getCertificateDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -217,94 +431,118 @@ public Observable> call(Respon }); } - private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name - * @param name Certificate name - * @param keyVaultCertificate Key Vault secret csm Id - * @return the CertificateOrderCertificateInner object if successful. + * @return the PagedList<AppServiceCertificateInner> object if successful. */ - public CertificateOrderCertificateInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { - return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().getBody(); + public PagedList listCertificates(final String resourceGroupName, final String certificateOrderName) { + ServiceResponse> response = listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name - * @param name Certificate name - * @param keyVaultCertificate Key Vault secret csm Id * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + public ServiceCall> listCertificatesAsync(final String resourceGroupName, final String certificateOrderName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name - * @param name Certificate name - * @param keyVaultCertificate Key Vault secret csm Id - * @return the observable to the CertificateOrderCertificateInner object + * @return the observable to the PagedList<AppServiceCertificateInner> object */ - public Observable createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { - return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, CertificateOrderCertificateInner>() { - @Override - public CertificateOrderCertificateInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listCertificatesAsync(final String resourceGroupName, final String certificateOrderName) { + return listCertificatesWithServiceResponseAsync(resourceGroupName, certificateOrderName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name - * @param name Certificate name - * @param keyVaultCertificate Key Vault secret csm Id - * @return the observable to the CertificateOrderCertificateInner object + * @return the observable to the PagedList<AppServiceCertificateInner> object */ - public Observable> createOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { + public Observable>> listCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { + return listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listCertificatesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * + ServiceResponse> * @param resourceGroupName Azure resource group name + ServiceResponse> * @param certificateOrderName Certificate name + * @return the PagedList<AppServiceCertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listCertificatesSinglePageAsync(final String resourceGroupName, final String certificateOrderName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (certificateOrderName == null) { throw new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (keyVaultCertificate == null) { - throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(keyVaultCertificate); - return service.createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-03-01"; + return service.listCertificates(resourceGroupName, certificateOrderName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateCertificateDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listCertificatesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -312,27 +550,29 @@ public Observable> call(Respon }); } - private ServiceResponse createOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Deletes the certificate associated with the certificate order. + * Get certificate associated with the certificate order. + * Get certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name - * @return the Object object if successful. + * @return the AppServiceCertificateInner object if successful. */ - public Object deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { - return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); + public AppServiceCertificateInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { + return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); } /** - * Deletes the certificate associated with the certificate order. + * Get certificate associated with the certificate order. + * Get certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name @@ -340,36 +580,38 @@ public Object deleteCertificate(String resourceGroupName, String certificateOrde * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); + public ServiceCall getCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); } /** - * Deletes the certificate associated with the certificate order. + * Get certificate associated with the certificate order. + * Get certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name - * @return the observable to the Object object + * @return the observable to the AppServiceCertificateInner object */ - public Observable deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { - return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, Object>() { + public Observable getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, AppServiceCertificateInner>() { @Override - public Object call(ServiceResponse response) { + public AppServiceCertificateInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes the certificate associated with the certificate order. + * Get certificate associated with the certificate order. + * Get certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name - * @return the observable to the Object object + * @return the observable to the AppServiceCertificateInner object */ - public Observable> deleteCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name) { + public Observable> getCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -382,15 +624,13 @@ public Observable> deleteCertificateWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-03-01"; + return service.getCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteCertificateDelegate(response); + ServiceResponse clientResponse = getCertificateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -399,27 +639,29 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name * @param keyVaultCertificate Key Vault secret csm Id - * @return the CertificateOrderCertificateInner object if successful. + * @return the AppServiceCertificateInner object if successful. */ - public CertificateOrderCertificateInner updateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { - return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().getBody(); + public AppServiceCertificateInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { + return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().last().getBody(); } /** + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name @@ -429,38 +671,40 @@ public CertificateOrderCertificateInner updateCertificate(String resourceGroupNa * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + public ServiceCall createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); } /** + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name * @param keyVaultCertificate Key Vault secret csm Id - * @return the observable to the CertificateOrderCertificateInner object + * @return the observable for the request */ - public Observable updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { - return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, CertificateOrderCertificateInner>() { + public Observable createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { + return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, AppServiceCertificateInner>() { @Override - public CertificateOrderCertificateInner call(ServiceResponse response) { + public AppServiceCertificateInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name * @param keyVaultCertificate Key Vault secret csm Id - * @return the observable to the CertificateOrderCertificateInner object + * @return the observable for the request */ - public Observable> updateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { + public Observable> createOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -476,96 +720,94 @@ public Observable> updateCerti if (keyVaultCertificate == null) { throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(keyVaultCertificate); - return service.updateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateCertificateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + final String apiVersion = "2016-03-01"; + Observable> observable = service.createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Get a certificate order. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @return the CertificateOrderInner object if successful. + * @param keyVaultCertificate Key Vault secret csm Id + * @return the AppServiceCertificateInner object if successful. */ - public CertificateOrderInner getCertificateOrder(String resourceGroupName, String name) { - return getCertificateOrderWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public AppServiceCertificateInner beginCreateOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().getBody(); } /** - * Get a certificate order. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name + * @param keyVaultCertificate Key Vault secret csm Id * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getCertificateOrderAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getCertificateOrderWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall beginCreateOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); } /** - * Get a certificate order. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @return the observable to the CertificateOrderInner object + * @param keyVaultCertificate Key Vault secret csm Id + * @return the observable to the AppServiceCertificateInner object */ - public Observable getCertificateOrderAsync(String resourceGroupName, String name) { - return getCertificateOrderWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CertificateOrderInner>() { + public Observable beginCreateOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).map(new Func1, AppServiceCertificateInner>() { @Override - public CertificateOrderInner call(ServiceResponse response) { + public AppServiceCertificateInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get a certificate order. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. + * Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @return the observable to the CertificateOrderInner object + * @param keyVaultCertificate Key Vault secret csm Id + * @return the observable to the AppServiceCertificateInner object */ - public Observable> getCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> beginCreateOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateInner keyVaultCertificate) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (certificateOrderName == null) { + throw new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."); + } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (keyVaultCertificate == null) { + throw new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null."); } - return service.getCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(keyVaultCertificate); + final String apiVersion = "2016-03-01"; + return service.beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getCertificateOrderDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateCertificateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -574,86 +816,87 @@ public Observable> call(Response getCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Create or update a certificate purchase order. + * Deletes the certificate associated with the certificate order. + * Deletes the certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the CertificateOrderInner object if successful. + * @return the Object object if successful. */ - public CertificateOrderInner createOrUpdateCertificateOrder(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { - return createOrUpdateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).toBlocking().single().getBody(); + public Object deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { + return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); } /** - * Create or update a certificate purchase order. + * Deletes the certificate associated with the certificate order. + * Deletes the certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateCertificateOrderAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName), serviceCallback); + public ServiceCall deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); } /** - * Create or update a certificate purchase order. + * Deletes the certificate associated with the certificate order. + * Deletes the certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the observable to the CertificateOrderInner object + * @return the observable to the Object object */ - public Observable createOrUpdateCertificateOrderAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { - return createOrUpdateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).map(new Func1, CertificateOrderInner>() { + public Observable deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1, Object>() { @Override - public CertificateOrderInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create or update a certificate purchase order. + * Deletes the certificate associated with the certificate order. + * Deletes the certificate associated with the certificate order. * * @param resourceGroupName Azure resource group name + * @param certificateOrderName Certificate name * @param name Certificate name - * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the observable to the CertificateOrderInner object + * @return the observable to the Object object */ - public Observable> createOrUpdateCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { + public Observable> deleteCertificateWithServiceResponseAsync(String resourceGroupName, String certificateOrderName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (certificateOrderName == null) { + throw new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."); + } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (certificateDistinguishedName == null) { - throw new IllegalArgumentException("Parameter certificateDistinguishedName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(certificateDistinguishedName); - return service.createOrUpdateCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), certificateDistinguishedName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-03-01"; + return service.deleteCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateCertificateOrderDelegate(response); + ServiceResponse clientResponse = deleteCertificateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -662,60 +905,64 @@ public Observable> call(Response createOrUpdateCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete an existing certificate order. + * Get a certificate order. + * Get a certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate name - * @return the Object object if successful. + * @return the AppServiceCertificateOrderInner object if successful. */ - public Object deleteCertificateOrder(String resourceGroupName, String name) { - return deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public AppServiceCertificateOrderInner get(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Delete an existing certificate order. + * Get a certificate order. + * Get a certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteCertificateOrderAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Delete an existing certificate order. + * Get a certificate order. + * Get a certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate name - * @return the observable to the Object object + * @return the observable to the AppServiceCertificateOrderInner object */ - public Observable deleteCertificateOrderAsync(String resourceGroupName, String name) { - return deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AppServiceCertificateOrderInner>() { @Override - public Object call(ServiceResponse response) { + public AppServiceCertificateOrderInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete an existing certificate order. + * Get a certificate order. + * Get a certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate name - * @return the observable to the Object object + * @return the observable to the AppServiceCertificateOrderInner object */ - public Observable> deleteCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -725,15 +972,13 @@ public Observable> deleteCertificateOrderWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-03-01"; + return service.get(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteCertificateOrderDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -742,26 +987,28 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Create or update a certificate purchase order. * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name * @param name Certificate name * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the CertificateOrderInner object if successful. + * @return the AppServiceCertificateOrderInner object if successful. */ - public CertificateOrderInner updateCertificateOrder(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { - return updateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).toBlocking().single().getBody(); + public AppServiceCertificateOrderInner createOrUpdate(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).toBlocking().last().getBody(); } /** + * Create or update a certificate purchase order. * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name @@ -770,36 +1017,38 @@ public CertificateOrderInner updateCertificateOrder(String resourceGroupName, St * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateCertificateOrderAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName), serviceCallback); } /** + * Create or update a certificate purchase order. * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name * @param name Certificate name * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the observable to the CertificateOrderInner object + * @return the observable for the request */ - public Observable updateCertificateOrderAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { - return updateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).map(new Func1, CertificateOrderInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).map(new Func1, AppServiceCertificateOrderInner>() { @Override - public CertificateOrderInner call(ServiceResponse response) { + public AppServiceCertificateOrderInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Create or update a certificate purchase order. * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name * @param name Certificate name * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @return the observable to the CertificateOrderInner object + * @return the observable for the request */ - public Observable> updateCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -812,125 +1061,88 @@ public Observable> updateCertificateOrder if (certificateDistinguishedName == null) { throw new IllegalArgumentException("Parameter certificateDistinguishedName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(certificateDistinguishedName); - return service.updateCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), certificateDistinguishedName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateCertificateOrderDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + final String apiVersion = "2016-03-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), certificateDistinguishedName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Get certificate orders in a resource group. + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name - * @return the PagedList<CertificateOrderInner> object if successful. + * @param name Certificate name + * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate + * @return the AppServiceCertificateOrderInner object if successful. */ - public PagedList getCertificateOrders(final String resourceGroupName) { - ServiceResponse> response = getCertificateOrdersSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public AppServiceCertificateOrderInner beginCreateOrUpdate(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).toBlocking().single().getBody(); } /** - * Get certificate orders in a resource group. + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name + * @param name Certificate name + * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificateOrdersAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getCertificateOrdersSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getCertificateOrdersNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName), serviceCallback); } /** - * Get certificate orders in a resource group. + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name - * @return the observable to the PagedList<CertificateOrderInner> object + * @param name Certificate name + * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate + * @return the observable to the AppServiceCertificateOrderInner object */ - public Observable> getCertificateOrdersAsync(final String resourceGroupName) { - return getCertificateOrdersWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).map(new Func1, AppServiceCertificateOrderInner>() { + @Override + public AppServiceCertificateOrderInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get certificate orders in a resource group. + * Create or update a certificate purchase order. + * Create or update a certificate purchase order. * * @param resourceGroupName Azure resource group name - * @return the observable to the PagedList<CertificateOrderInner> object - */ - public Observable>> getCertificateOrdersWithServiceResponseAsync(final String resourceGroupName) { - return getCertificateOrdersSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getCertificateOrdersNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get certificate orders in a resource group. - * - ServiceResponse> * @param resourceGroupName Azure resource group name - * @return the PagedList<CertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Certificate name + * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate + * @return the observable to the AppServiceCertificateOrderInner object */ - public Observable>> getCertificateOrdersSinglePageAsync(final String resourceGroupName) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceCertificateOrderInner certificateDistinguishedName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (certificateDistinguishedName == null) { + throw new IllegalArgumentException("Parameter certificateDistinguishedName is required and cannot be null."); } - return service.getCertificateOrders(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(certificateDistinguishedName); + final String apiVersion = "2016-03-01"; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), certificateDistinguishedName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getCertificateOrdersDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -938,115 +1150,81 @@ public Observable>> call(Response> getCertificateOrdersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * Delete an existing certificate order. + * Delete an existing certificate order. * * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @return the PagedList<CertificateOrderCertificateInner> object if successful. + * @param name Certificate name + * @return the Object object if successful. */ - public PagedList getCertificates(final String resourceGroupName, final String certificateOrderName) { - ServiceResponse> response = getCertificatesSinglePageAsync(resourceGroupName, certificateOrderName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object deleteCertificateOrder(String resourceGroupName, String name) { + return deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * Delete an existing certificate order. + * Delete an existing certificate order. * * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name + * @param name Certificate name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificatesAsync(final String resourceGroupName, final String certificateOrderName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getCertificatesSinglePageAsync(resourceGroupName, certificateOrderName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). - * - * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @return the observable to the PagedList<CertificateOrderCertificateInner> object - */ - public Observable> getCertificatesAsync(final String resourceGroupName, final String certificateOrderName) { - return getCertificatesWithServiceResponseAsync(resourceGroupName, certificateOrderName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall deleteCertificateOrderAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * Delete an existing certificate order. + * Delete an existing certificate order. * * @param resourceGroupName Azure resource group name - * @param certificateOrderName Certificate name - * @return the observable to the PagedList<CertificateOrderCertificateInner> object + * @param name Certificate name + * @return the observable to the Object object */ - public Observable>> getCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { - return getCertificatesSinglePageAsync(resourceGroupName, certificateOrderName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getCertificatesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable deleteCertificateOrderAsync(String resourceGroupName, String name) { + return deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). + * Delete an existing certificate order. + * Delete an existing certificate order. * - ServiceResponse> * @param resourceGroupName Azure resource group name - ServiceResponse> * @param certificateOrderName Certificate name - * @return the PagedList<CertificateOrderCertificateInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName Azure resource group name + * @param name Certificate name + * @return the observable to the Object object */ - public Observable>> getCertificatesSinglePageAsync(final String resourceGroupName, final String certificateOrderName) { + public Observable> deleteCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (certificateOrderName == null) { - throw new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null."); + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCertificates(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-03-01"; + return service.deleteCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getCertificatesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = deleteCertificateOrderDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1054,14 +1232,15 @@ public Observable>> call( }); } - private ServiceResponse> getCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse deleteCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Reissue an existing certificate order. * Reissue an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1069,11 +1248,12 @@ private ServiceResponse> getCertifica * @param reissueCertificateOrderRequest Reissue parameters * @return the Object object if successful. */ - public Object reissueCertificateOrder(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { - return reissueCertificateOrderWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest).toBlocking().single().getBody(); + public Object reissue(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + return reissueWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest).toBlocking().single().getBody(); } /** + * Reissue an existing certificate order. * Reissue an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1082,11 +1262,12 @@ public Object reissueCertificateOrder(String resourceGroupName, String name, Rei * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall reissueCertificateOrderAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest, final ServiceCallback serviceCallback) { - return ServiceCall.create(reissueCertificateOrderWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest), serviceCallback); + public ServiceCall reissueAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceCall.create(reissueWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest), serviceCallback); } /** + * Reissue an existing certificate order. * Reissue an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1094,8 +1275,8 @@ public ServiceCall reissueCertificateOrderAsync(String resourceGroupName * @param reissueCertificateOrderRequest Reissue parameters * @return the observable to the Object object */ - public Observable reissueCertificateOrderAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { - return reissueCertificateOrderWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest).map(new Func1, Object>() { + public Observable reissueAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + return reissueWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -1104,6 +1285,7 @@ public Object call(ServiceResponse response) { } /** + * Reissue an existing certificate order. * Reissue an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1111,7 +1293,7 @@ public Object call(ServiceResponse response) { * @param reissueCertificateOrderRequest Reissue parameters * @return the observable to the Object object */ - public Observable> reissueCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { + public Observable> reissueWithServiceResponseAsync(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1124,16 +1306,14 @@ public Observable> reissueCertificateOrderWithServiceRes if (reissueCertificateOrderRequest == null) { throw new IllegalArgumentException("Parameter reissueCertificateOrderRequest is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(reissueCertificateOrderRequest); - return service.reissueCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), reissueCertificateOrderRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.reissue(resourceGroupName, name, this.client.subscriptionId(), reissueCertificateOrderRequest, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = reissueCertificateOrderDelegate(response); + ServiceResponse clientResponse = reissueDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1142,7 +1322,7 @@ public Observable> call(Response response) }); } - private ServiceResponse reissueCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse reissueDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1150,6 +1330,7 @@ private ServiceResponse reissueCertificateOrderDelegate(Response reissueCertificateOrderDelegate(Response renewCertificateOrderAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest, final ServiceCallback serviceCallback) { - return ServiceCall.create(renewCertificateOrderWithServiceResponseAsync(resourceGroupName, name, renewCertificateOrderRequest), serviceCallback); + public ServiceCall renewAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceCall.create(renewWithServiceResponseAsync(resourceGroupName, name, renewCertificateOrderRequest), serviceCallback); } /** + * Renew an existing certificate order. * Renew an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1182,8 +1365,8 @@ public ServiceCall renewCertificateOrderAsync(String resourceGroupName, * @param renewCertificateOrderRequest Renew parameters * @return the observable to the Object object */ - public Observable renewCertificateOrderAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { - return renewCertificateOrderWithServiceResponseAsync(resourceGroupName, name, renewCertificateOrderRequest).map(new Func1, Object>() { + public Observable renewAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { + return renewWithServiceResponseAsync(resourceGroupName, name, renewCertificateOrderRequest).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -1192,6 +1375,7 @@ public Object call(ServiceResponse response) { } /** + * Renew an existing certificate order. * Renew an existing certificate order. * * @param resourceGroupName Azure resource group name @@ -1199,7 +1383,7 @@ public Object call(ServiceResponse response) { * @param renewCertificateOrderRequest Renew parameters * @return the observable to the Object object */ - public Observable> renewCertificateOrderWithServiceResponseAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { + public Observable> renewWithServiceResponseAsync(String resourceGroupName, String name, RenewCertificateOrderRequestInner renewCertificateOrderRequest) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1212,16 +1396,96 @@ public Observable> renewCertificateOrderWithServiceRespo if (renewCertificateOrderRequest == null) { throw new IllegalArgumentException("Parameter renewCertificateOrderRequest is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(renewCertificateOrderRequest); - return service.renewCertificateOrder(resourceGroupName, name, this.client.subscriptionId(), renewCertificateOrderRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.renew(resourceGroupName, name, this.client.subscriptionId(), renewCertificateOrderRequest, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = renewDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse renewDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Azure resource group name + * @param name Certificate order name + * @return the Object object if successful. + */ + public Object resendCertificateEmail(String resourceGroupName, String name) { + return resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Azure resource group name + * @param name Certificate order name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall resendCertificateEmailAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Azure resource group name + * @param name Certificate order name + * @return the observable to the Object object + */ + public Observable resendCertificateEmailAsync(String resourceGroupName, String name) { + return resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Resend certificate email. + * Resend certificate email. + * + * @param resourceGroupName Azure resource group name + * @param name Certificate order name + * @return the observable to the Object object + */ + public Observable> resendCertificateEmailWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.resendCertificateEmail(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = renewCertificateOrderDelegate(response); + ServiceResponse clientResponse = resendCertificateEmailDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1230,7 +1494,7 @@ public Observable> call(Response response) }); } - private ServiceResponse renewCertificateOrderDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse resendCertificateEmailDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1238,6 +1502,7 @@ private ServiceResponse renewCertificateOrderDelegate(Response retrieveCertificateActions(String resou } /** + * Retrieve the list of certificate actions. * Retrieve the list of certificate actions. * * @param resourceGroupName Azure resource group name @@ -1261,6 +1527,7 @@ public ServiceCall> retrieveCertificateActions } /** + * Retrieve the list of certificate actions. * Retrieve the list of certificate actions. * * @param resourceGroupName Azure resource group name @@ -1277,6 +1544,7 @@ public List call(ServiceResponse>> retrieveCe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.retrieveCertificateActions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.retrieveCertificateActions(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1318,6 +1584,7 @@ private ServiceResponse> retrieveCertificateAc } /** + * Retrive email history. * Retrive email history. * * @param resourceGroupName Azure resource group name @@ -1329,6 +1596,7 @@ public List retrieveCertificateEmailHistory(String resour } /** + * Retrive email history. * Retrive email history. * * @param resourceGroupName Azure resource group name @@ -1341,6 +1609,7 @@ public ServiceCall> retrieveCertificateEmailHistoryA } /** + * Retrive email history. * Retrive email history. * * @param resourceGroupName Azure resource group name @@ -1357,6 +1626,7 @@ public List call(ServiceResponse>> retrieveCertific if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.retrieveCertificateEmailHistory(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.retrieveCertificateEmailHistory(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1398,37 +1666,40 @@ private ServiceResponse> retrieveCertificateEmailHis } /** - * Resend certificate email. + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate order name * @return the Object object if successful. */ - public Object resendCertificateEmail(String resourceGroupName, String name) { - return resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object verifyDomainOwnership(String resourceGroupName, String name) { + return verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Resend certificate email. + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate order name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall resendCertificateEmailAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall verifyDomainOwnershipAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Resend certificate email. + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate order name * @return the observable to the Object object */ - public Observable resendCertificateEmailAsync(String resourceGroupName, String name) { - return resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable verifyDomainOwnershipAsync(String resourceGroupName, String name) { + return verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -1437,13 +1708,14 @@ public Object call(ServiceResponse response) { } /** - * Resend certificate email. + * Verify domain ownership for this certificate order. + * Verify domain ownership for this certificate order. * * @param resourceGroupName Azure resource group name * @param name Certificate order name * @return the observable to the Object object */ - public Observable> resendCertificateEmailWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> verifyDomainOwnershipWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1453,15 +1725,13 @@ public Observable> resendCertificateEmailWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.resendCertificateEmail(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.verifyDomainOwnership(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = resendCertificateEmailDelegate(response); + ServiceResponse clientResponse = verifyDomainOwnershipDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1470,7 +1740,7 @@ public Observable> call(Response response) }); } - private ServiceResponse resendCertificateEmailDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse verifyDomainOwnershipDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1478,71 +1748,99 @@ private ServiceResponse resendCertificateEmailDelegate(Response listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Verify domain ownership for this certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param name Certificate order name + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall verifyDomainOwnershipAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Verify domain ownership for this certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param name Certificate order name - * @return the observable to the Object object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable verifyDomainOwnershipAsync(String resourceGroupName, String name) { - return verifyDomainOwnershipWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Verify domain ownership for this certificate order. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Azure resource group name - * @param name Certificate order name - * @return the observable to the Object object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable> verifyDomainOwnershipWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServiceCertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.verifyDomainOwnership(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = verifyDomainOwnershipDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1550,30 +1848,32 @@ public Observable> call(Response response) }); } - private ServiceResponse verifyDomainOwnershipDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Get certificate orders in a resource group. * Get certificate orders in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderInner> object if successful. + * @return the PagedList<AppServiceCertificateOrderInner> object if successful. */ - public PagedList getCertificateOrdersNext(final String nextPageLink) { - ServiceResponse> response = getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Get certificate orders in a resource group. * Get certificate orders in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -1581,71 +1881,74 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificateOrdersNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getCertificateOrdersNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getCertificateOrdersNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Get certificate orders in a resource group. * Get certificate orders in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderInner> object + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable> getCertificateOrdersNextAsync(final String nextPageLink) { - return getCertificateOrdersNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** + * Get certificate orders in a resource group. * Get certificate orders in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderInner> object + * @return the observable to the PagedList<AppServiceCertificateOrderInner> object */ - public Observable>> getCertificateOrdersNextWithServiceResponseAsync(final String nextPageLink) { - return getCertificateOrdersNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getCertificateOrdersNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Get certificate orders in a resource group. * Get certificate orders in a resource group. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServiceCertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getCertificateOrdersNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getCertificateOrdersNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getCertificateOrdersNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1653,30 +1956,32 @@ public Observable>> call(Response> getCertificateOrdersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderCertificateInner> object if successful. + * @return the PagedList<AppServiceCertificateInner> object if successful. */ - public PagedList getCertificatesNext(final String nextPageLink) { - ServiceResponse> response = getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listCertificatesNext(final String nextPageLink) { + ServiceResponse> response = listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -1684,71 +1989,74 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificatesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listCertificatesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getCertificatesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listCertificatesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderCertificateInner> object + * @return the observable to the PagedList<AppServiceCertificateInner> object */ - public Observable> getCertificatesNextAsync(final String nextPageLink) { - return getCertificatesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listCertificatesNextAsync(final String nextPageLink) { + return listCertificatesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderCertificateInner> object + * @return the observable to the PagedList<AppServiceCertificateInner> object */ - public Observable>> getCertificatesNextWithServiceResponseAsync(final String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listCertificatesNextWithServiceResponseAsync(final String nextPageLink) { + return listCertificatesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getCertificatesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listCertificatesNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderCertificateInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServiceCertificateInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getCertificatesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listCertificatesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getCertificatesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listCertificatesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getCertificatesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listCertificatesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1756,9 +2064,9 @@ public Observable>> call( }); } - private ServiceResponse> getCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentInner.java similarity index 72% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentInner.java index de7c6ff978db..adfbf73851c3 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentInner.java @@ -24,19 +24,19 @@ * Description of an hostingEnvironment (App Service Environment). */ @JsonFlatten -public class HostingEnvironmentInner extends Resource { +public class AppServiceEnvironmentInner extends Resource { /** * Name of the hostingEnvironment (App Service Environment). */ @JsonProperty(value = "properties.name") - private String hostingEnvironmentName; + private String appServiceEnvironmentName; /** * Location of the hostingEnvironment (App Service Environment), e.g. * "West US". */ @JsonProperty(value = "properties.location") - private String hostingEnvironmentLocation; + private String appServiceEnvironmentLocation; /** * Provisioning state of the hostingEnvironment (App Service Environment). @@ -224,7 +224,13 @@ public class HostingEnvironmentInner extends Resource { private String resourceGroup; /** - * Api Management Account associated with this Hosting Environment. + * Scale Factor for FrontEnds. + */ + @JsonProperty(value = "properties.frontEndScaleFactor") + private Integer frontEndScaleFactor; + + /** + * The apiManagementAccountId property. */ @JsonProperty(value = "properties.apiManagementAccountId") private String apiManagementAccountId; @@ -238,6 +244,15 @@ public class HostingEnvironmentInner extends Resource { @JsonProperty(value = "properties.suspended") private Boolean suspended; + /** + * True/false indicating whether the hostingEnvironment is suspended. The + * environment can be suspended e.g. when the management endpoint is no + * longer available + * (most likely because NSG blocked the incoming traffic). + */ + @JsonProperty(value = "properties.dynamicCacheEnabled") + private Boolean dynamicCacheEnabled; + /** * Custom settings for changing the behavior of the hosting environment. */ @@ -245,42 +260,42 @@ public class HostingEnvironmentInner extends Resource { private List clusterSettings; /** - * Get the hostingEnvironmentName value. + * Get the appServiceEnvironmentName value. * - * @return the hostingEnvironmentName value + * @return the appServiceEnvironmentName value */ - public String hostingEnvironmentName() { - return this.hostingEnvironmentName; + public String appServiceEnvironmentName() { + return this.appServiceEnvironmentName; } /** - * Set the hostingEnvironmentName value. + * Set the appServiceEnvironmentName value. * - * @param hostingEnvironmentName the hostingEnvironmentName value to set - * @return the HostingEnvironmentInner object itself. + * @param appServiceEnvironmentName the appServiceEnvironmentName value to set + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withHostingEnvironmentName(String hostingEnvironmentName) { - this.hostingEnvironmentName = hostingEnvironmentName; + public AppServiceEnvironmentInner withAppServiceEnvironmentName(String appServiceEnvironmentName) { + this.appServiceEnvironmentName = appServiceEnvironmentName; return this; } /** - * Get the hostingEnvironmentLocation value. + * Get the appServiceEnvironmentLocation value. * - * @return the hostingEnvironmentLocation value + * @return the appServiceEnvironmentLocation value */ - public String hostingEnvironmentLocation() { - return this.hostingEnvironmentLocation; + public String appServiceEnvironmentLocation() { + return this.appServiceEnvironmentLocation; } /** - * Set the hostingEnvironmentLocation value. + * Set the appServiceEnvironmentLocation value. * - * @param hostingEnvironmentLocation the hostingEnvironmentLocation value to set - * @return the HostingEnvironmentInner object itself. + * @param appServiceEnvironmentLocation the appServiceEnvironmentLocation value to set + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withHostingEnvironmentLocation(String hostingEnvironmentLocation) { - this.hostingEnvironmentLocation = hostingEnvironmentLocation; + public AppServiceEnvironmentInner withAppServiceEnvironmentLocation(String appServiceEnvironmentLocation) { + this.appServiceEnvironmentLocation = appServiceEnvironmentLocation; return this; } @@ -297,9 +312,9 @@ public ProvisioningState provisioningState() { * Set the provisioningState value. * * @param provisioningState the provisioningState value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withProvisioningState(ProvisioningState provisioningState) { + public AppServiceEnvironmentInner withProvisioningState(ProvisioningState provisioningState) { this.provisioningState = provisioningState; return this; } @@ -317,9 +332,9 @@ public HostingEnvironmentStatus status() { * Set the status value. * * @param status the status value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withStatus(HostingEnvironmentStatus status) { + public AppServiceEnvironmentInner withStatus(HostingEnvironmentStatus status) { this.status = status; return this; } @@ -337,9 +352,9 @@ public String vnetName() { * Set the vnetName value. * * @param vnetName the vnetName value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withVnetName(String vnetName) { + public AppServiceEnvironmentInner withVnetName(String vnetName) { this.vnetName = vnetName; return this; } @@ -357,9 +372,9 @@ public String vnetResourceGroupName() { * Set the vnetResourceGroupName value. * * @param vnetResourceGroupName the vnetResourceGroupName value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withVnetResourceGroupName(String vnetResourceGroupName) { + public AppServiceEnvironmentInner withVnetResourceGroupName(String vnetResourceGroupName) { this.vnetResourceGroupName = vnetResourceGroupName; return this; } @@ -377,9 +392,9 @@ public String vnetSubnetName() { * Set the vnetSubnetName value. * * @param vnetSubnetName the vnetSubnetName value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withVnetSubnetName(String vnetSubnetName) { + public AppServiceEnvironmentInner withVnetSubnetName(String vnetSubnetName) { this.vnetSubnetName = vnetSubnetName; return this; } @@ -397,9 +412,9 @@ public VirtualNetworkProfile virtualNetwork() { * Set the virtualNetwork value. * * @param virtualNetwork the virtualNetwork value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + public AppServiceEnvironmentInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { this.virtualNetwork = virtualNetwork; return this; } @@ -417,9 +432,9 @@ public InternalLoadBalancingMode internalLoadBalancingMode() { * Set the internalLoadBalancingMode value. * * @param internalLoadBalancingMode the internalLoadBalancingMode value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + public AppServiceEnvironmentInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { this.internalLoadBalancingMode = internalLoadBalancingMode; return this; } @@ -437,9 +452,9 @@ public String multiSize() { * Set the multiSize value. * * @param multiSize the multiSize value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withMultiSize(String multiSize) { + public AppServiceEnvironmentInner withMultiSize(String multiSize) { this.multiSize = multiSize; return this; } @@ -457,9 +472,9 @@ public Integer multiRoleCount() { * Set the multiRoleCount value. * * @param multiRoleCount the multiRoleCount value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withMultiRoleCount(Integer multiRoleCount) { + public AppServiceEnvironmentInner withMultiRoleCount(Integer multiRoleCount) { this.multiRoleCount = multiRoleCount; return this; } @@ -477,9 +492,9 @@ public List workerPools() { * Set the workerPools value. * * @param workerPools the workerPools value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withWorkerPools(List workerPools) { + public AppServiceEnvironmentInner withWorkerPools(List workerPools) { this.workerPools = workerPools; return this; } @@ -497,9 +512,9 @@ public Integer ipsslAddressCount() { * Set the ipsslAddressCount value. * * @param ipsslAddressCount the ipsslAddressCount value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withIpsslAddressCount(Integer ipsslAddressCount) { + public AppServiceEnvironmentInner withIpsslAddressCount(Integer ipsslAddressCount) { this.ipsslAddressCount = ipsslAddressCount; return this; } @@ -517,9 +532,9 @@ public String databaseEdition() { * Set the databaseEdition value. * * @param databaseEdition the databaseEdition value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withDatabaseEdition(String databaseEdition) { + public AppServiceEnvironmentInner withDatabaseEdition(String databaseEdition) { this.databaseEdition = databaseEdition; return this; } @@ -537,9 +552,9 @@ public String databaseServiceObjective() { * Set the databaseServiceObjective value. * * @param databaseServiceObjective the databaseServiceObjective value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withDatabaseServiceObjective(String databaseServiceObjective) { + public AppServiceEnvironmentInner withDatabaseServiceObjective(String databaseServiceObjective) { this.databaseServiceObjective = databaseServiceObjective; return this; } @@ -557,9 +572,9 @@ public Integer upgradeDomains() { * Set the upgradeDomains value. * * @param upgradeDomains the upgradeDomains value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withUpgradeDomains(Integer upgradeDomains) { + public AppServiceEnvironmentInner withUpgradeDomains(Integer upgradeDomains) { this.upgradeDomains = upgradeDomains; return this; } @@ -577,9 +592,9 @@ public String subscriptionId() { * Set the subscriptionId value. * * @param subscriptionId the subscriptionId value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withSubscriptionId(String subscriptionId) { + public AppServiceEnvironmentInner withSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -597,9 +612,9 @@ public String dnsSuffix() { * Set the dnsSuffix value. * * @param dnsSuffix the dnsSuffix value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withDnsSuffix(String dnsSuffix) { + public AppServiceEnvironmentInner withDnsSuffix(String dnsSuffix) { this.dnsSuffix = dnsSuffix; return this; } @@ -617,9 +632,9 @@ public String lastAction() { * Set the lastAction value. * * @param lastAction the lastAction value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withLastAction(String lastAction) { + public AppServiceEnvironmentInner withLastAction(String lastAction) { this.lastAction = lastAction; return this; } @@ -637,9 +652,9 @@ public String lastActionResult() { * Set the lastActionResult value. * * @param lastActionResult the lastActionResult value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withLastActionResult(String lastActionResult) { + public AppServiceEnvironmentInner withLastActionResult(String lastActionResult) { this.lastActionResult = lastActionResult; return this; } @@ -657,9 +672,9 @@ public String allowedMultiSizes() { * Set the allowedMultiSizes value. * * @param allowedMultiSizes the allowedMultiSizes value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withAllowedMultiSizes(String allowedMultiSizes) { + public AppServiceEnvironmentInner withAllowedMultiSizes(String allowedMultiSizes) { this.allowedMultiSizes = allowedMultiSizes; return this; } @@ -677,9 +692,9 @@ public String allowedWorkerSizes() { * Set the allowedWorkerSizes value. * * @param allowedWorkerSizes the allowedWorkerSizes value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withAllowedWorkerSizes(String allowedWorkerSizes) { + public AppServiceEnvironmentInner withAllowedWorkerSizes(String allowedWorkerSizes) { this.allowedWorkerSizes = allowedWorkerSizes; return this; } @@ -697,9 +712,9 @@ public Integer maximumNumberOfMachines() { * Set the maximumNumberOfMachines value. * * @param maximumNumberOfMachines the maximumNumberOfMachines value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withMaximumNumberOfMachines(Integer maximumNumberOfMachines) { + public AppServiceEnvironmentInner withMaximumNumberOfMachines(Integer maximumNumberOfMachines) { this.maximumNumberOfMachines = maximumNumberOfMachines; return this; } @@ -717,9 +732,9 @@ public List vipMappings() { * Set the vipMappings value. * * @param vipMappings the vipMappings value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withVipMappings(List vipMappings) { + public AppServiceEnvironmentInner withVipMappings(List vipMappings) { this.vipMappings = vipMappings; return this; } @@ -737,9 +752,9 @@ public List environmentCapacities() { * Set the environmentCapacities value. * * @param environmentCapacities the environmentCapacities value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withEnvironmentCapacities(List environmentCapacities) { + public AppServiceEnvironmentInner withEnvironmentCapacities(List environmentCapacities) { this.environmentCapacities = environmentCapacities; return this; } @@ -757,9 +772,9 @@ public List networkAccessControlList() { * Set the networkAccessControlList value. * * @param networkAccessControlList the networkAccessControlList value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withNetworkAccessControlList(List networkAccessControlList) { + public AppServiceEnvironmentInner withNetworkAccessControlList(List networkAccessControlList) { this.networkAccessControlList = networkAccessControlList; return this; } @@ -777,9 +792,9 @@ public Boolean environmentIsHealthy() { * Set the environmentIsHealthy value. * * @param environmentIsHealthy the environmentIsHealthy value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withEnvironmentIsHealthy(Boolean environmentIsHealthy) { + public AppServiceEnvironmentInner withEnvironmentIsHealthy(Boolean environmentIsHealthy) { this.environmentIsHealthy = environmentIsHealthy; return this; } @@ -797,9 +812,9 @@ public String environmentStatus() { * Set the environmentStatus value. * * @param environmentStatus the environmentStatus value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withEnvironmentStatus(String environmentStatus) { + public AppServiceEnvironmentInner withEnvironmentStatus(String environmentStatus) { this.environmentStatus = environmentStatus; return this; } @@ -817,13 +832,33 @@ public String resourceGroup() { * Set the resourceGroup value. * * @param resourceGroup the resourceGroup value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withResourceGroup(String resourceGroup) { + public AppServiceEnvironmentInner withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } + /** + * Get the frontEndScaleFactor value. + * + * @return the frontEndScaleFactor value + */ + public Integer frontEndScaleFactor() { + return this.frontEndScaleFactor; + } + + /** + * Set the frontEndScaleFactor value. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + /** * Get the apiManagementAccountId value. * @@ -837,9 +872,9 @@ public String apiManagementAccountId() { * Set the apiManagementAccountId value. * * @param apiManagementAccountId the apiManagementAccountId value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withApiManagementAccountId(String apiManagementAccountId) { + public AppServiceEnvironmentInner withApiManagementAccountId(String apiManagementAccountId) { this.apiManagementAccountId = apiManagementAccountId; return this; } @@ -857,13 +892,33 @@ public Boolean suspended() { * Set the suspended value. * * @param suspended the suspended value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withSuspended(Boolean suspended) { + public AppServiceEnvironmentInner withSuspended(Boolean suspended) { this.suspended = suspended; return this; } + /** + * Get the dynamicCacheEnabled value. + * + * @return the dynamicCacheEnabled value + */ + public Boolean dynamicCacheEnabled() { + return this.dynamicCacheEnabled; + } + + /** + * Set the dynamicCacheEnabled value. + * + * @param dynamicCacheEnabled the dynamicCacheEnabled value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + /** * Get the clusterSettings value. * @@ -877,9 +932,9 @@ public List clusterSettings() { * Set the clusterSettings value. * * @param clusterSettings the clusterSettings value to set - * @return the HostingEnvironmentInner object itself. + * @return the AppServiceEnvironmentInner object itself. */ - public HostingEnvironmentInner withClusterSettings(List clusterSettings) { + public AppServiceEnvironmentInner withClusterSettings(List clusterSettings) { this.clusterSettings = clusterSettings; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentsInner.java similarity index 59% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentsInner.java index dbe31b3792bf..79ca49a61241 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServiceEnvironmentsInner.java @@ -39,153 +39,165 @@ /** * An instance of this class provides access to all the operations defined - * in HostingEnvironments. + * in AppServiceEnvironments. */ -public final class HostingEnvironmentsInner { +public final class AppServiceEnvironmentsInner { /** The Retrofit service to perform REST calls. */ - private HostingEnvironmentsService service; + private AppServiceEnvironmentsService service; /** The service client containing this operation class. */ private WebSiteManagementClientImpl client; /** - * Initializes an instance of HostingEnvironmentsInner. + * Initializes an instance of AppServiceEnvironmentsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public HostingEnvironmentsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(HostingEnvironmentsService.class); + public AppServiceEnvironmentsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(AppServiceEnvironmentsService.class); this.client = client; } /** - * The interface defining all the services for HostingEnvironments to be + * The interface defining all the services for AppServiceEnvironments to be * used by Retrofit to perform actually REST calls. */ - interface HostingEnvironmentsService { + interface AppServiceEnvironmentsService { + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") - Observable> getHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") - Observable> createOrUpdateHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body HostingEnvironmentInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceEnvironmentInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") - Observable> beginCreateOrUpdateHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body HostingEnvironmentInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServiceEnvironmentInner hostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}", method = "DELETE", hasBody = true) - Observable> deleteHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}", method = "DELETE", hasBody = true) - Observable> beginDeleteHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") + Observable> listCapacities(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") + Observable> listVips(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") - Observable> getHostingEnvironmentDiagnostics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listDiagnostics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") - Observable> getHostingEnvironmentDiagnosticsItem(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("diagnosticsName") String diagnosticsName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getDiagnosticsItem(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("diagnosticsName") String diagnosticsName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") - Observable> getHostingEnvironmentCapacities(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions") + Observable> listMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") - Observable> getHostingEnvironmentVips(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics") + Observable> listMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") - Observable> getHostingEnvironments(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") + Observable> listMultiRolePools(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") - Observable> rebootHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") + Observable> getMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") - Observable> getHostingEnvironmentOperations(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") + Observable> createOrUpdateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations/{operationId}") - Observable> getHostingEnvironmentOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") + Observable> beginCreateOrUpdateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics") - Observable> getHostingEnvironmentMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") + Observable> listMultiRolePoolInstanceMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions") - Observable> getHostingEnvironmentMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics") + Observable> listMultiRolePoolInstanceMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") - Observable> getHostingEnvironmentUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") + Observable> listMultiRoleMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics") - Observable> getHostingEnvironmentMultiRoleMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("startTime") String startTime, @Query("endTime") String endTime, @Query("timeGrain") String timeGrain, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRoleMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("startTime") String startTime, @Query("endTime") String endTime, @Query("timeGrain") String timeGrain, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics") - Observable> getHostingEnvironmentWebWorkerMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") + Observable> listMultiRolePoolSkus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") - Observable> getHostingEnvironmentMultiRoleMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") + Observable> listMultiRoleUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") - Observable> getHostingEnvironmentWebWorkerMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") + Observable> listOperations(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") - Observable> getHostingEnvironmentMultiRoleUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations/{operationId}") + Observable> getOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") - Observable> getHostingEnvironmentWebWorkerUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") + Observable> reboot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") - Observable> getHostingEnvironmentSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") + Observable> resume(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/webhostingplans") - Observable> getHostingEnvironmentWebHostingPlans(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") + Observable> beginResume(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") - Observable> getHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") - Observable> getMultiRolePools(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAppServicePlans(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") - Observable> getMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") + Observable> listWebApps(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") - Observable> createOrUpdateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") + Observable> suspend(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") - Observable> beginCreateOrUpdateMultiRolePool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolInner multiRolePoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") + Observable> beginSuspend(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") - Observable> getMultiRolePoolSkus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") + Observable> listUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") - Observable> getWorkerPools(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWorkerPools(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") @@ -200,174 +212,380 @@ interface HostingEnvironmentsService { Observable> beginCreateOrUpdateWorkerPool(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Body WorkerPoolInner workerPoolEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") - Observable> getWorkerPoolSkus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") + Observable> listWorkerPoolInstanceMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics") - Observable> getWorkerPoolInstanceMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWorkerPoolInstanceMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") - Observable> getWorkerPoolInstanceMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") + Observable> listWebWorkerMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics") - Observable> getMultiRolePoolInstanceMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics") + Observable> listWebWorkerMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") - Observable> getMultiRolePoolInstanceMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instance") String instance, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") + Observable> listWorkerPoolSkus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") - Observable> suspendHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") + Observable> listWebWorkerUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerPoolName") String workerPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") - Observable> beginSuspendHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") - Observable> resumeHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") - Observable> beginResumeHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listCapacitiesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentCapacitiesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRolePoolsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRoleMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRoleMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentMultiRoleMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRolePoolSkusNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentWebWorkerMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMultiRoleUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getHostingEnvironmentMultiRoleMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("{nextLink}") + Observable> resumeNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getHostingEnvironmentWebWorkerMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("{nextLink}") + Observable> beginResumeNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentMultiRoleUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAppServicePlansNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentWebWorkerUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWebAppsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getHostingEnvironmentSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("{nextLink}") + Observable> suspendNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getHostingEnvironmentWebHostingPlansNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("{nextLink}") + Observable> beginSuspendNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getHostingEnvironmentServerFarmsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getMultiRolePoolsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWorkerPoolsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getMultiRolePoolSkusNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWebWorkerMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getWorkerPoolsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWebWorkerMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getWorkerPoolSkusNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listWorkerPoolSkusNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> suspendHostingEnvironmentNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listWebWorkerUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> beginSuspendHostingEnvironmentNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } - @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> resumeHostingEnvironmentNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + /** + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * + * @return the PagedList<AppServiceEnvironmentInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } - @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> beginResumeHostingEnvironmentNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + /** + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * + * @return the observable to the PagedList<AppServiceEnvironmentInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * + * @return the observable to the PagedList<AppServiceEnvironmentInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * + * @return the PagedList<AppServiceEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get all hostingEnvironments (App Service Environments) in a resource group. + * + * @param resourceGroupName Name of resource group + * @return the PagedList<AppServiceEnvironmentInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get all hostingEnvironments (App Service Environments) in a resource group. + * + * @param resourceGroupName Name of resource group + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get all hostingEnvironments (App Service Environments) in a resource group. + * + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<AppServiceEnvironmentInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get all hostingEnvironments (App Service Environments) in a resource group. + * + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<AppServiceEnvironmentInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get all hostingEnvironments (App Service Environments) in a resource group. + * + ServiceResponse> * @param resourceGroupName Name of resource group + * @return the PagedList<AppServiceEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Get properties of hostingEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the HostingEnvironmentInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the AppServiceEnvironmentInner object if successful. */ - public HostingEnvironmentInner getHostingEnvironment(String resourceGroupName, String name) { - return getHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public AppServiceEnvironmentInner get(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get properties of hostingEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get properties of hostingEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the HostingEnvironmentInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the AppServiceEnvironmentInner object */ - public Observable getHostingEnvironmentAsync(String resourceGroupName, String name) { - return getHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, HostingEnvironmentInner>() { + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AppServiceEnvironmentInner>() { @Override - public HostingEnvironmentInner call(ServiceResponse response) { + public AppServiceEnvironmentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get properties of hostingEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). + * Get properties of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the HostingEnvironmentInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the AppServiceEnvironmentInner object */ - public Observable> getHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -377,15 +595,13 @@ public Observable> getHostingEnvironmen if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.get(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getHostingEnvironmentDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -394,64 +610,68 @@ public Observable> call(Response getHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @return the HostingEnvironmentInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) + * @return the AppServiceEnvironmentInner object if successful. */ - public HostingEnvironmentInner createOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { - return createOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().last().getBody(); + public AppServiceEnvironmentInner createOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().last().getBody(); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) * @return the observable for the request */ - public Observable createOrUpdateHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { - return createOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, HostingEnvironmentInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, AppServiceEnvironmentInner>() { @Override - public HostingEnvironmentInner call(ServiceResponse response) { + public AppServiceEnvironmentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) * @return the observable for the request */ - public Observable> createOrUpdateHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -464,65 +684,67 @@ public Observable> createOrUpdateHostin if (hostingEnvironmentEnvelope == null) { throw new IllegalArgumentException("Parameter hostingEnvironmentEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(hostingEnvironmentEnvelope); - Observable> observable = service.createOrUpdateHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @return the HostingEnvironmentInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) + * @return the AppServiceEnvironmentInner object if successful. */ - public HostingEnvironmentInner beginCreateOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { - return beginCreateOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().getBody(); + public AppServiceEnvironmentInner beginCreateOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().getBody(); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginCreateOrUpdateHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @return the observable to the HostingEnvironmentInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) + * @return the observable to the AppServiceEnvironmentInner object */ - public Observable beginCreateOrUpdateHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { - return beginCreateOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, HostingEnvironmentInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1, AppServiceEnvironmentInner>() { @Override - public HostingEnvironmentInner call(ServiceResponse response) { + public AppServiceEnvironmentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create or update a hostingEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). + * Create or update a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @return the observable to the HostingEnvironmentInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param hostingEnvironmentEnvelope Properties of AppServiceEnvironment (App Service Environment) + * @return the observable to the AppServiceEnvironmentInner object */ - public Observable> beginCreateOrUpdateHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServiceEnvironmentInner hostingEnvironmentEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -535,16 +757,14 @@ public Observable> beginCreateOrUpdateH if (hostingEnvironmentEnvelope == null) { throw new IllegalArgumentException("Parameter hostingEnvironmentEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(hostingEnvironmentEnvelope); - return service.beginCreateOrUpdateHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateHostingEnvironmentDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -553,10 +773,10 @@ public Observable> call(Response beginCreateOrUpdateHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(400, new TypeToken() { }.getType()) .register(404, new TypeToken() { }.getType()) .register(409, new TypeToken() { }.getType()) @@ -565,37 +785,40 @@ private ServiceResponse beginCreateOrUpdateHostingEnvir } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the Object object if successful. */ - public Object deleteHostingEnvironment(String resourceGroupName, String name) { - return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); + public Object delete(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable for the request */ - public Observable deleteHostingEnvironmentAsync(String resourceGroupName, String name) { - return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -604,13 +827,14 @@ public Object call(ServiceResponse response) { } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable for the request */ - public Observable> deleteHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -620,48 +844,49 @@ public Observable> deleteHostingEnvironmentWithServiceRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-09-01"; final Boolean forceDelete = null; - Observable> observable = service.deleteHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.delete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the Object object if successful. */ - public Object deleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { - return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().getBody(); + public Object delete(String resourceGroupName, String name, Boolean forceDelete) { + return deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().getBody(); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the observable for the request */ - public Observable deleteHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete) { - return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String name, Boolean forceDelete) { + return deleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -670,14 +895,15 @@ public Object call(ServiceResponse response) { } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the observable for the request */ - public Observable> deleteHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -687,45 +913,46 @@ public Observable> deleteHostingEnvironmentWithServiceRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.deleteHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2016-09-01"; + Observable> observable = service.delete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the Object object if successful. */ - public Object beginDeleteHostingEnvironment(String resourceGroupName, String name) { - return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object beginDelete(String resourceGroupName, String name) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginDeleteHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall beginDeleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginDeleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the Object object */ - public Observable beginDeleteHostingEnvironmentAsync(String resourceGroupName, String name) { - return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable beginDeleteAsync(String resourceGroupName, String name) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -734,13 +961,14 @@ public Object call(ServiceResponse response) { } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the Object object */ - public Observable> beginDeleteHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -750,16 +978,14 @@ public Observable> beginDeleteHostingEnvironmentWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-09-01"; final Boolean forceDelete = null; - return service.beginDeleteHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.beginDelete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteHostingEnvironmentDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -769,40 +995,43 @@ public Observable> call(Response response) } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the Object object if successful. */ - public Object beginDeleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { - return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().getBody(); + public Object beginDelete(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().getBody(); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginDeleteHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); + public ServiceCall beginDeleteAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the observable to the Object object */ - public Observable beginDeleteHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete) { - return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { + public Observable beginDeleteAsync(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -811,14 +1040,15 @@ public Object call(ServiceResponse response) { } /** - * Delete a hostingEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). + * Delete a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param forceDelete Delete even if the AppServiceEnvironment (App Service Environment) contains resources * @return the observable to the Object object */ - public Observable> beginDeleteHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -828,15 +1058,13 @@ public Observable> beginDeleteHostingEnvironmentWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDeleteHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.beginDelete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginDeleteHostingEnvironmentDelegate(response); + ServiceResponse clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -845,7 +1073,7 @@ public Observable> call(Response response) }); } - private ServiceResponse beginDeleteHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -857,218 +1085,54 @@ private ServiceResponse beginDeleteHostingEnvironmentDelegate(Response getHostingEnvironmentDiagnostics(String resourceGroupName, String name) { - return getHostingEnvironmentDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public PagedList listCapacities(final String resourceGroupName, final String name) { + ServiceResponse> response = listCapacitiesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get diagnostic information for hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentDiagnosticsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getHostingEnvironmentDiagnosticsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listCapacitiesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listCapacitiesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get diagnostic information for hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<StampCapacityInner> object */ - public Observable> getHostingEnvironmentDiagnosticsAsync(String resourceGroupName, String name) { - return getHostingEnvironmentDiagnosticsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get diagnostic information for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object - */ - public Observable>> getHostingEnvironmentDiagnosticsWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentDiagnostics(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = getHostingEnvironmentDiagnosticsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getHostingEnvironmentDiagnosticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get diagnostic information for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param diagnosticsName Name of the diagnostics - * @return the HostingEnvironmentDiagnosticsInner object if successful. - */ - public HostingEnvironmentDiagnosticsInner getHostingEnvironmentDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { - return getHostingEnvironmentDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).toBlocking().single().getBody(); - } - - /** - * Get diagnostic information for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param diagnosticsName Name of the diagnostics - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getHostingEnvironmentDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName), serviceCallback); - } - - /** - * Get diagnostic information for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param diagnosticsName Name of the diagnostics - * @return the observable to the HostingEnvironmentDiagnosticsInner object - */ - public Observable getHostingEnvironmentDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName) { - return getHostingEnvironmentDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).map(new Func1, HostingEnvironmentDiagnosticsInner>() { - @Override - public HostingEnvironmentDiagnosticsInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Get diagnostic information for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param diagnosticsName Name of the diagnostics - * @return the observable to the HostingEnvironmentDiagnosticsInner object - */ - public Observable> getHostingEnvironmentDiagnosticsItemWithServiceResponseAsync(String resourceGroupName, String name, String diagnosticsName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (diagnosticsName == null) { - throw new IllegalArgumentException("Parameter diagnosticsName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentDiagnosticsItem(resourceGroupName, name, diagnosticsName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getHostingEnvironmentDiagnosticsItemDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getHostingEnvironmentDiagnosticsItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<StampCapacityInner> object if successful. - */ - public PagedList getHostingEnvironmentCapacities(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentCapacitiesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getHostingEnvironmentCapacitiesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentCapacitiesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<StampCapacityInner> object - */ - public Observable> getHostingEnvironmentCapacitiesAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentCapacitiesWithServiceResponseAsync(resourceGroupName, name) + public Observable> listCapacitiesAsync(final String resourceGroupName, final String name) { + return listCapacitiesWithServiceResponseAsync(resourceGroupName, name) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1078,14 +1142,15 @@ public Page call(ServiceResponse> r } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the PagedList<StampCapacityInner> object */ - public Observable>> getHostingEnvironmentCapacitiesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentCapacitiesSinglePageAsync(resourceGroupName, name) + public Observable>> listCapacitiesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listCapacitiesSinglePageAsync(resourceGroupName, name) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1093,19 +1158,20 @@ public Observable>> call(ServiceRespons if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentCapacitiesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listCapacitiesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) * @return the PagedList<StampCapacityInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentCapacitiesSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listCapacitiesSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1115,15 +1181,13 @@ public Observable>> getHostingEnvironme if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentCapacities(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listCapacities(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentCapacitiesDelegate(response); + ServiceResponse> result = listCapacitiesDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -1132,7 +1196,7 @@ public Observable>> call(Response> getHostingEnvironmentCapacitiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listCapacitiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -1140,37 +1204,40 @@ private ServiceResponse> getHostingEnvironmentCapac } /** - * Get IP addresses assigned to the hostingEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the AddressResponseInner object if successful. */ - public AddressResponseInner getHostingEnvironmentVips(String resourceGroupName, String name) { - return getHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public AddressResponseInner listVips(String resourceGroupName, String name) { + return listVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get IP addresses assigned to the hostingEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getHostingEnvironmentVipsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall listVipsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listVipsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get IP addresses assigned to the hostingEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the AddressResponseInner object */ - public Observable getHostingEnvironmentVipsAsync(String resourceGroupName, String name) { - return getHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AddressResponseInner>() { + public Observable listVipsAsync(String resourceGroupName, String name) { + return listVipsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AddressResponseInner>() { @Override public AddressResponseInner call(ServiceResponse response) { return response.getBody(); @@ -1179,13 +1246,14 @@ public AddressResponseInner call(ServiceResponse response) } /** - * Get IP addresses assigned to the hostingEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). + * Get IP addresses assigned to the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the AddressResponseInner object */ - public Observable> getHostingEnvironmentVipsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listVipsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1195,15 +1263,13 @@ public Observable> getHostingEnvironmentVi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentVips(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listVips(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getHostingEnvironmentVipsDelegate(response); + ServiceResponse clientResponse = listVipsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1212,7 +1278,7 @@ public Observable> call(Response getHostingEnvironmentVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1220,99 +1286,73 @@ private ServiceResponse getHostingEnvironmentVipsDelegate( } /** - * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @return the PagedList<HostingEnvironmentInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the List<HostingEnvironmentDiagnosticsInner> object if successful. */ - public PagedList getHostingEnvironments(final String resourceGroupName) { - ServiceResponse> response = getHostingEnvironmentsSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public List listDiagnostics(String resourceGroupName, String name) { + return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentsAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentsSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall> listDiagnosticsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listDiagnosticsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<HostingEnvironmentInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object */ - public Observable> getHostingEnvironmentsAsync(final String resourceGroupName) { - return getHostingEnvironmentsWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable> listDiagnosticsAsync(String resourceGroupName, String name) { + return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get all hostingEnvironments (App Service Environments) in a resource group. + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable>> getHostingEnvironmentsWithServiceResponseAsync(final String resourceGroupName) { - return getHostingEnvironmentsSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all hostingEnvironments (App Service Environments) in a resource group. - * - ServiceResponse> * @param resourceGroupName Name of resource group - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the List<HostingEnvironmentDiagnosticsInner> object */ - public Observable>> getHostingEnvironmentsSinglePageAsync(final String resourceGroupName) { + public Observable>> listDiagnosticsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironments(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listDiagnostics(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> clientResponse = listDiagnosticsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1320,78 +1360,87 @@ public Observable>> call(Response< }); } - private ServiceResponse> getHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDiagnosticsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Reboots all machines in a hostingEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the Object object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param diagnosticsName Name of the diagnostics + * @return the HostingEnvironmentDiagnosticsInner object if successful. */ - public Object rebootHostingEnvironment(String resourceGroupName, String name) { - return rebootHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public HostingEnvironmentDiagnosticsInner getDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).toBlocking().single().getBody(); } /** - * Reboots all machines in a hostingEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param diagnosticsName Name of the diagnostics * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall rebootHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(rebootHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName), serviceCallback); } /** - * Reboots all machines in a hostingEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param diagnosticsName Name of the diagnostics + * @return the observable to the HostingEnvironmentDiagnosticsInner object */ - public Observable rebootHostingEnvironmentAsync(String resourceGroupName, String name) { - return rebootHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).map(new Func1, HostingEnvironmentDiagnosticsInner>() { @Override - public Object call(ServiceResponse response) { + public HostingEnvironmentDiagnosticsInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Reboots all machines in a hostingEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). + * Get diagnostic information for AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param diagnosticsName Name of the diagnostics + * @return the observable to the HostingEnvironmentDiagnosticsInner object */ - public Observable> rebootHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getDiagnosticsItemWithServiceResponseAsync(String resourceGroupName, String name, String diagnosticsName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (diagnosticsName == null) { + throw new IllegalArgumentException("Parameter diagnosticsName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.rebootHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.getDiagnosticsItem(resourceGroupName, name, diagnosticsName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = rebootHostingEnvironmentDelegate(response); + ServiceResponse clientResponse = getDiagnosticsItemDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1400,63 +1449,64 @@ public Observable> call(Response response) }); } - private ServiceResponse rebootHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) + private ServiceResponse getDiagnosticsItemDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List all currently running operations on the hostingEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the Object object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the MetricDefinitionInner object if successful. */ - public Object getHostingEnvironmentOperations(String resourceGroupName, String name) { - return getHostingEnvironmentOperationsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public MetricDefinitionInner listMetricDefinitions(String resourceGroupName, String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * List all currently running operations on the hostingEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getHostingEnvironmentOperationsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentOperationsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall listMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * List all currently running operations on the hostingEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the MetricDefinitionInner object */ - public Observable getHostingEnvironmentOperationsAsync(String resourceGroupName, String name) { - return getHostingEnvironmentOperationsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable listMetricDefinitionsAsync(String resourceGroupName, String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MetricDefinitionInner>() { @Override - public Object call(ServiceResponse response) { + public MetricDefinitionInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * List all currently running operations on the hostingEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). + * Get global metric definitions of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the MetricDefinitionInner object */ - public Observable> getHostingEnvironmentOperationsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1466,15 +1516,13 @@ public Observable> getHostingEnvironmentOperationsWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentOperations(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.listMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getHostingEnvironmentOperationsDelegate(response); + ServiceResponse clientResponse = listMetricDefinitionsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1483,86 +1531,120 @@ public Observable> call(Response response) }); } - private ServiceResponse getHostingEnvironmentOperationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get status of an operation on a hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param operationId operation identifier GUID - * @return the Object object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<ResourceMetricInner> object if successful. */ - public Object getHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) { - return getHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get status of an operation on a hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param operationId operation identifier GUID + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getHostingEnvironmentOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get status of an operation on a hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param operationId operation identifier GUID - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable getHostingEnvironmentOperationAsync(String resourceGroupName, String name, String operationId) { - return getHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listMetricsAsync(final String resourceGroupName, final String name) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get status of an operation on a hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param operationId operation identifier GUID - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + final Boolean details = null; + final String filter = null; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getHostingEnvironmentOperationDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1570,62 +1652,61 @@ public Observable> call(Response response) }); } - private ServiceResponse getHostingEnvironmentOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(500, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMetrics(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + public PagedList listMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name), + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink); + return listMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentMetricsAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMetricsWithServiceResponseAsync(resourceGroupName, name) + public Observable> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1635,14 +1716,17 @@ public Page call(ServiceResponse> } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getHostingEnvironmentMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name) + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsSinglePageAsync(resourceGroupName, name, details, filter) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1650,19 +1734,22 @@ public Observable>> call(ServiceRespon if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param details Include instance details + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMetricsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1672,17 +1759,13 @@ public Observable>> getHostingEnvironm if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getHostingEnvironmentMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMetricsDelegate(response); + ServiceResponse> result = listMetricsDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -1691,99 +1774,101 @@ public Observable>> call(Response> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getHostingEnvironmentMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { - ServiceResponse> response = getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRolePools(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRolePoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRolePoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name, details, filter), - new Func1>>>() { + listMultiRolePoolsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable> getHostingEnvironmentMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getHostingEnvironmentMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) - .map(new Func1>, Page>() { + public Observable> listMultiRolePoolsAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable>> getHostingEnvironmentMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name, details, filter) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRolePoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param details Include instance details - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + public Observable>> listMultiRolePoolsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1793,16 +1878,14 @@ public Observable>> getHostingEnvironm if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listMultiRolePools(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRolePoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1810,60 +1893,64 @@ public Observable>> call(Response> getHostingEnvironmentMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRolePoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get global metric definitions of hostingEnvironment (App Service Environment). + * Get properties of a multiRool pool. + * Get properties of a multiRool pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the MetricDefinitionInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the WorkerPoolInner object if successful. */ - public MetricDefinitionInner getHostingEnvironmentMetricDefinitions(String resourceGroupName, String name) { - return getHostingEnvironmentMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public WorkerPoolInner getMultiRolePool(String resourceGroupName, String name) { + return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get global metric definitions of hostingEnvironment (App Service Environment). + * Get properties of a multiRool pool. + * Get properties of a multiRool pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getHostingEnvironmentMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getHostingEnvironmentMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getMultiRolePoolAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get global metric definitions of hostingEnvironment (App Service Environment). + * Get properties of a multiRool pool. + * Get properties of a multiRool pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the MetricDefinitionInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the WorkerPoolInner object */ - public Observable getHostingEnvironmentMetricDefinitionsAsync(String resourceGroupName, String name) { - return getHostingEnvironmentMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, MetricDefinitionInner>() { + public Observable getMultiRolePoolAsync(String resourceGroupName, String name) { + return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).map(new Func1, WorkerPoolInner>() { @Override - public MetricDefinitionInner call(ServiceResponse response) { + public WorkerPoolInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get global metric definitions of hostingEnvironment (App Service Environment). + * Get properties of a multiRool pool. + * Get properties of a multiRool pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the MetricDefinitionInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the WorkerPoolInner object */ - public Observable> getHostingEnvironmentMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1873,15 +1960,13 @@ public Observable> getHostingEnvironmentM if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.getMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getHostingEnvironmentMetricDefinitionsDelegate(response); + ServiceResponse clientResponse = getMultiRolePoolDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1890,96 +1975,68 @@ public Observable> call(Response getHostingEnvironmentMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the WorkerPoolInner object if successful. */ - public PagedList getHostingEnvironmentUsages(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public WorkerPoolInner createOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { + return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().last().getBody(); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get global usages of hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<CsmUsageQuotaInner> object - */ - public Observable> getHostingEnvironmentUsagesAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentUsagesWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the observable for the request */ - public Observable>> getHostingEnvironmentUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentUsagesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { + return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolInner>() { + @Override + public WorkerPoolInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the observable for the request */ - public Observable>> getHostingEnvironmentUsagesSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> createOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1989,112 +2046,70 @@ public Observable>> getHostingEnvironme if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (multiRolePoolEnvelope == null) { + throw new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null."); } - final String filter = null; - return service.getHostingEnvironmentUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getHostingEnvironmentUsagesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); + Validator.validate(multiRolePoolEnvelope); + final String apiVersion = "2016-09-01"; + Observable> observable = service.createOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the WorkerPoolInner object if successful. */ - public PagedList getHostingEnvironmentUsages(final String resourceGroupName, final String name, final String filter) { - ServiceResponse> response = getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public WorkerPoolInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().getBody(); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the observable to the WorkerPoolInner object */ - public Observable> getHostingEnvironmentUsagesAsync(final String resourceGroupName, final String name, final String filter) { - return getHostingEnvironmentUsagesWithServiceResponseAsync(resourceGroupName, name, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolInner>() { + @Override + public WorkerPoolInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Create or update a multiRole pool. + * Create or update a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object - */ - public Observable>> getHostingEnvironmentUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { - return getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentUsagesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get global usages of hostingEnvironment (App Service Environment). - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param multiRolePoolEnvelope Properties of multiRole pool + * @return the observable to the WorkerPoolInner object */ - public Observable>> getHostingEnvironmentUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) { + public Observable> beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2104,16 +2119,18 @@ public Observable>> getHostingEnvironme if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (multiRolePoolEnvelope == null) { + throw new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null."); } - return service.getHostingEnvironmentUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(multiRolePoolEnvelope); + final String apiVersion = "2016-09-01"; + return service.beginCreateOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentUsagesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = beginCreateOrUpdateMultiRolePoolDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2121,120 +2138,182 @@ public Observable>> call(Response> getHostingEnvironmentUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse beginCreateOrUpdateMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ResourceMetricInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool&gt; + * @return the Object object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object listMultiRolePoolInstanceMetricDefinitions(String resourceGroupName, String name, String instance) { + return listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool&gt; * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listMultiRolePoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String instance, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance), serviceCallback); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool&gt; + * @return the observable to the Object object */ - public Observable> getHostingEnvironmentMultiRoleMetricsAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listMultiRolePoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String instance) { + return listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool&gt; + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentMultiRoleMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable> listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name, String instance) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (instance == null) { + throw new IllegalArgumentException("Parameter instance is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listMultiRolePoolInstanceMetricDefinitionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); } - return Observable.just(page).concatWith(getHostingEnvironmentMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } + private ServiceResponse listMultiRolePoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool + * @return the Object object if successful. + */ + public Object listMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); + } + + /** + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance), serviceCallback); + } + + /** + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool + * @return the observable to the Object object + */ + public Observable listMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentMultiRoleMetricsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String instance) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (instance == null) { + throw new IllegalArgumentException("Parameter instance is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String startTime = null; - final String endTime = null; - final String timeGrain = null; + final String apiVersion = "2016-09-01"; final Boolean details = null; - final String filter = null; - return service.getHostingEnvironmentMultiRoleMetrics(resourceGroupName, name, this.client.subscriptionId(), startTime, endTime, timeGrain, details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, this.client.subscriptionId(), details, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listMultiRolePoolInstanceMetricsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2243,132 +2322,84 @@ public Observable>> call(Response getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { - ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object listMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance, Boolean details) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details).toBlocking().single().getBody(); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param startTime Beginning time of metrics query - * @param endTime End time of metrics query - * @param timeGrain Time granularity of metrics query + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleMetricsAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, Boolean details, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details), serviceCallback); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param startTime Beginning time of metrics query - * @param endTime End time of metrics query - * @param timeGrain Time granularity of metrics query + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the Object object */ - public Observable> getHostingEnvironmentMultiRoleMetricsAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { - return getHostingEnvironmentMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, Boolean details) { + return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param startTime Beginning time of metrics query - * @param endTime End time of metrics query - * @param timeGrain Time granularity of metrics query + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param instance Name of instance in the multiRole pool * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable>> getHostingEnvironmentMultiRoleMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { - return getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param startTime Beginning time of metrics query - ServiceResponse> * @param endTime End time of metrics query - ServiceResponse> * @param timeGrain Time granularity of metrics query - ServiceResponse> * @param details Include instance details - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentMultiRoleMetricsSinglePageAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { + public Observable> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String instance, Boolean details) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (instance == null) { + throw new IllegalArgumentException("Parameter instance is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentMultiRoleMetrics(resourceGroupName, name, this.client.subscriptionId(), startTime, endTime, timeGrain, details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, this.client.subscriptionId(), details, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listMultiRolePoolInstanceMetricsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2376,125 +2407,118 @@ public Observable>> call(Response> getHostingEnvironmentMultiRoleMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listMultiRolePoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the PagedList<ResourceMetricInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName) { - ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRoleMetricDefinitions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName), - new Func1>>>() { + listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> getHostingEnvironmentWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName) - .map(new Func1>, Page>() { + public Observable> listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<ResourceMetricInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> getHostingEnvironmentWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRoleMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { + public Observable>> listMultiRoleMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getHostingEnvironmentWebWorkerMetrics(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listMultiRoleMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRoleMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -2502,61 +2526,62 @@ public Observable>> call(Response> listMultiRoleMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { - ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter).toBlocking().single(); + public PagedList listMultiRoleMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter), + listMultiRoleMetricsSinglePageAsync(resourceGroupName, name), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink); + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { - return getHostingEnvironmentWebWorkerMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, details, filter) + public Observable> listMultiRoleMetricsAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -2566,17 +2591,15 @@ public Page call(ServiceResponse> } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getHostingEnvironmentWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { - return getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter) + public Observable>> listMultiRoleMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleMetricsSinglePageAsync(resourceGroupName, name) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -2584,43 +2607,41 @@ public Observable>> call(ServiceRespon if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param workerPoolName Name of worker pool - ServiceResponse> * @param details Include instance details - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { + public Observable>> listMultiRoleMetricsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentWebWorkerMetrics(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + final String startTime = null; + final String endTime = null; + final String timeGrain = null; + final Boolean details = null; + final String filter = null; + return service.listMultiRoleMetrics(resourceGroupName, name, this.client.subscriptionId(), startTime, endTime, timeGrain, details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerMetricsDelegate(response); + ServiceResponse> result = listMultiRoleMetricsDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -2629,96 +2650,119 @@ public Observable>> call(Response> getHostingEnvironmentWebWorkerMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<MetricDefinitionInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param startTime Beginning time of metrics query + * @param endTime End time of metrics query + * @param timeGrain Time granularity of metrics query + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricDefinitions(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRoleMetrics(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { + ServiceResponse> response = listMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param startTime Beginning time of metrics query + * @param endTime End time of metrics query + * @param timeGrain Time granularity of metrics query + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleMetricsAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param startTime Beginning time of metrics query + * @param endTime End time of metrics query + * @param timeGrain Time granularity of metrics query + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listMultiRoleMetricsAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { + return listMultiRoleMetricsWithServiceResponseAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param startTime Beginning time of metrics query + * @param endTime End time of metrics query + * @param timeGrain Time granularity of metrics query + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getHostingEnvironmentMultiRoleMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRoleMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { + return listMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param startTime Beginning time of metrics query + ServiceResponse> * @param endTime End time of metrics query + ServiceResponse> * @param timeGrain Time granularity of metrics query + ServiceResponse> * @param details Include instance details + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMultiRoleMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listMultiRoleMetricsSinglePageAsync(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2728,16 +2772,14 @@ public Observable>> getHostingEnviro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentMultiRoleMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listMultiRoleMetrics(resourceGroupName, name, this.client.subscriptionId(), startTime, endTime, timeGrain, details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleMetricDefinitionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRoleMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -2745,123 +2787,118 @@ public Observable>> call(Response> getHostingEnvironmentMultiRoleMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRoleMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the PagedList<MetricDefinitionInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName) { - ServiceResponse> response = getHostingEnvironmentWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRolePoolSkus(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRolePoolSkusAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName), - new Func1>>>() { + listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable> getHostingEnvironmentWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName) - .map(new Func1>, Page>() { + public Observable> listMultiRolePoolSkusAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolSkusWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable>> getHostingEnvironmentWebWorkerMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRolePoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param workerPoolName Name of worker pool - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { + public Observable>> listMultiRolePoolSkusSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listMultiRolePoolSkus(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerMetricDefinitionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRolePoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -2869,59 +2906,62 @@ public Observable>> call(Response> getHostingEnvironmentWebWorkerMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRolePoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleUsages(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentMultiRoleUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + public PagedList listMultiRoleUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listMultiRoleUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMultiRoleUsagesSinglePageAsync(resourceGroupName, name), + listMultiRoleUsagesSinglePageAsync(resourceGroupName, name), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink); + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the PagedList<UsageInner> object */ - public Observable> getHostingEnvironmentMultiRoleUsagesAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleUsagesWithServiceResponseAsync(resourceGroupName, name) + public Observable> listMultiRoleUsagesAsync(final String resourceGroupName, final String name) { + return listMultiRoleUsagesWithServiceResponseAsync(resourceGroupName, name) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -2931,14 +2971,15 @@ public Page call(ServiceResponse> response) { } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @return the observable to the PagedList<UsageInner> object */ - public Observable>> getHostingEnvironmentMultiRoleUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentMultiRoleUsagesSinglePageAsync(resourceGroupName, name) + public Observable>> listMultiRoleUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMultiRoleUsagesSinglePageAsync(resourceGroupName, name) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -2946,19 +2987,20 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMultiRoleUsagesSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listMultiRoleUsagesSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2968,15 +3010,13 @@ public Observable>> getHostingEnvironmentMultiR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentMultiRoleUsages(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listMultiRoleUsages(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleUsagesDelegate(response); + ServiceResponse> result = listMultiRoleUsagesDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -2985,7 +3025,7 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentMultiRoleUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listMultiRoleUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -2993,115 +3033,73 @@ private ServiceResponse> getHostingEnvironmentMultiRoleUsag } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the PagedList<UsageInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the Object object if successful. */ - public PagedList getHostingEnvironmentWebWorkerUsages(final String resourceGroupName, final String name, final String workerPoolName) { - ServiceResponse> response = getHostingEnvironmentWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object listOperations(String resourceGroupName, String name) { + return listOperationsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listOperationsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listOperationsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<UsageInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the Object object */ - public Observable> getHostingEnvironmentWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerUsagesWithServiceResponseAsync(resourceGroupName, name, workerPoolName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listOperationsAsync(String resourceGroupName, String name) { + return listOperationsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). + * List all currently running operations on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<UsageInner> object - */ - public Observable>> getHostingEnvironmentWebWorkerUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getHostingEnvironmentWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param workerPoolName Name of worker pool - * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentWebWorkerUsagesSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { + public Observable> listOperationsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentWebWorkerUsages(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listOperations(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerUsagesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listOperationsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3109,116 +3107,88 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentWebWorkerUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listOperationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param operationId operation identifier GUID + * @return the Object object if successful. */ - public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object getOperation(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param operationId operation identifier GUID * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all sites on the hostingEnvironment (App Service Environment). - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getHostingEnvironmentSitesAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentSitesWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall getOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param operationId operation identifier GUID + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentSitesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getOperationAsync(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). + * Get status of an operation on a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param operationId operation identifier GUID + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentSitesSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> getOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String propertiesToInclude = null; - return service.getHostingEnvironmentSites(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.getOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = getOperationDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3226,94 +3196,67 @@ public Observable>> call(Response }); } + private ServiceResponse getOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(500, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param propertiesToInclude Comma separated list of site properties to include - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the Object object if successful. */ - public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) { - ServiceResponse> response = getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object reboot(String resourceGroupName, String name) { + return rebootWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param propertiesToInclude Comma separated list of site properties to include + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall rebootAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(rebootWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param propertiesToInclude Comma separated list of site properties to include - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the Object object */ - public Observable> getHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getHostingEnvironmentSitesWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable rebootAsync(String resourceGroupName, String name) { + return rebootWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). + * Reboots all machines in a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param propertiesToInclude Comma separated list of site properties to include - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getHostingEnvironmentSitesWithServiceResponseAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all sites on the hostingEnvironment (App Service Environment). - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param propertiesToInclude Comma separated list of site properties to include - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the Object object */ - public Observable>> getHostingEnvironmentSitesSinglePageAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + public Observable> rebootWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3323,16 +3266,14 @@ public Observable>> getHostingEnvironmentSitesSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentSites(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.reboot(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = rebootDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3340,96 +3281,104 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse rebootDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList resume(final String resourceGroupName, final String name) { + ServiceResponse> response = resumeSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebHostingPlansAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> resumeAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + resumeSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getHostingEnvironmentWebHostingPlansAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentWebHostingPlansWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> resumeAsync(final String resourceGroupName, final String name) { + return resumeWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getHostingEnvironmentWebHostingPlansWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> resumeWithServiceResponseAsync(final String resourceGroupName, final String name) { + return resumeSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(resumeNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebHostingPlansSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> resumeSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3439,16 +3388,14 @@ public Observable>> getHostingE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.resume(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebHostingPlansDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = resumeDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -3456,96 +3403,102 @@ public Observable>> call(Respon }); } - private ServiceResponse> getHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> resumeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentServerFarms(final String resourceGroupName, final String name) { - ServiceResponse> response = getHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList beginResume(final String resourceGroupName, final String name) { + ServiceResponse> response = beginResumeSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentServerFarmsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> beginResumeAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + beginResumeSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getHostingEnvironmentServerFarmsAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentServerFarmsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> beginResumeAsync(final String resourceGroupName, final String name) { + return beginResumeWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getHostingEnvironmentServerFarmsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> beginResumeWithServiceResponseAsync(final String resourceGroupName, final String name) { + return beginResumeSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(beginResumeNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentServerFarmsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> beginResumeSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3555,16 +3508,14 @@ public Observable>> getHostingE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getHostingEnvironmentServerFarms(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.beginResume(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentServerFarmsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = beginResumeDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -3572,96 +3523,102 @@ public Observable>> call(Respon }); } - private ServiceResponse> getHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> beginResumeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all multi role pools. + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<WorkerPoolInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<AppServicePlanInner> object if successful. */ - public PagedList getMultiRolePools(final String resourceGroupName, final String name) { - ServiceResponse> response = getMultiRolePoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listAppServicePlans(final String resourceGroupName, final String name) { + ServiceResponse> response = listAppServicePlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all multi role pools. + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getMultiRolePoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listAppServicePlansAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getMultiRolePoolsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listAppServicePlansSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getMultiRolePoolsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all multi role pools. + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<WorkerPoolInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<AppServicePlanInner> object */ - public Observable> getMultiRolePoolsAsync(final String resourceGroupName, final String name) { - return getMultiRolePoolsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listAppServicePlansAsync(final String resourceGroupName, final String name) { + return listAppServicePlansWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all multi role pools. + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<WorkerPoolInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<AppServicePlanInner> object */ - public Observable>> getMultiRolePoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getMultiRolePoolsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listAppServicePlansWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listAppServicePlansSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAppServicePlansNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all multi role pools. + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getMultiRolePoolsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listAppServicePlansSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3671,16 +3628,14 @@ public Observable>> getMultiRolePoolsSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getMultiRolePools(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listAppServicePlans(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getMultiRolePoolsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listAppServicePlansDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -3688,60 +3643,101 @@ public Observable>> call(Response> getMultiRolePoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listAppServicePlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get properties of a multiRool pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the WorkerPoolInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object if successful. */ - public WorkerPoolInner getMultiRolePool(String resourceGroupName, String name) { - return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public PagedList listWebApps(final String resourceGroupName, final String name) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get properties of a multiRool pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getMultiRolePoolAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listWebAppsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebAppsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get properties of a multiRool pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable getMultiRolePoolAsync(String resourceGroupName, String name) { - return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).map(new Func1, WorkerPoolInner>() { - @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listWebAppsAsync(final String resourceGroupName, final String name) { + return listWebAppsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get properties of a multiRool pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable>> listWebAppsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listWebAppsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3751,16 +3747,15 @@ public Observable> getMultiRolePoolWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + final String propertiesToInclude = null; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getMultiRolePoolDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -3768,135 +3763,99 @@ public Observable> call(Response }); } - private ServiceResponse getMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update a multiRole pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the WorkerPoolInner object if successful. - */ - public WorkerPoolInner createOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { - return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().last().getBody(); - } - - /** - * Create or update a multiRole pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); - } - /** - * Create or update a multiRole pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the observable for the request + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param propertiesToInclude Comma separated list of site properties to include + * @return the PagedList<SiteInner> object if successful. */ - public Observable createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { - return createOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolInner>() { + public PagedList listWebApps(final String resourceGroupName, final String name, final String propertiesToInclude) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } - }); - } - - /** - * Create or update a multiRole pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the observable for the request - */ - public Observable> createOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (multiRolePoolEnvelope == null) { - throw new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(multiRolePoolEnvelope); - Observable> observable = service.createOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + }; } /** - * Create or update a multiRole pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the WorkerPoolInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param propertiesToInclude Comma separated list of site properties to include + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public WorkerPoolInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { - return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().getBody(); + public ServiceCall> listWebAppsAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Create or update a multiRole pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param propertiesToInclude Comma separated list of site properties to include + * @return the observable to the PagedList<SiteInner> object */ - public ServiceCall beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope), serviceCallback); + public Observable> listWebAppsAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + return listWebAppsWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Create or update a multiRole pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param propertiesToInclude Comma separated list of site properties to include + * @return the observable to the PagedList<SiteInner> object */ - public Observable beginCreateOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { - return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).map(new Func1, WorkerPoolInner>() { - @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listWebAppsWithServiceResponseAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + return listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Create or update a multiRole pool. + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param multiRolePoolEnvelope Properties of multiRole pool - * @return the observable to the WorkerPoolInner object + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param propertiesToInclude Comma separated list of site properties to include + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { + public Observable>> listWebAppsSinglePageAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3906,20 +3865,14 @@ public Observable> beginCreateOrUpdateMultiRole if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (multiRolePoolEnvelope == null) { - throw new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(multiRolePoolEnvelope); - return service.beginCreateOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateMultiRolePoolDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -3927,100 +3880,101 @@ public Observable> call(Response }); } - private ServiceResponse beginCreateOrUpdateMultiRolePoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) + private ServiceResponse> listWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SkuInfoInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getMultiRolePoolSkus(final String resourceGroupName, final String name) { - ServiceResponse> response = getMultiRolePoolSkusSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList suspend(final String resourceGroupName, final String name) { + ServiceResponse> response = suspendSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getMultiRolePoolSkusAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> suspendAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getMultiRolePoolSkusSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + suspendSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SkuInfoInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getMultiRolePoolSkusAsync(final String resourceGroupName, final String name) { - return getMultiRolePoolSkusWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> suspendAsync(final String resourceGroupName, final String name) { + return suspendWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SkuInfoInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getMultiRolePoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getMultiRolePoolSkusSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> suspendWithServiceResponseAsync(final String resourceGroupName, final String name) { + return suspendSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(suspendNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getMultiRolePoolSkusSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> suspendSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4030,16 +3984,14 @@ public Observable>> getMultiRolePoolSkusSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getMultiRolePoolSkus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.suspend(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getMultiRolePoolSkusDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = suspendDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -4047,96 +3999,102 @@ public Observable>> call(Response> getMultiRolePoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> suspendDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all worker pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<WorkerPoolInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getWorkerPools(final String resourceGroupName, final String name) { - ServiceResponse> response = getWorkerPoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList beginSuspend(final String resourceGroupName, final String name) { + ServiceResponse> response = beginSuspendSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all worker pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getWorkerPoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> beginSuspendAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getWorkerPoolsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + beginSuspendSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getWorkerPoolsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all worker pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<WorkerPoolInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getWorkerPoolsAsync(final String resourceGroupName, final String name) { - return getWorkerPoolsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> beginSuspendAsync(final String resourceGroupName, final String name) { + return beginSuspendWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all worker pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<WorkerPoolInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getWorkerPoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getWorkerPoolsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> beginSuspendWithServiceResponseAsync(final String resourceGroupName, final String name) { + return beginSuspendSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(beginSuspendNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all worker pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getWorkerPoolsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> beginSuspendSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4146,16 +4104,14 @@ public Observable>> getWorkerPoolsSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getWorkerPools(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.beginSuspend(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getWorkerPoolsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = beginSuspendDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -4163,86 +4119,120 @@ public Observable>> call(Response> getWorkerPoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> beginSuspendDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get properties of a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the WorkerPoolInner object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public WorkerPoolInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) { - return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).toBlocking().single().getBody(); + public PagedList listUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get properties of a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName), serviceCallback); + public ServiceCall> listUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get properties of a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName) { - return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).map(new Func1, WorkerPoolInner>() { - @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listUsagesAsync(final String resourceGroupName, final String name) { + return listUsagesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get properties of a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable> getWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName) { + public Observable>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listUsagesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + final String filter = null; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getWorkerPoolDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -4250,172 +4240,116 @@ public Observable> call(Response }); } - private ServiceResponse getWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update a worker pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the WorkerPoolInner object if successful. - */ - public WorkerPoolInner createOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { - return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().last().getBody(); - } - - /** - * Create or update a worker pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); - } - /** - * Create or update a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the observable for the request + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public Observable createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { - return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolInner>() { + public PagedList listUsages(final String resourceGroupName, final String name, final String filter) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } - }); - } - - /** - * Create or update a worker pool. - * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the observable for the request - */ - public Observable> createOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (workerPoolEnvelope == null) { - throw new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(workerPoolEnvelope); - Observable> observable = service.createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + }; } /** - * Create or update a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the WorkerPoolInner object if successful. - */ - public WorkerPoolInner beginCreateOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { - return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().single().getBody(); + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Create or update a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public ServiceCall beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); + public Observable> listUsagesAsync(final String resourceGroupName, final String name, final String filter) { + return listUsagesWithServiceResponseAsync(resourceGroupName, name, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Create or update a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the observable to the WorkerPoolInner object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { - return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolInner>() { - @Override - public WorkerPoolInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { + return listUsagesSinglePageAsync(resourceGroupName, name, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Create or update a worker pool. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * - * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @param workerPoolEnvelope Properties of worker pool - * @return the observable to the WorkerPoolInner object + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + public Observable>> listUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (workerPoolEnvelope == null) { - throw new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(workerPoolEnvelope); - return service.beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateWorkerPoolDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -4423,127 +4357,118 @@ public Observable> call(Response }); } - private ServiceResponse beginCreateOrUpdateWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) + private ServiceResponse> listUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the PagedList<SkuInfoInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getWorkerPoolSkus(final String resourceGroupName, final String name, final String workerPoolName) { - ServiceResponse> response = getWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWorkerPools(final String resourceGroupName, final String name) { + ServiceResponse> response = listWorkerPoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool + * @param name Name of AppServiceEnvironment (App Service Environment) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + public ServiceCall> listWorkerPoolsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName), - new Func1>>>() { + listWorkerPoolsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getWorkerPoolSkusNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<SkuInfoInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable> getWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getWorkerPoolSkusWithServiceResponseAsync(resourceGroupName, name, workerPoolName) - .map(new Func1>, Page>() { + public Observable> listWorkerPoolsAsync(final String resourceGroupName, final String name) { + return listWorkerPoolsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param workerPoolName Name of worker pool - * @return the observable to the PagedList<SkuInfoInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable>> getWorkerPoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { - return getWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWorkerPoolsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listWorkerPoolsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - ServiceResponse> * @param workerPoolName Name of worker pool - * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getWorkerPoolSkusSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { + public Observable>> listWorkerPoolsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (workerPoolName == null) { - throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getWorkerPoolSkus(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listWorkerPools(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getWorkerPoolSkusDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWorkerPoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -4551,68 +4476,68 @@ public Observable>> call(Response> getWorkerPoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listWorkerPoolsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get properties of a worker pool. + * Get properties of a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @return the Object object if successful. + * @return the WorkerPoolInner object if successful. */ - public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance) { - return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single().getBody(); + public WorkerPoolInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).toBlocking().single().getBody(); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get properties of a worker pool. + * Get properties of a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, final ServiceCallback serviceCallback) { - return ServiceCall.create(getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance), serviceCallback); + public ServiceCall getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName), serviceCallback); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get properties of a worker pool. + * Get properties of a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @return the observable to the Object object + * @return the observable to the WorkerPoolInner object */ - public Observable getWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance) { - return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).map(new Func1, Object>() { + public Observable getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).map(new Func1, WorkerPoolInner>() { @Override - public Object call(ServiceResponse response) { + public WorkerPoolInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get properties of a worker pool. + * Get properties of a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @return the observable to the Object object + * @return the observable to the WorkerPoolInner object */ - public Observable> getWorkerPoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance) { + public Observable> getWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4622,23 +4547,16 @@ public Observable> getWorkerPoolInstanceMetricsWithServi if (workerPoolName == null) { throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); } - if (instance == null) { - throw new IllegalArgumentException("Parameter instance is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.getWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getWorkerPoolInstanceMetricsDelegate(response); + ServiceResponse clientResponse = getWorkerPoolDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4647,69 +4565,152 @@ public Observable> call(Response response) }); } + private ServiceResponse getWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param workerPoolEnvelope Properties of worker pool + * @return the WorkerPoolInner object if successful. + */ + public WorkerPoolInner createOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().last().getBody(); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param workerPoolEnvelope Properties of worker pool + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param workerPoolEnvelope Properties of worker pool + * @return the observable for the request + */ + public Observable createOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + return createOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolInner>() { + @Override + public WorkerPoolInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Create or update a worker pool. + * Create or update a worker pool. + * + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param workerPoolEnvelope Properties of worker pool + * @return the observable for the request + */ + public Observable> createOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (workerPoolEnvelope == null) { + throw new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null."); + } + Validator.validate(workerPoolEnvelope); + final String apiVersion = "2016-09-01"; + Observable> observable = service.createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Create or update a worker pool. + * Create or update a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the Object object if successful. + * @param workerPoolEnvelope Properties of worker pool + * @return the WorkerPoolInner object if successful. */ - public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { - return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter).toBlocking().single().getBody(); + public WorkerPoolInner beginCreateOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().single().getBody(); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Create or update a worker pool. + * Create or update a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param workerPoolEnvelope Properties of worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter, final ServiceCallback serviceCallback) { - return ServiceCall.create(getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter), serviceCallback); + public ServiceCall beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope), serviceCallback); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Create or update a worker pool. + * Create or update a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the Object object + * @param workerPoolEnvelope Properties of worker pool + * @return the observable to the WorkerPoolInner object */ - public Observable getWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { - return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter).map(new Func1, Object>() { + public Observable beginCreateOrUpdateWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).map(new Func1, WorkerPoolInner>() { @Override - public Object call(ServiceResponse response) { + public WorkerPoolInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get metrics for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Create or update a worker pool. + * Create or update a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @param instance Name of instance in the worker pool - * @param details Include instance details - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the Object object + * @param workerPoolEnvelope Properties of worker pool + * @return the observable to the WorkerPoolInner object */ - public Observable> getWorkerPoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { + public Observable> beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4719,21 +4720,20 @@ public Observable> getWorkerPoolInstanceMetricsWithServi if (workerPoolName == null) { throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); } - if (instance == null) { - throw new IllegalArgumentException("Parameter instance is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (workerPoolEnvelope == null) { + throw new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null."); } - return service.getWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(workerPoolEnvelope); + final String apiVersion = "2016-09-01"; + return service.beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getWorkerPoolInstanceMetricsDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateWorkerPoolDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4742,51 +4742,58 @@ public Observable> call(Response response) }); } - private ServiceResponse getWorkerPoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateWorkerPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metric definitions for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param instance Name of instance in the worker pool * @return the Object object if successful. */ - public Object getWorkerPoolInstanceMetricDefinitions(String resourceGroupName, String name, String workerPoolName, String instance) { - return getWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single().getBody(); + public Object listWorkerPoolInstanceMetricDefinitions(String resourceGroupName, String name, String workerPoolName, String instance) { + return listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single().getBody(); } /** - * Get metric definitions for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param instance Name of instance in the worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getWorkerPoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String workerPoolName, String instance, final ServiceCallback serviceCallback) { - return ServiceCall.create(getWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance), serviceCallback); + public ServiceCall listWorkerPoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String workerPoolName, String instance, final ServiceCallback serviceCallback) { + return ServiceCall.create(listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance), serviceCallback); } /** - * Get metric definitions for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param instance Name of instance in the worker pool * @return the observable to the Object object */ - public Observable getWorkerPoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String workerPoolName, String instance) { - return getWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).map(new Func1, Object>() { + public Observable listWorkerPoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String workerPoolName, String instance) { + return listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -4795,15 +4802,16 @@ public Object call(ServiceResponse response) { } /** - * Get metric definitions for a specific instance of a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param instance Name of instance in the worker pool * @return the observable to the Object object */ - public Observable> getWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance) { + public Observable> listWorkerPoolInstanceMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4819,15 +4827,13 @@ public Observable> getWorkerPoolInstanceMetricDefinition if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getWorkerPoolInstanceMetricDefinitionsDelegate(response); + ServiceResponse clientResponse = listWorkerPoolInstanceMetricDefinitionsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4836,7 +4842,7 @@ public Observable> call(Response response) }); } - private ServiceResponse getWorkerPoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listWorkerPoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -4844,40 +4850,46 @@ private ServiceResponse getWorkerPoolInstanceMetricDefinitionsDelegate(R } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @return the Object object if successful. */ - public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance) { - return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); + public Object listWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single().getBody(); } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, final ServiceCallback serviceCallback) { - return ServiceCall.create(getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance), serviceCallback); + public ServiceCall listWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, final ServiceCallback serviceCallback) { + return ServiceCall.create(listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance), serviceCallback); } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @return the observable to the Object object */ - public Observable getMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance) { - return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance).map(new Func1, Object>() { + public Observable listWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -4886,36 +4898,40 @@ public Object call(ServiceResponse response) { } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @return the observable to the Object object */ - public Observable> getMultiRolePoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String instance) { + public Observable> listWorkerPoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (instance == null) { throw new IllegalArgumentException("Parameter instance is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-09-01"; final Boolean details = null; - return service.getMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, this.client.subscriptionId(), details, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String filter = null; + return service.listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getMultiRolePoolInstanceMetricsDelegate(response); + ServiceResponse clientResponse = listWorkerPoolInstanceMetricsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4925,43 +4941,52 @@ public Observable> call(Response response) } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the Object object if successful. */ - public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance, Boolean details) { - return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details).toBlocking().single().getBody(); + public Object listWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter).toBlocking().single().getBody(); } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, Boolean details, final ServiceCallback serviceCallback) { - return ServiceCall.create(getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details), serviceCallback); + public ServiceCall listWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter, final ServiceCallback serviceCallback) { + return ServiceCall.create(listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter), serviceCallback); } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the observable to the Object object */ - public Observable getMultiRolePoolInstanceMetricsAsync(String resourceGroupName, String name, String instance, Boolean details) { - return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details).map(new Func1, Object>() { + public Observable listWorkerPoolInstanceMetricsAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { + return listWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -4970,36 +4995,40 @@ public Object call(ServiceResponse response) { } /** - * Get metrics for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a specific instance of a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param instance Name of instance in the worker pool * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @return the observable to the Object object */ - public Observable> getMultiRolePoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String instance, Boolean details) { + public Observable> listWorkerPoolInstanceMetricsWithServiceResponseAsync(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (instance == null) { throw new IllegalArgumentException("Parameter instance is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, this.client.subscriptionId(), details, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-09-01"; + return service.listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getMultiRolePoolInstanceMetricsDelegate(response); + ServiceResponse clientResponse = listWorkerPoolInstanceMetricsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -5008,7 +5037,7 @@ public Observable> call(Response response) }); } - private ServiceResponse getMultiRolePoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listWorkerPoolInstanceMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5016,78 +5045,118 @@ private ServiceResponse getMultiRolePoolInstanceMetricsDelegate(Response } /** - * Get metric definitions for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool&gt; - * @return the Object object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public Object getMultiRolePoolInstanceMetricDefinitions(String resourceGroupName, String name, String instance) { - return getMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); + public PagedList listWebWorkerMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get metric definitions for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool&gt; + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getMultiRolePoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String instance, final ServiceCallback serviceCallback) { - return ServiceCall.create(getMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance), serviceCallback); + public ServiceCall> listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get metric definitions for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool&gt; - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable getMultiRolePoolInstanceMetricDefinitionsAsync(String resourceGroupName, String name, String instance) { - return getMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get metric definitions for a specific instance of a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @param instance Name of instance in the multiRole pool&gt; - * @return the observable to the Object object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable>> listWebWorkerMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param workerPoolName Name of worker pool + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> getMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(String resourceGroupName, String name, String instance) { + public Observable>> listWebWorkerMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (instance == null) { - throw new IllegalArgumentException("Parameter instance is required and cannot be null."); + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-09-01"; + return service.listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getMultiRolePoolInstanceMetricDefinitionsDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listWebWorkerMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5095,115 +5164,128 @@ public Observable> call(Response response) }); } - private ServiceResponse getMultiRolePoolInstanceMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listWebWorkerMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList suspendHostingEnvironment(final String resourceGroupName, final String name) { - ServiceResponse> response = suspendHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> suspendHostingEnvironmentAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - suspendHostingEnvironmentSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> suspendHostingEnvironmentAsync(final String resourceGroupName, final String name) { - return suspendHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> suspendHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String name) { - return suspendHostingEnvironmentSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(suspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName Name of resource group + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> suspendHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listWebWorkerMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.suspendHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + final Boolean details = null; + final String filter = null; + return service.listWebWorkerMetrics(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = suspendHostingEnvironmentDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5211,116 +5293,129 @@ public Observable>> call(Response }); } - private ServiceResponse> suspendHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList beginSuspendHostingEnvironment(final String resourceGroupName, final String name) { - ServiceResponse> response = beginSuspendHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { + ServiceResponse> response = listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> beginSuspendHostingEnvironmentAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - beginSuspendHostingEnvironmentSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> beginSuspendHostingEnvironmentAsync(final String resourceGroupName, final String name) { - return beginSuspendHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listWebWorkerMetricsAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { + return listWebWorkerMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, details, filter) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @param details Include instance details + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> beginSuspendHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String name) { - return beginSuspendHostingEnvironmentSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { + return listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginSuspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param workerPoolName Name of worker pool + ServiceResponse> * @param details Include instance details + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginSuspendHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listWebWorkerMetricsSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginSuspendHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listWebWorkerMetrics(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginSuspendHostingEnvironmentDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5328,116 +5423,126 @@ public Observable>> call(Response }); } - private ServiceResponse> beginSuspendHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWebWorkerMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList resumeHostingEnvironment(final String resourceGroupName, final String name) { - ServiceResponse> response = resumeHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWorkerPoolSkus(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> resumeHostingEnvironmentAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - resumeHostingEnvironmentSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable> resumeHostingEnvironmentAsync(final String resourceGroupName, final String name) { - return resumeHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWorkerPoolSkusWithServiceResponseAsync(resourceGroupName, name, workerPoolName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable>> resumeHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String name) { - return resumeHostingEnvironmentSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWorkerPoolSkusWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(resumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param workerPoolName Name of worker pool + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> resumeHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listWorkerPoolSkusSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.resumeHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listWorkerPoolSkus(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = resumeHostingEnvironmentDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWorkerPoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5445,116 +5550,126 @@ public Observable>> call(Response }); } - private ServiceResponse> resumeHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWorkerPoolSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object if successful. + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the PagedList<UsageInner> object if successful. */ - public PagedList beginResumeHostingEnvironment(final String resourceGroupName, final String name) { - ServiceResponse> response = beginResumeHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerUsages(final String resourceGroupName, final String name, final String workerPoolName) { + ServiceResponse> response = listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> beginResumeHostingEnvironmentAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - beginResumeHostingEnvironmentSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<UsageInner> object */ - public Observable> beginResumeHostingEnvironmentAsync(final String resourceGroupName, final String name) { - return beginResumeHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerUsagesWithServiceResponseAsync(resourceGroupName, name, workerPoolName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param resourceGroupName Name of resource group - * @param name Name of hostingEnvironment (App Service Environment) - * @return the observable to the PagedList<SiteInner> object + * @param name Name of AppServiceEnvironment (App Service Environment) + * @param workerPoolName Name of worker pool + * @return the observable to the PagedList<UsageInner> object */ - public Observable>> beginResumeHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String name) { - return beginResumeHostingEnvironmentSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { + return listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginResumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of hostingEnvironment (App Service Environment) - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of AppServiceEnvironment (App Service Environment) + ServiceResponse> * @param workerPoolName Name of worker pool + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginResumeHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listWebWorkerUsagesSinglePageAsync(final String resourceGroupName, final String name, final String workerPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (workerPoolName == null) { + throw new IllegalArgumentException("Parameter workerPoolName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginResumeHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-09-01"; + return service.listWebWorkerUsages(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginResumeHostingEnvironmentDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5562,103 +5677,107 @@ public Observable>> call(Response }); } - private ServiceResponse> beginResumeHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWebWorkerUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<StampCapacityInner> object if successful. + * @return the PagedList<AppServiceEnvironmentInner> object if successful. */ - public PagedList getHostingEnvironmentCapacitiesNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentCapacitiesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<StampCapacityInner> object + * @return the observable to the PagedList<AppServiceEnvironmentInner> object */ - public Observable> getHostingEnvironmentCapacitiesNextAsync(final String nextPageLink) { - return getHostingEnvironmentCapacitiesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<StampCapacityInner> object + * @return the observable to the PagedList<AppServiceEnvironmentInner> object */ - public Observable>> getHostingEnvironmentCapacitiesNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentCapacitiesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). + * Gets all hostingEnvironments (App Service Environment) for a subscription. + * Gets all hostingEnvironments (App Service Environment) for a subscription. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<StampCapacityInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServiceEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentCapacitiesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentCapacitiesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentCapacitiesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5666,30 +5785,32 @@ public Observable>> call(Response> getHostingEnvironmentCapacitiesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Get all hostingEnvironments (App Service Environments) in a resource group. * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object if successful. + * @return the PagedList<AppServiceEnvironmentInner> object if successful. */ - public PagedList getHostingEnvironmentsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Get all hostingEnvironments (App Service Environments) in a resource group. * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -5697,71 +5818,74 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Get all hostingEnvironments (App Service Environments) in a resource group. * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object + * @return the observable to the PagedList<AppServiceEnvironmentInner> object */ - public Observable> getHostingEnvironmentsNextAsync(final String nextPageLink) { - return getHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** + * Get all hostingEnvironments (App Service Environments) in a resource group. * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object + * @return the observable to the PagedList<AppServiceEnvironmentInner> object */ - public Observable>> getHostingEnvironmentsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Get all hostingEnvironments (App Service Environments) in a resource group. * Get all hostingEnvironments (App Service Environments) in a resource group. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServiceEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5769,102 +5893,107 @@ public Observable>> call(Response< }); } - private ServiceResponse> getHostingEnvironmentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. + * @return the PagedList<StampCapacityInner> object if successful. */ - public PagedList getHostingEnvironmentMetricsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listCapacitiesNext(final String nextPageLink) { + ServiceResponse> response = listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listCapacitiesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listCapacitiesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<StampCapacityInner> object */ - public Observable> getHostingEnvironmentMetricsNextAsync(final String nextPageLink) { - return getHostingEnvironmentMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listCapacitiesNextAsync(final String nextPageLink) { + return listCapacitiesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<StampCapacityInner> object */ - public Observable>> getHostingEnvironmentMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listCapacitiesNextWithServiceResponseAsync(final String nextPageLink) { + return listCapacitiesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listCapacitiesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get global metrics of hostingEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). + * Get used, available, and total worker capacity for AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<StampCapacityInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMetricsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listCapacitiesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listCapacitiesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listCapacitiesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5872,102 +6001,107 @@ public Observable>> call(Response> getHostingEnvironmentMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listCapacitiesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentUsagesNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentUsagesNextAsync(final String nextPageLink) { - return getHostingEnvironmentUsagesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getHostingEnvironmentUsagesNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentUsagesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get global usages of hostingEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). + * Get global metrics of AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentUsagesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMetricsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentUsagesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5975,102 +6109,107 @@ public Observable>> call(Response> getHostingEnvironmentUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. + * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRolePoolsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRolePoolsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMultiRolePoolsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable> getHostingEnvironmentMultiRoleMetricsNextAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMultiRolePoolsNextAsync(final String nextPageLink) { + return listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable>> getHostingEnvironmentMultiRoleMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRolePoolsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get all multi role pools. + * Get all multi role pools. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMultiRolePoolsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentMultiRoleMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMultiRolePoolsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRolePoolsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6078,102 +6217,107 @@ public Observable>> call(Response> getHostingEnvironmentMultiRoleMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRolePoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRoleMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> getHostingEnvironmentWebWorkerMetricsNextAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMultiRoleMetricDefinitionsNextAsync(final String nextPageLink) { + return listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> getHostingEnvironmentWebWorkerMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a multiRole pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMultiRoleMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentWebWorkerMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMultiRoleMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRoleMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6181,102 +6325,107 @@ public Observable>> call(Response> getHostingEnvironmentWebWorkerMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRoleMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricDefinitionsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRoleMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMultiRoleMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getHostingEnvironmentMultiRoleMetricDefinitionsNextAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMultiRoleMetricsNextAsync(final String nextPageLink) { + return listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getHostingEnvironmentMultiRoleMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRoleMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentMultiRoleMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRoleMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a multiRole pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMultiRoleMetricsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentMultiRoleMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMultiRoleMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleMetricDefinitionsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRoleMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6284,102 +6433,107 @@ public Observable>> call(Response> getHostingEnvironmentMultiRoleMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRoleMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object if successful. + * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricDefinitionsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMultiRolePoolSkusNext(final String nextPageLink) { + ServiceResponse> response = listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRolePoolSkusNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMultiRolePoolSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable> getHostingEnvironmentWebWorkerMetricDefinitionsNextAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMultiRolePoolSkusNextAsync(final String nextPageLink) { + return listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable>> getHostingEnvironmentWebWorkerMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMultiRolePoolSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRolePoolSkusNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). + * Get available skus for scaling a multiRole pool. + * Get available skus for scaling a multiRole pool. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMultiRolePoolSkusNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentWebWorkerMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMultiRolePoolSkusNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerMetricDefinitionsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMultiRolePoolSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6387,57 +6541,60 @@ public Observable>> call(Response> getHostingEnvironmentWebWorkerMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMultiRolePoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleUsagesNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listMultiRoleUsagesNext(final String nextPageLink) { + ServiceResponse> response = listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentMultiRoleUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMultiRoleUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink), + listMultiRoleUsagesNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink); + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<UsageInner> object */ - public Observable> getHostingEnvironmentMultiRoleUsagesNextAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextWithServiceResponseAsync(nextPageLink) + public Observable> listMultiRoleUsagesNextAsync(final String nextPageLink) { + return listMultiRoleUsagesNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -6447,13 +6604,14 @@ public Page call(ServiceResponse> response) { } /** - * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a multiRole pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<UsageInner> object */ - public Observable>> getHostingEnvironmentMultiRoleUsagesNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink) + public Observable>> listMultiRoleUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listMultiRoleUsagesNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -6461,27 +6619,28 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMultiRoleUsagesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentMultiRoleUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listMultiRoleUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentMultiRoleUsagesNextDelegate(response); + ServiceResponse> result = listMultiRoleUsagesNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -6490,7 +6649,7 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentMultiRoleUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listMultiRoleUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -6498,94 +6657,99 @@ private ServiceResponse> getHostingEnvironmentMultiRoleUsag } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<UsageInner> object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerUsagesNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList resumeNext(final String nextPageLink) { + ServiceResponse> response = resumeNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebWorkerUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> resumeNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + resumeNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<UsageInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getHostingEnvironmentWebWorkerUsagesNextAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> resumeNextAsync(final String nextPageLink) { + return resumeNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<UsageInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getHostingEnvironmentWebWorkerUsagesNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> resumeNextWithServiceResponseAsync(final String nextPageLink) { + return resumeNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(resumeNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get usages for a worker pool of a hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(final String nextPageLink) { + public Observable>> resumeNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentWebWorkerUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.resumeNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebWorkerUsagesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = resumeNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6593,57 +6757,61 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentWebWorkerUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> resumeNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentSitesNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList beginResumeNext(final String nextPageLink) { + ServiceResponse> response = beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return beginResumeNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> beginResumeNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink), + beginResumeNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); + return beginResumeNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<SiteInner> object */ - public Observable> getHostingEnvironmentSitesNextAsync(final String nextPageLink) { - return getHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink) + public Observable> beginResumeNextAsync(final String nextPageLink) { + return beginResumeNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -6653,13 +6821,14 @@ public Page call(ServiceResponse> response) { } /** - * Get all sites on the hostingEnvironment (App Service Environment). + * Resumes the AppServiceEnvironment. + * Resumes the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getHostingEnvironmentSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink) + public Observable>> beginResumeNextWithServiceResponseAsync(final String nextPageLink) { + return beginResumeNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -6667,27 +6836,28 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentSitesNextSinglePageAsync(final String nextPageLink) { + public Observable>> beginResumeNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginResumeNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentSitesNextDelegate(response); + ServiceResponse> result = beginResumeNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -6696,102 +6866,108 @@ public Observable>> call(Response }); } - private ServiceResponse> getHostingEnvironmentSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> beginResumeNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. + * @return the PagedList<AppServicePlanInner> object if successful. */ - public PagedList getHostingEnvironmentWebHostingPlansNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listAppServicePlansNext(final String nextPageLink) { + ServiceResponse> response = listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentWebHostingPlansNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listAppServicePlansNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listAppServicePlansNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @return the observable to the PagedList<AppServicePlanInner> object */ - public Observable> getHostingEnvironmentWebHostingPlansNextAsync(final String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listAppServicePlansNextAsync(final String nextPageLink) { + return listAppServicePlansNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @return the observable to the PagedList<AppServicePlanInner> object */ - public Observable>> getHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listAppServicePlansNextWithServiceResponseAsync(final String nextPageLink) { + return listAppServicePlansNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAppServicePlansNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). + * Get all serverfarms (App Service Plans) on the AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentWebHostingPlansNextSinglePageAsync(final String nextPageLink) { + public Observable>> listAppServicePlansNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentWebHostingPlansNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listAppServicePlansNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentWebHostingPlansNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listAppServicePlansNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6799,102 +6975,107 @@ public Observable>> call(Respon }); } - private ServiceResponse> getHostingEnvironmentWebHostingPlansNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listAppServicePlansNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentServerFarmsNext(final String nextPageLink) { - ServiceResponse> response = getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebAppsNext(final String nextPageLink) { + ServiceResponse> response = listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getHostingEnvironmentServerFarmsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebAppsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWebAppsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getHostingEnvironmentServerFarmsNextAsync(final String nextPageLink) { - return getHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWebAppsNextAsync(final String nextPageLink) { + return listWebAppsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getHostingEnvironmentServerFarmsNextWithServiceResponseAsync(final String nextPageLink) { - return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebAppsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). + * Get all sites on the AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getHostingEnvironmentServerFarmsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWebAppsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getHostingEnvironmentServerFarmsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWebAppsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getHostingEnvironmentServerFarmsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebAppsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6902,102 +7083,107 @@ public Observable>> call(Respon }); } - private ServiceResponse> getHostingEnvironmentServerFarmsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listWebAppsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all multi role pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<WorkerPoolInner> object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getMultiRolePoolsNext(final String nextPageLink) { - ServiceResponse> response = getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList suspendNext(final String nextPageLink) { + ServiceResponse> response = suspendNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all multi role pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getMultiRolePoolsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> suspendNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getMultiRolePoolsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + suspendNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getMultiRolePoolsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all multi role pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<WorkerPoolInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getMultiRolePoolsNextAsync(final String nextPageLink) { - return getMultiRolePoolsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> suspendNextAsync(final String nextPageLink) { + return suspendNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all multi role pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<WorkerPoolInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getMultiRolePoolsNextWithServiceResponseAsync(final String nextPageLink) { - return getMultiRolePoolsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> suspendNextWithServiceResponseAsync(final String nextPageLink) { + return suspendNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getMultiRolePoolsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(suspendNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all multi role pools. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getMultiRolePoolsNextSinglePageAsync(final String nextPageLink) { + public Observable>> suspendNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getMultiRolePoolsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.suspendNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getMultiRolePoolsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = suspendNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7005,102 +7191,108 @@ public Observable>> call(Response> getMultiRolePoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> suspendNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SkuInfoInner> object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getMultiRolePoolSkusNext(final String nextPageLink) { - ServiceResponse> response = getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList beginSuspendNext(final String nextPageLink) { + ServiceResponse> response = beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getMultiRolePoolSkusNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> beginSuspendNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getMultiRolePoolSkusNextSinglePageAsync(nextPageLink), - new Func1>>>() { + beginSuspendNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SkuInfoInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getMultiRolePoolSkusNextAsync(final String nextPageLink) { - return getMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> beginSuspendNextAsync(final String nextPageLink) { + return beginSuspendNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SkuInfoInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getMultiRolePoolSkusNextWithServiceResponseAsync(final String nextPageLink) { - return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> beginSuspendNextWithServiceResponseAsync(final String nextPageLink) { + return beginSuspendNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getMultiRolePoolSkusNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(beginSuspendNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get available skus for scaling a multiRole pool. + * Suspends the AppServiceEnvironment. + * Suspends the AppServiceEnvironment. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getMultiRolePoolSkusNextSinglePageAsync(final String nextPageLink) { + public Observable>> beginSuspendNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getMultiRolePoolSkusNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.beginSuspendNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getMultiRolePoolSkusNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = beginSuspendNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7108,102 +7300,108 @@ public Observable>> call(Response> getMultiRolePoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> beginSuspendNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get all worker pools. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<WorkerPoolInner> object if successful. + * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getWorkerPoolsNext(final String nextPageLink) { - ServiceResponse> response = getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listUsagesNext(final String nextPageLink) { + ServiceResponse> response = listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get all worker pools. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getWorkerPoolsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getWorkerPoolsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getWorkerPoolsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get all worker pools. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<WorkerPoolInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable> getWorkerPoolsNextAsync(final String nextPageLink) { - return getWorkerPoolsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listUsagesNextAsync(final String nextPageLink) { + return listUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get all worker pools. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<WorkerPoolInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable>> getWorkerPoolsNextWithServiceResponseAsync(final String nextPageLink) { - return getWorkerPoolsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get all worker pools. + * Get global usages of AppServiceEnvironment (App Service Environment). + * Get global usages of AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getWorkerPoolsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listUsagesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getWorkerPoolsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getWorkerPoolsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7211,102 +7409,107 @@ public Observable>> call(Response> getWorkerPoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SkuInfoInner> object if successful. + * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getWorkerPoolSkusNext(final String nextPageLink) { - ServiceResponse> response = getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWorkerPoolsNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getWorkerPoolSkusNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWorkerPoolsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getWorkerPoolSkusNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWorkerPoolsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getWorkerPoolSkusNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SkuInfoInner> object + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable> getWorkerPoolSkusNextAsync(final String nextPageLink) { - return getWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWorkerPoolsNextAsync(final String nextPageLink) { + return listWorkerPoolsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SkuInfoInner> object + * @return the observable to the PagedList<WorkerPoolInner> object */ - public Observable>> getWorkerPoolSkusNextWithServiceResponseAsync(final String nextPageLink) { - return getWorkerPoolSkusNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWorkerPoolsNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWorkerPoolsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get available skus for scaling a worker pool. + * Get all worker pools. + * Get all worker pools. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<WorkerPoolInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getWorkerPoolSkusNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWorkerPoolsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getWorkerPoolSkusNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWorkerPoolsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getWorkerPoolSkusNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWorkerPoolsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7314,102 +7517,107 @@ public Observable>> call(Response> getWorkerPoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listWorkerPoolsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Suspends the hostingEnvironment. + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList suspendHostingEnvironmentNext(final String nextPageLink) { - ServiceResponse> response = suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Suspends the hostingEnvironment. + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> suspendHostingEnvironmentNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - suspendHostingEnvironmentNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Suspends the hostingEnvironment. + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> suspendHostingEnvironmentNextAsync(final String nextPageLink) { - return suspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWebWorkerMetricDefinitionsNextAsync(final String nextPageLink) { + return listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Suspends the hostingEnvironment. + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> suspendHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { - return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(suspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Suspends the hostingEnvironment. + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metric definitions for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> suspendHostingEnvironmentNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWebWorkerMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.suspendHostingEnvironmentNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWebWorkerMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = suspendHostingEnvironmentNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7417,103 +7625,107 @@ public Observable>> call(Response }); } - private ServiceResponse> suspendHostingEnvironmentNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWebWorkerMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList beginSuspendHostingEnvironmentNext(final String nextPageLink) { - ServiceResponse> response = beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerMetricsNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> beginSuspendHostingEnvironmentNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWebWorkerMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> beginSuspendHostingEnvironmentNextAsync(final String nextPageLink) { - return beginSuspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWebWorkerMetricsNextAsync(final String nextPageLink) { + return listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> beginSuspendHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { - return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginSuspendHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Suspends the hostingEnvironment. + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginSuspendHostingEnvironmentNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWebWorkerMetricsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.beginSuspendHostingEnvironmentNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWebWorkerMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginSuspendHostingEnvironmentNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7521,103 +7733,107 @@ public Observable>> call(Response }); } - private ServiceResponse> beginSuspendHostingEnvironmentNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWebWorkerMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList resumeHostingEnvironmentNext(final String nextPageLink) { - ServiceResponse> response = resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWorkerPoolSkusNext(final String nextPageLink) { + ServiceResponse> response = listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> resumeHostingEnvironmentNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWorkerPoolSkusNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - resumeHostingEnvironmentNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWorkerPoolSkusNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable> resumeHostingEnvironmentNextAsync(final String nextPageLink) { - return resumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWorkerPoolSkusNextAsync(final String nextPageLink) { + return listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<SkuInfoInner> object */ - public Observable>> resumeHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { - return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWorkerPoolSkusNextWithServiceResponseAsync(final String nextPageLink) { + return listWorkerPoolSkusNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(resumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWorkerPoolSkusNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Resumes the hostingEnvironment. + * Get available skus for scaling a worker pool. + * Get available skus for scaling a worker pool. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SkuInfoInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> resumeHostingEnvironmentNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWorkerPoolSkusNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.resumeHostingEnvironmentNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWorkerPoolSkusNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = resumeHostingEnvironmentNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWorkerPoolSkusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7625,103 +7841,107 @@ public Observable>> call(Response }); } - private ServiceResponse> resumeHostingEnvironmentNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWorkerPoolSkusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<UsageInner> object if successful. */ - public PagedList beginResumeHostingEnvironmentNext(final String nextPageLink) { - ServiceResponse> response = beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listWebWorkerUsagesNext(final String nextPageLink) { + ServiceResponse> response = listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> beginResumeHostingEnvironmentNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listWebWorkerUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listWebWorkerUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<UsageInner> object */ - public Observable> beginResumeHostingEnvironmentNextAsync(final String nextPageLink) { - return beginResumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listWebWorkerUsagesNextAsync(final String nextPageLink) { + return listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<UsageInner> object */ - public Observable>> beginResumeHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { - return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWebWorkerUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listWebWorkerUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(beginResumeHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listWebWorkerUsagesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Resumes the hostingEnvironment. + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). + * Get usages for a worker pool of a AppServiceEnvironment (App Service Environment). * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<UsageInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginResumeHostingEnvironmentNextSinglePageAsync(final String nextPageLink) { + public Observable>> listWebWorkerUsagesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.beginResumeHostingEnvironmentNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listWebWorkerUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = beginResumeHostingEnvironmentNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listWebWorkerUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7729,10 +7949,9 @@ public Observable>> call(Response }); } - private ServiceResponse> beginResumeHostingEnvironmentNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(202, new TypeToken>() { }.getType()) + private ServiceResponse> listWebWorkerUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmWithRichSkuInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlanInner.java similarity index 64% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmWithRichSkuInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlanInner.java index aead06964cad..36f0e064a57a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmWithRichSkuInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlanInner.java @@ -19,12 +19,12 @@ * App Service Plan Model. */ @JsonFlatten -public class ServerFarmWithRichSkuInner extends Resource { +public class AppServicePlanInner extends Resource { /** * Name for the App Service Plan. */ @JsonProperty(value = "properties.name") - private String serverFarmWithRichSkuName; + private String appServicePlanName; /** * Target worker tier assigned to the App Service Plan. @@ -35,13 +35,13 @@ public class ServerFarmWithRichSkuInner extends Resource { /** * App Service Plan Status. Possible values include: 'Ready', 'Pending'. */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.status") private StatusOptions status; /** * App Service Plan Subscription. */ - @JsonProperty(value = "properties.subscription", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.subscription") private String subscription; /** @@ -67,7 +67,7 @@ public class ServerFarmWithRichSkuInner extends Resource { /** * Geographical location for the App Service Plan. */ - @JsonProperty(value = "properties.geoRegion", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.geoRegion") private String geoRegion; /** @@ -82,13 +82,13 @@ public class ServerFarmWithRichSkuInner extends Resource { /** * Number of web apps assigned to this App Service Plan. */ - @JsonProperty(value = "properties.numberOfSites", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.numberOfSites") private Integer numberOfSites; /** * Resource group of the serverfarm. */ - @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.resourceGroup") private String resourceGroup; /** @@ -97,22 +97,22 @@ public class ServerFarmWithRichSkuInner extends Resource { private SkuDescription sku; /** - * Get the serverFarmWithRichSkuName value. + * Get the appServicePlanName value. * - * @return the serverFarmWithRichSkuName value + * @return the appServicePlanName value */ - public String serverFarmWithRichSkuName() { - return this.serverFarmWithRichSkuName; + public String appServicePlanName() { + return this.appServicePlanName; } /** - * Set the serverFarmWithRichSkuName value. + * Set the appServicePlanName value. * - * @param serverFarmWithRichSkuName the serverFarmWithRichSkuName value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @param appServicePlanName the appServicePlanName value to set + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withServerFarmWithRichSkuName(String serverFarmWithRichSkuName) { - this.serverFarmWithRichSkuName = serverFarmWithRichSkuName; + public AppServicePlanInner withAppServicePlanName(String appServicePlanName) { + this.appServicePlanName = appServicePlanName; return this; } @@ -129,9 +129,9 @@ public String workerTierName() { * Set the workerTierName value. * * @param workerTierName the workerTierName value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withWorkerTierName(String workerTierName) { + public AppServicePlanInner withWorkerTierName(String workerTierName) { this.workerTierName = workerTierName; return this; } @@ -145,6 +145,17 @@ public StatusOptions status() { return this.status; } + /** + * Set the status value. + * + * @param status the status value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withStatus(StatusOptions status) { + this.status = status; + return this; + } + /** * Get the subscription value. * @@ -154,6 +165,17 @@ public String subscription() { return this.subscription; } + /** + * Set the subscription value. + * + * @param subscription the subscription value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSubscription(String subscription) { + this.subscription = subscription; + return this; + } + /** * Get the adminSiteName value. * @@ -167,9 +189,9 @@ public String adminSiteName() { * Set the adminSiteName value. * * @param adminSiteName the adminSiteName value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withAdminSiteName(String adminSiteName) { + public AppServicePlanInner withAdminSiteName(String adminSiteName) { this.adminSiteName = adminSiteName; return this; } @@ -187,9 +209,9 @@ public HostingEnvironmentProfile hostingEnvironmentProfile() { * Set the hostingEnvironmentProfile value. * * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + public AppServicePlanInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { this.hostingEnvironmentProfile = hostingEnvironmentProfile; return this; } @@ -207,9 +229,9 @@ public Integer maximumNumberOfWorkers() { * Set the maximumNumberOfWorkers value. * * @param maximumNumberOfWorkers the maximumNumberOfWorkers value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withMaximumNumberOfWorkers(Integer maximumNumberOfWorkers) { + public AppServicePlanInner withMaximumNumberOfWorkers(Integer maximumNumberOfWorkers) { this.maximumNumberOfWorkers = maximumNumberOfWorkers; return this; } @@ -223,6 +245,17 @@ public String geoRegion() { return this.geoRegion; } + /** + * Set the geoRegion value. + * + * @param geoRegion the geoRegion value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withGeoRegion(String geoRegion) { + this.geoRegion = geoRegion; + return this; + } + /** * Get the perSiteScaling value. * @@ -236,9 +269,9 @@ public Boolean perSiteScaling() { * Set the perSiteScaling value. * * @param perSiteScaling the perSiteScaling value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withPerSiteScaling(Boolean perSiteScaling) { + public AppServicePlanInner withPerSiteScaling(Boolean perSiteScaling) { this.perSiteScaling = perSiteScaling; return this; } @@ -252,6 +285,17 @@ public Integer numberOfSites() { return this.numberOfSites; } + /** + * Set the numberOfSites value. + * + * @param numberOfSites the numberOfSites value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withNumberOfSites(Integer numberOfSites) { + this.numberOfSites = numberOfSites; + return this; + } + /** * Get the resourceGroup value. * @@ -261,6 +305,17 @@ public String resourceGroup() { return this.resourceGroup; } + /** + * Set the resourceGroup value. + * + * @param resourceGroup the resourceGroup value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + /** * Get the sku value. * @@ -274,9 +329,9 @@ public SkuDescription sku() { * Set the sku value. * * @param sku the sku value to set - * @return the ServerFarmWithRichSkuInner object itself. + * @return the AppServicePlanInner object itself. */ - public ServerFarmWithRichSkuInner withSku(SkuDescription sku) { + public AppServicePlanInner withSku(SkuDescription sku) { this.sku = sku; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlansInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlansInner.java new file mode 100644 index 000000000000..ae06501b6053 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/AppServicePlansInner.java @@ -0,0 +1,4110 @@ +/** + * 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.website.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceCall; +import com.microsoft.azure.AzureServiceResponseBuilder; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCall; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AppServicePlans. + */ +public final class AppServicePlansInner { + /** The Retrofit service to perform REST calls. */ + private AppServicePlansService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of AppServicePlansInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AppServicePlansInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(AppServicePlansService.class); + this.client = client; + } + + /** + * The interface defining all the services for AppServicePlans to be + * used by Retrofit to perform actually REST calls. + */ + interface AppServicePlansService { + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("detailed") Boolean detailed, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServicePlanInner appServicePlan, @Query("allowPendingState") Boolean allowPendingState, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AppServicePlanInner appServicePlan, @Query("allowPendingState") Boolean allowPendingState, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") + Observable> listCapabilities(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> getHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> updateHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner connection, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", method = "DELETE", hasBody = true) + Observable> deleteHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") + Observable> listHybridConnectionKeys(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") + Observable> listHybridConnectionWebApps(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") + Observable> getHybridConnectionPlanLimit(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") + Observable> listHybridConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions") + Observable> listMetricDefintions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics") + Observable> listMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/operationresults/{operationId}") + Observable> getOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") + Observable> restartWebApps(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") + Observable> listWebApps(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$skipToken") String skipToken, @Query("$filter") String filter, @Query("$top") String top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") + Observable> listVnets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") + Observable> getVnetFromServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + Observable> getVnetGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + Observable> updateVnetGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") + Observable> listtRoutesForVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + Observable> getRouteForVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + Observable> createOrUpdateVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body VnetRouteInner route, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}", method = "DELETE", hasBody = true) + Observable> deleteVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + Observable> updateVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body VnetRouteInner route, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") + Observable> rebootWorker(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerName") String workerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listMetricDefintionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listWebAppsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + final Boolean detailed = null; + return service.list(this.client.subscriptionId(), detailed, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. + Retrieval of all properties may increase the API latency. + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList list(final Boolean detailed) { + ServiceResponse> response = listSinglePageAsync(detailed).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. + Retrieval of all properties may increase the API latency. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listAsync(final Boolean detailed, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(detailed), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. + Retrieval of all properties may increase the API latency. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listAsync(final Boolean detailed) { + return listWithServiceResponseAsync(detailed) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. + Retrieval of all properties may increase the API latency. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listWithServiceResponseAsync(final Boolean detailed) { + return listSinglePageAsync(detailed) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + ServiceResponse> * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. + Retrieval of all properties may increase the API latency. + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final Boolean detailed) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.list(this.client.subscriptionId(), detailed, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param resourceGroupName Name of resource group + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param resourceGroupName Name of resource group + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + ServiceResponse> * @param resourceGroupName Name of resource group + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets specified App Service Plan in a resource group. + * Gets specified App Service Plan in a resource group. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner get(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Gets specified App Service Plan in a resource group. + * Gets specified App Service Plan in a resource group. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets specified App Service Plan in a resource group. + * Gets specified App Service Plan in a resource group. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets specified App Service Plan in a resource group. + * Gets specified App Service Plan in a resource group. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.get(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner createOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().last().getBody(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appServicePlan == null) { + throw new IllegalArgumentException("Parameter appServicePlan is required and cannot be null."); + } + Validator.validate(appServicePlan); + final String apiVersion = "2016-09-01"; + final Boolean allowPendingState = null; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, allowPendingState, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner createOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState).toBlocking().last().getBody(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appServicePlan == null) { + throw new IllegalArgumentException("Parameter appServicePlan is required and cannot be null."); + } + Validator.validate(appServicePlan); + final String apiVersion = "2016-09-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, allowPendingState, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner beginCreateOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().single().getBody(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appServicePlan == null) { + throw new IllegalArgumentException("Parameter appServicePlan is required and cannot be null."); + } + Validator.validate(appServicePlan); + final String apiVersion = "2016-09-01"; + final Boolean allowPendingState = null; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, allowPendingState, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner beginCreateOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState).toBlocking().single().getBody(); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, appServicePlan, allowPendingState).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates or updates an App Service Plan. + * Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param appServicePlan Details of App Service Plan + * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan + * @return the observable to the AppServicePlanInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, AppServicePlanInner appServicePlan, Boolean allowPendingState) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appServicePlan == null) { + throw new IllegalArgumentException("Parameter appServicePlan is required and cannot be null."); + } + Validator.validate(appServicePlan); + final String apiVersion = "2016-09-01"; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, allowPendingState, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a App Service Plan. + * Deletes a App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the Object object if successful. + */ + public Object delete(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Deletes a App Service Plan. + * Deletes a App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes a App Service Plan. + * Deletes a App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the Object object + */ + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Deletes a App Service Plan. + * Deletes a App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the Object object + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.delete(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List serverfarm capabilities. + * List serverfarm capabilities. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the List<CapabilityInner> object if successful. + */ + public List listCapabilities(String resourceGroupName, String name) { + return listCapabilitiesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * List serverfarm capabilities. + * List serverfarm capabilities. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listCapabilitiesAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listCapabilitiesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * List serverfarm capabilities. + * List serverfarm capabilities. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the observable to the List<CapabilityInner> object + */ + public Observable> listCapabilitiesAsync(String resourceGroupName, String name) { + return listCapabilitiesWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * List serverfarm capabilities. + * List serverfarm capabilities. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the observable to the List<CapabilityInner> object + */ + public Observable>> listCapabilitiesWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listCapabilities(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listCapabilitiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCapabilitiesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the HybridConnectionInner object + */ + public Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * Retrieves a specific Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the HybridConnectionInner object + */ + public Observable> getHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param connection The hybrid connection entity + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner updateHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connection) { + return updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connection).toBlocking().single().getBody(); + } + + /** + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param connection The hybrid connection entity + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connection, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connection), serviceCallback); + } + + /** + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param connection The hybrid connection entity + * @return the observable to the HybridConnectionInner object + */ + public Observable updateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connection) { + return updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connection).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * Updates an existing Service Bus Hybrid Connection in use on this App Service Plan. This will fail if the Hybrid Connection does not already exist. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param connection The hybrid connection entity + * @return the observable to the HybridConnectionInner object + */ + public Observable> updateHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connection) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connection == null) { + throw new IllegalArgumentException("Parameter connection is required and cannot be null."); + } + Validator.validate(connection); + final String apiVersion = "2016-09-01"; + return service.updateHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), connection, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the Object object if successful. + */ + public Object deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); + } + + /** + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the Object object + */ + public Observable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * Deletes an existing Service Bus Hybrid Connection in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the Object object + */ + public Observable> deleteHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the send key name and value for this Hybrid Connection. + * Gets the send key name and value for this Hybrid Connection. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the HybridConnectionKeyInner object if successful. + */ + public HybridConnectionKeyInner listHybridConnectionKeys(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); + } + + /** + * Gets the send key name and value for this Hybrid Connection. + * Gets the send key name and value for this Hybrid Connection. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Gets the send key name and value for this Hybrid Connection. + * Gets the send key name and value for this Hybrid Connection. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the HybridConnectionKeyInner object + */ + public Observable listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, HybridConnectionKeyInner>() { + @Override + public HybridConnectionKeyInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets the send key name and value for this Hybrid Connection. + * Gets the send key name and value for this Hybrid Connection. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param namespaceName The name of the Service Bus Namespace + * @param relayName The name of the Service Bus Relay + * @return the observable to the HybridConnectionKeyInner object + */ + public Observable> listHybridConnectionKeysWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param namespaceName The Hybrid Connection namespace + * @param relayName The Hybrid Connection relay name + * @return the Object object if successful. + */ + public Object listHybridConnectionWebApps(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionWebAppsWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); + } + + /** + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param namespaceName The Hybrid Connection namespace + * @param relayName The Hybrid Connection relay name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listHybridConnectionWebAppsAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionWebAppsWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); + } + + /** + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param namespaceName The Hybrid Connection namespace + * @param relayName The Hybrid Connection relay name + * @return the observable to the Object object + */ + public Observable listHybridConnectionWebAppsAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionWebAppsWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * Gets a list of sites that are using a particular Hybrid Connection on an App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param namespaceName The Hybrid Connection namespace + * @param relayName The Hybrid Connection relay name + * @return the observable to the Object object + */ + public Observable> listHybridConnectionWebAppsWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listHybridConnectionWebApps(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionWebAppsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @return the Object object if successful. + */ + public Object getHybridConnectionPlanLimit(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getHybridConnectionPlanLimitAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @return the observable to the Object object + */ + public Observable getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * Gets the maximum number of Hybrid Connections allowed on a specified App Service Plan. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @return the observable to the Object object + */ + public Observable> getHybridConnectionPlanLimitWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getHybridConnectionPlanLimit(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionPlanLimitDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionPlanLimitDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the HybridConnectionInner object if successful. + */ + public HybridConnectionInner listHybridConnections(String resourceGroupName, String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listHybridConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the observable to the HybridConnectionInner object + */ + public Observable listHybridConnectionsAsync(String resourceGroupName, String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * Retrieves all Service Bus Hybrid Connections in use on this App Service Plan. + * + * @param resourceGroupName The resource group name + * @param name The name of the App Service Plan + * @return the observable to the HybridConnectionInner object + */ + public Observable> listHybridConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listHybridConnections(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the PagedList<MetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefintions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricDefintionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listMetricDefintionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricDefintionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable> listMetricDefintionsAsync(final String resourceGroupName, final String name) { + return listMetricDefintionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable>> listMetricDefintionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricDefintionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of App Service Plan + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricDefintionsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listMetricDefintions(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricDefintionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefintionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsAsync(final String resourceGroupName, final String name) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + final Boolean details = null; + final String filter = null; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param details If true, metrics are broken down per App Service Plan instance + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param details If true, metrics are broken down per App Service Plan instance + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param details If true, metrics are broken down per App Service Plan instance + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param details If true, metrics are broken down per App Service Plan instance + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsSinglePageAsync(resourceGroupName, name, details, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of App Service Plan + ServiceResponse> * @param details If true, metrics are broken down per App Service Plan instance + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a server farm operation. + * Gets a server farm operation. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param operationId Id of Server farm operation"&gt; + * @return the AppServicePlanInner object if successful. + */ + public AppServicePlanInner getOperation(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); + } + + /** + * Gets a server farm operation. + * Gets a server farm operation. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param operationId Id of Server farm operation"&gt; + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + } + + /** + * Gets a server farm operation. + * Gets a server farm operation. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param operationId Id of Server farm operation"&gt; + * @return the observable to the AppServicePlanInner object + */ + public Observable getOperationAsync(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, AppServicePlanInner>() { + @Override + public AppServicePlanInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets a server farm operation. + * Gets a server farm operation. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param operationId Id of Server farm operation"&gt; + * @return the observable to the AppServicePlanInner object + */ + public Observable> getOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the Object object if successful. + */ + public Object restartWebApps(String resourceGroupName, String name) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall restartWebAppsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartWebAppsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the Object object + */ + public Observable restartWebAppsAsync(String resourceGroupName, String name) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the Object object + */ + public Observable> restartWebAppsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + final Boolean softRestart = null; + return service.restartWebApps(resourceGroupName, name, this.client.subscriptionId(), softRestart, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartWebAppsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps + * @return the Object object if successful. + */ + public Object restartWebApps(String resourceGroupName, String name, Boolean softRestart) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart).toBlocking().single().getBody(); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall restartWebAppsAsync(String resourceGroupName, String name, Boolean softRestart, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart), serviceCallback); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps + * @return the observable to the Object object + */ + public Observable restartWebAppsAsync(String resourceGroupName, String name, Boolean softRestart) { + return restartWebAppsWithServiceResponseAsync(resourceGroupName, name, softRestart).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Restarts web apps in a specified App Service Plan. + * Restarts web apps in a specified App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps + * @return the observable to the Object object + */ + public Observable> restartWebAppsWithServiceResponseAsync(String resourceGroupName, String name, Boolean softRestart) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.restartWebApps(resourceGroupName, name, this.client.subscriptionId(), softRestart, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartWebAppsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse restartWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebApps(final String resourceGroupName, final String name) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listWebAppsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebAppsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listWebAppsAsync(final String resourceGroupName, final String name) { + return listWebAppsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWebAppsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listWebAppsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + final String skipToken = null; + final String filter = null; + final String top = null; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running + * @param top List page size. If specified, results are paged. + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebApps(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { + ServiceResponse> response = listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running + * @param top List page size. If specified, results are paged. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listWebAppsAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running + * @param top List page size. If specified, results are paged. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listWebAppsAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { + return listWebAppsWithServiceResponseAsync(resourceGroupName, name, skipToken, filter, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running + * @param top List page size. If specified, results are paged. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWebAppsWithServiceResponseAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { + return listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of App Service Plan + ServiceResponse> * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list + ServiceResponse> * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running + ServiceResponse> * @param top List page size. If specified, results are paged. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsSinglePageAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets list of vnets associated with App Service Plan. + * Gets list of vnets associated with App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnets(String resourceGroupName, String name) { + return listVnetsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Gets list of vnets associated with App Service Plan. + * Gets list of vnets associated with App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listVnetsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listVnetsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets list of vnets associated with App Service Plan. + * Gets list of vnets associated with App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the List<VnetInfoInner> object + */ + public Observable> listVnetsAsync(String resourceGroupName, String name) { + return listVnetsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets list of vnets associated with App Service Plan. + * Gets list of vnets associated with App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @return the observable to the List<VnetInfoInner> object + */ + public Observable>> listVnetsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listVnets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a vnet associated with an App Service Plan. + * Gets a vnet associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { + return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + } + + /** + * Gets a vnet associated with an App Service Plan. + * Gets a vnet associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Gets a vnet associated with an App Service Plan. + * Gets a vnet associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the observable to the VnetInfoInner object + */ + public Observable getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName) { + return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets a vnet associated with an App Service Plan. + * Gets a vnet associated with an App Service Plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the observable to the VnetInfoInner object + */ + public Observable> getVnetFromServerFarmWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getVnetFromServerFarm(resourceGroupName, name, vnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetFromServerFarmDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetFromServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the vnet gateway. + * Gets the vnet gateway. + * + * @param resourceGroupName Name of resource group + * @param name Name of the App Service Plan + * @param vnetName Name of the virtual network + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().getBody(); + } + + /** + * Gets the vnet gateway. + * Gets the vnet gateway. + * + * @param resourceGroupName Name of resource group + * @param name Name of the App Service Plan + * @param vnetName Name of the virtual network + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); + } + + /** + * Gets the vnet gateway. + * Gets the vnet gateway. + * + * @param resourceGroupName Name of resource group + * @param name Name of the App Service Plan + * @param vnetName Name of the virtual network + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @return the observable to the VnetGatewayInner object + */ + public Observable getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets the vnet gateway. + * Gets the vnet gateway. + * + * @param resourceGroupName Name of resource group + * @param name Name of the App Service Plan + * @param vnetName Name of the virtual network + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @return the observable to the VnetGatewayInner object + */ + public Observable> getVnetGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the vnet gateway. + * Updates the vnet gateway. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param vnetName The name of the virtual network + * @param gatewayName The name of the gateway. Only 'primary' is supported. + * @param connectionEnvelope The gateway entity. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner updateVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return updateVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Updates the vnet gateway. + * Updates the vnet gateway. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param vnetName The name of the virtual network + * @param gatewayName The name of the gateway. Only 'primary' is supported. + * @param connectionEnvelope The gateway entity. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Updates the vnet gateway. + * Updates the vnet gateway. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param vnetName The name of the virtual network + * @param gatewayName The name of the gateway. Only 'primary' is supported. + * @param connectionEnvelope The gateway entity. + * @return the observable to the VnetGatewayInner object + */ + public Observable updateVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return updateVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates the vnet gateway. + * Updates the vnet gateway. + * + * @param resourceGroupName The resource group + * @param name The name of the App Service Plan + * @param vnetName The name of the virtual network + * @param gatewayName The name of the gateway. Only 'primary' is supported. + * @param connectionEnvelope The gateway entity. + * @return the observable to the VnetGatewayInner object + */ + public Observable> updateVnetGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-09-01"; + return service.updateVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of all routes associated with a vnet, in an app service plan. + * Gets a list of all routes associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the List<VnetRouteInner> object if successful. + */ + public List listtRoutesForVnet(String resourceGroupName, String name, String vnetName) { + return listtRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + } + + /** + * Gets a list of all routes associated with a vnet, in an app service plan. + * Gets a list of all routes associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listtRoutesForVnetAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listtRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Gets a list of all routes associated with a vnet, in an app service plan. + * Gets a list of all routes associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the observable to the List<VnetRouteInner> object + */ + public Observable> listtRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { + return listtRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets a list of all routes associated with a vnet, in an app service plan. + * Gets a list of all routes associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @return the observable to the List<VnetRouteInner> object + */ + public Observable>> listtRoutesForVnetWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.listtRoutesForVnet(resourceGroupName, name, vnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listtRoutesForVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listtRoutesForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a specific route associated with a vnet, in an app service plan. + * Gets a specific route associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the List<VnetRouteInner> object if successful. + */ + public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) { + return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); + } + + /** + * Gets a specific route associated with a vnet, in an app service plan. + * Gets a specific route associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback> serviceCallback) { + return ServiceCall.create(getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); + } + + /** + * Gets a specific route associated with a vnet, in an app service plan. + * Gets a specific route associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the observable to the List<VnetRouteInner> object + */ + public Observable> getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName) { + return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets a specific route associated with a vnet, in an app service plan. + * Gets a specific route associated with a vnet, in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the observable to the List<VnetRouteInner> object + */ + public Observable>> getRouteForVnetWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.getRouteForVnet(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getRouteForVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getRouteForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the VnetRouteInner object if successful. + */ + public VnetRouteInner createOrUpdateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).toBlocking().single().getBody(); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the observable to the VnetRouteInner object + */ + public Observable createOrUpdateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).map(new Func1, VnetRouteInner>() { + @Override + public VnetRouteInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the observable to the VnetRouteInner object + */ + public Observable> createOrUpdateVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (route == null) { + throw new IllegalArgumentException("Parameter route is required and cannot be null."); + } + Validator.validate(route); + final String apiVersion = "2016-09-01"; + return service.createOrUpdateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an existing route for a vnet in an app service plan. + * Deletes an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the Object object if successful. + */ + public Object deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { + return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); + } + + /** + * Deletes an existing route for a vnet in an app service plan. + * Deletes an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); + } + + /** + * Deletes an existing route for a vnet in an app service plan. + * Deletes an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the observable to the Object object + */ + public Observable deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName) { + return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Deletes an existing route for a vnet in an app service plan. + * Deletes an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @return the observable to the Object object + */ + public Observable> deleteVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.deleteVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the VnetRouteInner object if successful. + */ + public VnetRouteInner updateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).toBlocking().single().getBody(); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the observable to the VnetRouteInner object + */ + public Observable updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).map(new Func1, VnetRouteInner>() { + @Override + public VnetRouteInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Creates a new route or updates an existing route for a vnet in an app service plan. + * Creates a new route or updates an existing route for a vnet in an app service plan. + * + * @param resourceGroupName Name of resource group + * @param name Name of App Service Plan + * @param vnetName Name of virtual network + * @param routeName Name of the virtual network route + * @param route The route object + * @return the observable to the VnetRouteInner object + */ + public Observable> updateVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (routeName == null) { + throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (route == null) { + throw new IllegalArgumentException("Parameter route is required and cannot be null."); + } + Validator.validate(route); + final String apiVersion = "2016-09-01"; + return service.updateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(400, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Submit a reboot request for a worker machine in the specified server farm. + * Submit a reboot request for a worker machine in the specified server farm. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param workerName Name of worker machine, typically starts with RD + * @return the Object object if successful. + */ + public Object rebootWorker(String resourceGroupName, String name, String workerName) { + return rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName).toBlocking().single().getBody(); + } + + /** + * Submit a reboot request for a worker machine in the specified server farm. + * Submit a reboot request for a worker machine in the specified server farm. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param workerName Name of worker machine, typically starts with RD + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall rebootWorkerAsync(String resourceGroupName, String name, String workerName, final ServiceCallback serviceCallback) { + return ServiceCall.create(rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName), serviceCallback); + } + + /** + * Submit a reboot request for a worker machine in the specified server farm. + * Submit a reboot request for a worker machine in the specified server farm. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param workerName Name of worker machine, typically starts with RD + * @return the observable to the Object object + */ + public Observable rebootWorkerAsync(String resourceGroupName, String name, String workerName) { + return rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Submit a reboot request for a worker machine in the specified server farm. + * Submit a reboot request for a worker machine in the specified server farm. + * + * @param resourceGroupName Name of resource group + * @param name Name of server farm + * @param workerName Name of worker machine, typically starts with RD + * @return the observable to the Object object + */ + public Observable> rebootWorkerWithServiceResponseAsync(String resourceGroupName, String name, String workerName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (workerName == null) { + throw new IllegalArgumentException("Parameter workerName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-09-01"; + return service.rebootWorker(resourceGroupName, name, workerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = rebootWorkerDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse rebootWorkerDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all App Service Plans for a subcription. + * Gets all App Service Plans for a subcription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServicePlanInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<AppServicePlanInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets collection of App Service Plans in a resource group for a given subscription. + * Gets collection of App Service Plans in a resource group for a given subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<AppServicePlanInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object if successful. + */ + public PagedList listMetricDefintionsNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listMetricDefintionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricDefintionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable> listMetricDefintionsNextAsync(final String nextPageLink) { + return listMetricDefintionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable>> listMetricDefintionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefintionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List of metrics that can be queried for an App Service Plan. + * List of metrics that can be queried for an App Service Plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricDefintionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listMetricDefintionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricDefintionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricDefintionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object if successful. + */ + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Queries for App Serice Plan metrics. + * Queries for App Serice Plan metrics. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listWebAppsNext(final String nextPageLink) { + ServiceResponse> response = listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listWebAppsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listWebAppsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listWebAppsNextAsync(final String nextPageLink) { + return listWebAppsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listWebAppsNextWithServiceResponseAsync(final String nextPageLink) { + return listWebAppsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listWebAppsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of Apps associated with an App Service Plan. + * Gets list of Apps associated with an App Service Plan. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listWebAppsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listWebAppsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CapabilityInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CapabilityInner.java new file mode 100644 index 000000000000..3c802234df6b --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CapabilityInner.java @@ -0,0 +1,91 @@ +/** + * 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.website.implementation; + + +/** + * Description of a Sku Capability. + */ +public class CapabilityInner { + /** + * Name of the sku capability. + */ + private String name; + + /** + * Value of the sku capability. + */ + private String value; + + /** + * Reason of the sku capability. + */ + private String reason; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the CapabilityInner object itself. + */ + public CapabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the CapabilityInner object itself. + */ + public CapabilityInner withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the reason value. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason value. + * + * @param reason the reason value to set + * @return the CapabilityInner object itself. + */ + public CapabilityInner withReason(String reason) { + this.reason = reason; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java index 3bb4718d7373..e94e7d88953d 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java @@ -62,29 +62,33 @@ public CertificatesInner(Retrofit retrofit, WebSiteManagementClientImpl client) * used by Retrofit to perform actually REST calls. */ interface CertificatesService { + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") - Observable> getCertificates(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") - Observable> getCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") - Observable> createOrUpdateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateInner certificateEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateInner certificateEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}", method = "DELETE", hasBody = true) - Observable> deleteCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") - Observable> updateCertificate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateInner certificateEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CertificateInner certificateEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/csrs") - Observable> getCsrs(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCsrs(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/csrs/{name}") @@ -104,53 +108,163 @@ interface CertificatesService { @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getCertificatesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getCertificates(final String resourceGroupName) { - ServiceResponse> response = getCertificatesSinglePageAsync(resourceGroupName).toBlocking().single(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificatesAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getCertificatesSinglePageAsync(resourceGroupName), + listByResourceGroupSinglePageAsync(resourceGroupName), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the PagedList<CertificateInner> object */ - public Observable> getCertificatesAsync(final String resourceGroupName) { - return getCertificatesWithServiceResponseAsync(resourceGroupName) + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -160,13 +274,14 @@ public Page call(ServiceResponse> respo } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the PagedList<CertificateInner> object */ - public Observable>> getCertificatesWithServiceResponseAsync(final String resourceGroupName) { - return getCertificatesSinglePageAsync(resourceGroupName) + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -174,33 +289,32 @@ public Observable>> call(ServiceResponse< if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getCertificatesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * ServiceResponse> * @param resourceGroupName Name of the resource group * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getCertificatesSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCertificates(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getCertificatesDelegate(response); + ServiceResponse> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -209,7 +323,7 @@ public Observable>> call(Response> getCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -217,17 +331,19 @@ private ServiceResponse> getCertificatesDelegate(Resp } /** + * Get a certificate by certificate name for a subscription in the specified resource group. * Get a certificate by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @return the CertificateInner object if successful. */ - public CertificateInner getCertificate(String resourceGroupName, String name) { - return getCertificateWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public CertificateInner get(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** + * Get a certificate by certificate name for a subscription in the specified resource group. * Get a certificate by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group @@ -235,19 +351,20 @@ public CertificateInner getCertificate(String resourceGroupName, String name) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getCertificateAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getCertificateWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** + * Get a certificate by certificate name for a subscription in the specified resource group. * Get a certificate by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @return the observable to the CertificateInner object */ - public Observable getCertificateAsync(String resourceGroupName, String name) { - return getCertificateWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CertificateInner>() { + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CertificateInner>() { @Override public CertificateInner call(ServiceResponse response) { return response.getBody(); @@ -256,13 +373,14 @@ public CertificateInner call(ServiceResponse response) { } /** + * Get a certificate by certificate name for a subscription in the specified resource group. * Get a certificate by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @return the observable to the CertificateInner object */ - public Observable> getCertificateWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -272,15 +390,13 @@ public Observable> getCertificateWithServiceRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCertificate(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.get(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getCertificateDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -289,7 +405,7 @@ public Observable> call(Response }); } - private ServiceResponse getCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -297,6 +413,7 @@ private ServiceResponse getCertificateDelegate(Response getCertificateDelegate(Response createOrUpdateCertificateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -329,8 +448,8 @@ public ServiceCall createOrUpdateCertificateAsync(String resou * @param certificateEnvelope Details of certificate if it exists already. * @return the observable to the CertificateInner object */ - public Observable createOrUpdateCertificateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { - return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { @Override public CertificateInner call(ServiceResponse response) { return response.getBody(); @@ -339,6 +458,7 @@ public CertificateInner call(ServiceResponse response) { } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -346,7 +466,7 @@ public CertificateInner call(ServiceResponse response) { * @param certificateEnvelope Details of certificate if it exists already. * @return the observable to the CertificateInner object */ - public Observable> createOrUpdateCertificateWithServiceResponseAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -359,16 +479,14 @@ public Observable> createOrUpdateCertificateWi if (certificateEnvelope == null) { throw new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(certificateEnvelope); - return service.createOrUpdateCertificate(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateCertificateDelegate(response); + ServiceResponse clientResponse = createOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -377,7 +495,7 @@ public Observable> call(Response }); } - private ServiceResponse createOrUpdateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -385,17 +503,19 @@ private ServiceResponse createOrUpdateCertificateDelegate(Resp } /** + * Delete a certificate by name in a specificed subscription and resourcegroup. * Delete a certificate by name in a specificed subscription and resourcegroup. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate to be deleted. * @return the Object object if successful. */ - public Object deleteCertificate(String resourceGroupName, String name) { - return deleteCertificateWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object delete(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** + * Delete a certificate by name in a specificed subscription and resourcegroup. * Delete a certificate by name in a specificed subscription and resourcegroup. * * @param resourceGroupName Name of the resource group @@ -403,19 +523,20 @@ public Object deleteCertificate(String resourceGroupName, String name) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteCertificateAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteCertificateWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** + * Delete a certificate by name in a specificed subscription and resourcegroup. * Delete a certificate by name in a specificed subscription and resourcegroup. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate to be deleted. * @return the observable to the Object object */ - public Observable deleteCertificateAsync(String resourceGroupName, String name) { - return deleteCertificateWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -424,13 +545,14 @@ public Object call(ServiceResponse response) { } /** + * Delete a certificate by name in a specificed subscription and resourcegroup. * Delete a certificate by name in a specificed subscription and resourcegroup. * * @param resourceGroupName Name of the resource group * @param name Name of the certificate to be deleted. * @return the observable to the Object object */ - public Observable> deleteCertificateWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -440,15 +562,13 @@ public Observable> deleteCertificateWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteCertificate(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.delete(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteCertificateDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -457,7 +577,7 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -465,6 +585,7 @@ private ServiceResponse deleteCertificateDelegate(Response } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -472,11 +593,12 @@ private ServiceResponse deleteCertificateDelegate(Response * @param certificateEnvelope Details of certificate if it exists already. * @return the CertificateInner object if successful. */ - public CertificateInner updateCertificate(String resourceGroupName, String name, CertificateInner certificateEnvelope) { - return updateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().getBody(); + public CertificateInner update(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().getBody(); } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -485,11 +607,12 @@ public CertificateInner updateCertificate(String resourceGroupName, String name, * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateCertificateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); + public ServiceCall updateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -497,8 +620,8 @@ public ServiceCall updateCertificateAsync(String resourceGroup * @param certificateEnvelope Details of certificate if it exists already. * @return the observable to the CertificateInner object */ - public Observable updateCertificateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { - return updateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { + public Observable updateAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { @Override public CertificateInner call(ServiceResponse response) { return response.getBody(); @@ -507,6 +630,7 @@ public CertificateInner call(ServiceResponse response) { } /** + * Creates or modifies an existing certificate. * Creates or modifies an existing certificate. * * @param resourceGroupName Name of the resource group @@ -514,7 +638,7 @@ public CertificateInner call(ServiceResponse response) { * @param certificateEnvelope Details of certificate if it exists already. * @return the observable to the CertificateInner object */ - public Observable> updateCertificateWithServiceResponseAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String name, CertificateInner certificateEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -527,16 +651,14 @@ public Observable> updateCertificateWithServic if (certificateEnvelope == null) { throw new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(certificateEnvelope); - return service.updateCertificate(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.update(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateCertificateDelegate(response); + ServiceResponse clientResponse = updateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -545,7 +667,7 @@ public Observable> call(Response }); } - private ServiceResponse updateCertificateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -553,34 +675,37 @@ private ServiceResponse updateCertificateDelegate(Response getCsrs(String resourceGroupName) { - return getCsrsWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); + public List listCsrs(String resourceGroupName) { + return listCsrsWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } /** + * Gets the certificate signing requests for a subscription in the specified resource group. * Gets the certificate signing requests for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCsrsAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getCsrsWithServiceResponseAsync(resourceGroupName), serviceCallback); + public ServiceCall> listCsrsAsync(String resourceGroupName, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listCsrsWithServiceResponseAsync(resourceGroupName), serviceCallback); } /** + * Gets the certificate signing requests for a subscription in the specified resource group. * Gets the certificate signing requests for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the List<CsrInner> object */ - public Observable> getCsrsAsync(String resourceGroupName) { - return getCsrsWithServiceResponseAsync(resourceGroupName).map(new Func1>, List>() { + public Observable> listCsrsAsync(String resourceGroupName) { + return listCsrsWithServiceResponseAsync(resourceGroupName).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.getBody(); @@ -589,27 +714,26 @@ public List call(ServiceResponse> response) { } /** + * Gets the certificate signing requests for a subscription in the specified resource group. * Gets the certificate signing requests for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the List<CsrInner> object */ - public Observable>> getCsrsWithServiceResponseAsync(String resourceGroupName) { + public Observable>> listCsrsWithServiceResponseAsync(String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCsrs(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.listCsrs(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getCsrsDelegate(response); + ServiceResponse> clientResponse = listCsrsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -618,7 +742,7 @@ public Observable>> call(Response r }); } - private ServiceResponse> getCsrsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listCsrsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -626,6 +750,7 @@ private ServiceResponse> getCsrsDelegate(Response r } /** + * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group @@ -637,6 +762,7 @@ public CsrInner getCsr(String resourceGroupName, String name) { } /** + * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group @@ -649,6 +775,7 @@ public ServiceCall getCsrAsync(String resourceGroupName, String name, } /** + * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group @@ -665,6 +792,7 @@ public CsrInner call(ServiceResponse response) { } /** + * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * Gets a certificate signing request by certificate name for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group @@ -681,10 +809,8 @@ public Observable> getCsrWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getCsr(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.getCsr(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -706,6 +832,7 @@ private ServiceResponse getCsrDelegate(Response response } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -718,6 +845,7 @@ public CsrInner createOrUpdateCsr(String resourceGroupName, String name, CsrInne } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -731,6 +859,7 @@ public ServiceCall createOrUpdateCsrAsync(String resourceGroupName, St } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -748,6 +877,7 @@ public CsrInner call(ServiceResponse response) { } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -768,11 +898,9 @@ public Observable> createOrUpdateCsrWithServiceRespons if (csrEnvelope == null) { throw new IllegalArgumentException("Parameter csrEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(csrEnvelope); - return service.createOrUpdateCsr(resourceGroupName, name, this.client.subscriptionId(), csrEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.createOrUpdateCsr(resourceGroupName, name, this.client.subscriptionId(), csrEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -794,6 +922,7 @@ private ServiceResponse createOrUpdateCsrDelegate(Response deleteCsrAsync(String resourceGroupName, String name, } /** + * Delete the certificate signing request. * Delete the certificate signing request. * * @param resourceGroupName Name of the resource group @@ -833,6 +964,7 @@ public Object call(ServiceResponse response) { } /** + * Delete the certificate signing request. * Delete the certificate signing request. * * @param resourceGroupName Name of the resource group @@ -849,10 +981,8 @@ public Observable> deleteCsrWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteCsr(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.deleteCsr(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -874,6 +1004,7 @@ private ServiceResponse deleteCsrDelegate(Response respons } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -886,6 +1017,7 @@ public CsrInner updateCsr(String resourceGroupName, String name, CsrInner csrEnv } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -899,6 +1031,7 @@ public ServiceCall updateCsrAsync(String resourceGroupName, String nam } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -916,6 +1049,7 @@ public CsrInner call(ServiceResponse response) { } /** + * Creates or modifies an existing certificate signing request. * Creates or modifies an existing certificate signing request. * * @param resourceGroupName Name of the resource group @@ -936,11 +1070,9 @@ public Observable> updateCsrWithServiceResponseAsync(S if (csrEnvelope == null) { throw new IllegalArgumentException("Parameter csrEnvelope is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(csrEnvelope); - return service.updateCsr(resourceGroupName, name, this.client.subscriptionId(), csrEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.updateCsr(resourceGroupName, name, this.client.subscriptionId(), csrEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -962,22 +1094,132 @@ private ServiceResponse updateCsrDelegate(Response respo } /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<CertificateInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<CertificateInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all certificates for a subscription. + * Get all certificates for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getCertificatesNext(final String nextPageLink) { - ServiceResponse> response = getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -985,26 +1227,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getCertificatesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getCertificatesNextSinglePageAsync(nextPageLink), + listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<CertificateInner> object */ - public Observable> getCertificatesNextAsync(final String nextPageLink) { - return getCertificatesNextWithServiceResponseAsync(nextPageLink) + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1014,13 +1257,14 @@ public Page call(ServiceResponse> respo } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<CertificateInner> object */ - public Observable>> getCertificatesNextWithServiceResponseAsync(final String nextPageLink) { - return getCertificatesNextSinglePageAsync(nextPageLink) + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1028,27 +1272,28 @@ public Observable>> call(ServiceResponse< if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getCertificatesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Get certificates for a subscription in the specified resource group. * Get certificates for a subscription in the specified resource group. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getCertificatesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getCertificatesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getCertificatesNextDelegate(response); + ServiceResponse> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -1057,7 +1302,7 @@ public Observable>> call(Response> getCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java deleted file mode 100644 index a42a748e3ee0..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java +++ /dev/null @@ -1,450 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ClassicMobileServices. - */ -public final class ClassicMobileServicesInner { - /** The Retrofit service to perform REST calls. */ - private ClassicMobileServicesService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of ClassicMobileServicesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ClassicMobileServicesInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(ClassicMobileServicesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ClassicMobileServices to be - * used by Retrofit to perform actually REST calls. - */ - interface ClassicMobileServicesService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices") - Observable> getClassicMobileServices(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices/{name}") - Observable> getClassicMobileService(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/classicMobileServices/{name}", method = "DELETE", hasBody = true) - Observable> deleteClassicMobileService(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getClassicMobileServicesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get all mobile services in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the PagedList<ClassicMobileServiceInner> object if successful. - */ - public PagedList getClassicMobileServices(final String resourceGroupName) { - ServiceResponse> response = getClassicMobileServicesSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all mobile services in a resource group. - * - * @param resourceGroupName Name of resource group - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getClassicMobileServicesAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getClassicMobileServicesSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getClassicMobileServicesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all mobile services in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable> getClassicMobileServicesAsync(final String resourceGroupName) { - return getClassicMobileServicesWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all mobile services in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable>> getClassicMobileServicesWithServiceResponseAsync(final String resourceGroupName) { - return getClassicMobileServicesSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getClassicMobileServicesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all mobile services in a resource group. - * - ServiceResponse> * @param resourceGroupName Name of resource group - * @return the PagedList<ClassicMobileServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getClassicMobileServicesSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getClassicMobileServices(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getClassicMobileServicesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getClassicMobileServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the ClassicMobileServiceInner object if successful. - */ - public ClassicMobileServiceInner getClassicMobileService(String resourceGroupName, String name) { - return getClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Get a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getClassicMobileServiceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Get a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the observable to the ClassicMobileServiceInner object - */ - public Observable getClassicMobileServiceAsync(String resourceGroupName, String name) { - return getClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ClassicMobileServiceInner>() { - @Override - public ClassicMobileServiceInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Get a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the observable to the ClassicMobileServiceInner object - */ - public Observable> getClassicMobileServiceWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getClassicMobileService(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getClassicMobileServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getClassicMobileServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the Object object if successful. - */ - public Object deleteClassicMobileService(String resourceGroupName, String name) { - return deleteClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Delete a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall deleteClassicMobileServiceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the observable to the Object object - */ - public Observable deleteClassicMobileServiceAsync(String resourceGroupName, String name) { - return deleteClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Delete a mobile service. - * - * @param resourceGroupName Name of resource group - * @param name Name of mobile service - * @return the observable to the Object object - */ - public Observable> deleteClassicMobileServiceWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteClassicMobileService(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteClassicMobileServiceDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteClassicMobileServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all mobile services in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ClassicMobileServiceInner> object if successful. - */ - public PagedList getClassicMobileServicesNext(final String nextPageLink) { - ServiceResponse> response = getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all mobile services in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getClassicMobileServicesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getClassicMobileServicesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getClassicMobileServicesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all mobile services in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable> getClassicMobileServicesNextAsync(final String nextPageLink) { - return getClassicMobileServicesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all mobile services in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable>> getClassicMobileServicesNextWithServiceResponseAsync(final String nextPageLink) { - return getClassicMobileServicesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getClassicMobileServicesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all mobile services in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ClassicMobileServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getClassicMobileServicesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getClassicMobileServicesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getClassicMobileServicesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getClassicMobileServicesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CustomHostnameAnalysisResultInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CustomHostnameAnalysisResultInner.java new file mode 100644 index 000000000000..50625baf61bf --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CustomHostnameAnalysisResultInner.java @@ -0,0 +1,311 @@ +/** + * 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.website.implementation; + +import com.microsoft.azure.management.website.DnsVerificationTestResult; +import com.microsoft.azure.management.website.ErrorEntity; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Represents a custom domain analysis. + */ +@JsonFlatten +public class CustomHostnameAnalysisResultInner extends Resource { + /** + * Is hostname already verified?. + */ + @JsonProperty(value = "properties.isHostnameAlreadyVerified") + private Boolean isHostnameAlreadyVerified; + + /** + * Dns verification test result. Possible values include: 'Passed', + * 'Failed', 'Skipped'. + */ + @JsonProperty(value = "properties.customDomainVerificationTest") + private DnsVerificationTestResult customDomainVerificationTest; + + /** + * Raw failure info if Dns verification fails. + */ + @JsonProperty(value = "properties.customDomainVerificationFailureInfo") + private ErrorEntity customDomainVerificationFailureInfo; + + /** + * Does it have conflict on scale unit?. + */ + @JsonProperty(value = "properties.hasConflictOnScaleUnit") + private Boolean hasConflictOnScaleUnit; + + /** + * Does it have conflict across subscription?. + */ + @JsonProperty(value = "properties.hasConflictAcrossSubscription") + private Boolean hasConflictAcrossSubscription; + + /** + * Name of the conflicting App on scale unit if it's within the same + * subscription. + */ + @JsonProperty(value = "properties.conflictingAppResourceId") + private String conflictingAppResourceId; + + /** + * CName records controller could see for this hostname. + */ + @JsonProperty(value = "properties.cNameRecords") + private List cNameRecords; + + /** + * TxT records controller could see for this hostname. + */ + @JsonProperty(value = "properties.txtRecords") + private List txtRecords; + + /** + * A records controller could see for this hostname. + */ + @JsonProperty(value = "properties.aRecords") + private List aRecords; + + /** + * Alternate CName records controller could see for this hostname. + */ + @JsonProperty(value = "properties.alternateCNameRecords") + private List alternateCNameRecords; + + /** + * Alternate TxT records controller could see for this hostname. + */ + @JsonProperty(value = "properties.alternateTxtRecords") + private List alternateTxtRecords; + + /** + * Get the isHostnameAlreadyVerified value. + * + * @return the isHostnameAlreadyVerified value + */ + public Boolean isHostnameAlreadyVerified() { + return this.isHostnameAlreadyVerified; + } + + /** + * Set the isHostnameAlreadyVerified value. + * + * @param isHostnameAlreadyVerified the isHostnameAlreadyVerified value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withIsHostnameAlreadyVerified(Boolean isHostnameAlreadyVerified) { + this.isHostnameAlreadyVerified = isHostnameAlreadyVerified; + return this; + } + + /** + * Get the customDomainVerificationTest value. + * + * @return the customDomainVerificationTest value + */ + public DnsVerificationTestResult customDomainVerificationTest() { + return this.customDomainVerificationTest; + } + + /** + * Set the customDomainVerificationTest value. + * + * @param customDomainVerificationTest the customDomainVerificationTest value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withCustomDomainVerificationTest(DnsVerificationTestResult customDomainVerificationTest) { + this.customDomainVerificationTest = customDomainVerificationTest; + return this; + } + + /** + * Get the customDomainVerificationFailureInfo value. + * + * @return the customDomainVerificationFailureInfo value + */ + public ErrorEntity customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; + } + + /** + * Set the customDomainVerificationFailureInfo value. + * + * @param customDomainVerificationFailureInfo the customDomainVerificationFailureInfo value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withCustomDomainVerificationFailureInfo(ErrorEntity customDomainVerificationFailureInfo) { + this.customDomainVerificationFailureInfo = customDomainVerificationFailureInfo; + return this; + } + + /** + * Get the hasConflictOnScaleUnit value. + * + * @return the hasConflictOnScaleUnit value + */ + public Boolean hasConflictOnScaleUnit() { + return this.hasConflictOnScaleUnit; + } + + /** + * Set the hasConflictOnScaleUnit value. + * + * @param hasConflictOnScaleUnit the hasConflictOnScaleUnit value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withHasConflictOnScaleUnit(Boolean hasConflictOnScaleUnit) { + this.hasConflictOnScaleUnit = hasConflictOnScaleUnit; + return this; + } + + /** + * Get the hasConflictAcrossSubscription value. + * + * @return the hasConflictAcrossSubscription value + */ + public Boolean hasConflictAcrossSubscription() { + return this.hasConflictAcrossSubscription; + } + + /** + * Set the hasConflictAcrossSubscription value. + * + * @param hasConflictAcrossSubscription the hasConflictAcrossSubscription value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withHasConflictAcrossSubscription(Boolean hasConflictAcrossSubscription) { + this.hasConflictAcrossSubscription = hasConflictAcrossSubscription; + return this; + } + + /** + * Get the conflictingAppResourceId value. + * + * @return the conflictingAppResourceId value + */ + public String conflictingAppResourceId() { + return this.conflictingAppResourceId; + } + + /** + * Set the conflictingAppResourceId value. + * + * @param conflictingAppResourceId the conflictingAppResourceId value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withConflictingAppResourceId(String conflictingAppResourceId) { + this.conflictingAppResourceId = conflictingAppResourceId; + return this; + } + + /** + * Get the cNameRecords value. + * + * @return the cNameRecords value + */ + public List cNameRecords() { + return this.cNameRecords; + } + + /** + * Set the cNameRecords value. + * + * @param cNameRecords the cNameRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { + this.cNameRecords = cNameRecords; + return this; + } + + /** + * Get the txtRecords value. + * + * @return the txtRecords value + */ + public List txtRecords() { + return this.txtRecords; + } + + /** + * Set the txtRecords value. + * + * @param txtRecords the txtRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { + this.txtRecords = txtRecords; + return this; + } + + /** + * Get the aRecords value. + * + * @return the aRecords value + */ + public List aRecords() { + return this.aRecords; + } + + /** + * Set the aRecords value. + * + * @param aRecords the aRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withARecords(List aRecords) { + this.aRecords = aRecords; + return this; + } + + /** + * Get the alternateCNameRecords value. + * + * @return the alternateCNameRecords value + */ + public List alternateCNameRecords() { + return this.alternateCNameRecords; + } + + /** + * Set the alternateCNameRecords value. + * + * @param alternateCNameRecords the alternateCNameRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { + this.alternateCNameRecords = alternateCNameRecords; + return this; + } + + /** + * Get the alternateTxtRecords value. + * + * @return the alternateTxtRecords value + */ + public List alternateTxtRecords() { + return this.alternateTxtRecords; + } + + /** + * Set the alternateTxtRecords value. + * + * @param alternateTxtRecords the alternateTxtRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { + this.alternateTxtRecords = alternateTxtRecords; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DeletedSiteInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DeletedSiteInner.java index ce8d446497db..a3ce0d3b5d8a 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DeletedSiteInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DeletedSiteInner.java @@ -30,35 +30,29 @@ public class DeletedSiteInner extends Resource { @JsonProperty(value = "properties.deletedTimestamp") private DateTime deletedTimestamp; - /** - * Name of web app. - */ - @JsonProperty(value = "properties.name") - private String deletedSiteName; - /** * State of the web app. */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.state") private String state; /** * Hostnames associated with web app. */ - @JsonProperty(value = "properties.hostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.hostNames") private List hostNames; /** * Name of repository site. */ - @JsonProperty(value = "properties.repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.repositorySiteName") private String repositorySiteName; /** * State indicating whether web app has exceeded its quota usage. Possible * values include: 'Normal', 'Exceeded'. */ - @JsonProperty(value = "properties.usageState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.usageState") private UsageState usageState; /** @@ -73,7 +67,7 @@ public class DeletedSiteInner extends Resource { * assigned and enabled. If some hostnames are assigned but not enabled * the app is not served on those hostnames. */ - @JsonProperty(value = "properties.enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.enabledHostNames") private List enabledHostNames; /** @@ -86,7 +80,7 @@ public class DeletedSiteInner extends Resource { * unavailable. Possible values include: 'Normal', 'Limited', * 'DisasterRecoveryMode'. */ - @JsonProperty(value = "properties.availabilityState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.availabilityState") private SiteAvailabilityState availabilityState; /** @@ -102,10 +96,16 @@ public class DeletedSiteInner extends Resource { @JsonProperty(value = "properties.serverFarmId") private String serverFarmId; + /** + * Reserved. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + /** * Last time web app was modified in UTC. */ - @JsonProperty(value = "properties.lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.lastModifiedTimeUtc") private DateTime lastModifiedTimeUtc; /** @@ -118,13 +118,13 @@ public class DeletedSiteInner extends Resource { * Read-only list of Azure Traffic manager hostnames associated with web * app. */ - @JsonProperty(value = "properties.trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.trafficManagerHostNames") private List trafficManagerHostNames; /** * If set indicates whether web app is deployed as a premium app. */ - @JsonProperty(value = "properties.premiumAppDeployed", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.premiumAppDeployed") private Boolean premiumAppDeployed; /** @@ -137,7 +137,7 @@ public class DeletedSiteInner extends Resource { /** * Read-only property that specifies which slot this app will swap into. */ - @JsonProperty(value = "properties.targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.targetSwapSlot") private String targetSwapSlot; /** @@ -148,7 +148,7 @@ public class DeletedSiteInner extends Resource { private HostingEnvironmentProfile hostingEnvironmentProfile; /** - * The microService property. + * Micro services like WebSites, Logic Apps. */ @JsonProperty(value = "properties.microService") private String microService; @@ -185,7 +185,7 @@ public class DeletedSiteInner extends Resource { * outbound connections. Those can be used when configuring firewall * rules for databases accessed by this web app. */ - @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.outboundIpAddresses") private String outboundIpAddresses; /** @@ -194,6 +194,19 @@ public class DeletedSiteInner extends Resource { @JsonProperty(value = "properties.containerSize") private Integer containerSize; + /** + * Maximum allowed daily memory-time quota (applicable on dynamic sites + * only). + */ + @JsonProperty(value = "properties.dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /** + * Site suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "properties.suspendedTill") + private DateTime suspendedTill; + /** * Maximum number of workers * This only applies to function container. @@ -212,19 +225,19 @@ public class DeletedSiteInner extends Resource { /** * Resource group web app belongs to. */ - @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.resourceGroup") private String resourceGroup; /** * Site is a default container. */ - @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.isDefaultContainer") private Boolean isDefaultContainer; /** * Default hostname of the web app. */ - @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.defaultHostName") private String defaultHostName; /** @@ -248,41 +261,43 @@ public DeletedSiteInner withDeletedTimestamp(DateTime deletedTimestamp) { } /** - * Get the deletedSiteName value. + * Get the state value. * - * @return the deletedSiteName value + * @return the state value */ - public String deletedSiteName() { - return this.deletedSiteName; + public String state() { + return this.state; } /** - * Set the deletedSiteName value. + * Set the state value. * - * @param deletedSiteName the deletedSiteName value to set + * @param state the state value to set * @return the DeletedSiteInner object itself. */ - public DeletedSiteInner withDeletedSiteName(String deletedSiteName) { - this.deletedSiteName = deletedSiteName; + public DeletedSiteInner withState(String state) { + this.state = state; return this; } /** - * Get the state value. + * Get the hostNames value. * - * @return the state value + * @return the hostNames value */ - public String state() { - return this.state; + public List hostNames() { + return this.hostNames; } /** - * Get the hostNames value. + * Set the hostNames value. * - * @return the hostNames value + * @param hostNames the hostNames value to set + * @return the DeletedSiteInner object itself. */ - public List hostNames() { - return this.hostNames; + public DeletedSiteInner withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; } /** @@ -294,6 +309,17 @@ public String repositorySiteName() { return this.repositorySiteName; } + /** + * Set the repositorySiteName value. + * + * @param repositorySiteName the repositorySiteName value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withRepositorySiteName(String repositorySiteName) { + this.repositorySiteName = repositorySiteName; + return this; + } + /** * Get the usageState value. * @@ -303,6 +329,17 @@ public UsageState usageState() { return this.usageState; } + /** + * Set the usageState value. + * + * @param usageState the usageState value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withUsageState(UsageState usageState) { + this.usageState = usageState; + return this; + } + /** * Get the enabled value. * @@ -332,6 +369,17 @@ public List enabledHostNames() { return this.enabledHostNames; } + /** + * Set the enabledHostNames value. + * + * @param enabledHostNames the enabledHostNames value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withEnabledHostNames(List enabledHostNames) { + this.enabledHostNames = enabledHostNames; + return this; + } + /** * Get the availabilityState value. * @@ -341,6 +389,17 @@ public SiteAvailabilityState availabilityState() { return this.availabilityState; } + /** + * Set the availabilityState value. + * + * @param availabilityState the availabilityState value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withAvailabilityState(SiteAvailabilityState availabilityState) { + this.availabilityState = availabilityState; + return this; + } + /** * Get the hostNameSslStates value. * @@ -381,6 +440,26 @@ public DeletedSiteInner withServerFarmId(String serverFarmId) { return this; } + /** + * Get the reserved value. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved value. + * + * @param reserved the reserved value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + /** * Get the lastModifiedTimeUtc value. * @@ -390,6 +469,17 @@ public DateTime lastModifiedTimeUtc() { return this.lastModifiedTimeUtc; } + /** + * Set the lastModifiedTimeUtc value. + * + * @param lastModifiedTimeUtc the lastModifiedTimeUtc value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withLastModifiedTimeUtc(DateTime lastModifiedTimeUtc) { + this.lastModifiedTimeUtc = lastModifiedTimeUtc; + return this; + } + /** * Get the siteConfig value. * @@ -419,6 +509,17 @@ public List trafficManagerHostNames() { return this.trafficManagerHostNames; } + /** + * Set the trafficManagerHostNames value. + * + * @param trafficManagerHostNames the trafficManagerHostNames value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withTrafficManagerHostNames(List trafficManagerHostNames) { + this.trafficManagerHostNames = trafficManagerHostNames; + return this; + } + /** * Get the premiumAppDeployed value. * @@ -428,6 +529,17 @@ public Boolean premiumAppDeployed() { return this.premiumAppDeployed; } + /** + * Set the premiumAppDeployed value. + * + * @param premiumAppDeployed the premiumAppDeployed value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withPremiumAppDeployed(Boolean premiumAppDeployed) { + this.premiumAppDeployed = premiumAppDeployed; + return this; + } + /** * Get the scmSiteAlsoStopped value. * @@ -457,6 +569,17 @@ public String targetSwapSlot() { return this.targetSwapSlot; } + /** + * Set the targetSwapSlot value. + * + * @param targetSwapSlot the targetSwapSlot value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withTargetSwapSlot(String targetSwapSlot) { + this.targetSwapSlot = targetSwapSlot; + return this; + } + /** * Get the hostingEnvironmentProfile value. * @@ -586,6 +709,17 @@ public String outboundIpAddresses() { return this.outboundIpAddresses; } + /** + * Set the outboundIpAddresses value. + * + * @param outboundIpAddresses the outboundIpAddresses value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withOutboundIpAddresses(String outboundIpAddresses) { + this.outboundIpAddresses = outboundIpAddresses; + return this; + } + /** * Get the containerSize value. * @@ -606,6 +740,46 @@ public DeletedSiteInner withContainerSize(Integer containerSize) { return this; } + /** + * Get the dailyMemoryTimeQuota value. + * + * @return the dailyMemoryTimeQuota value + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set the dailyMemoryTimeQuota value. + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get the suspendedTill value. + * + * @return the suspendedTill value + */ + public DateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Set the suspendedTill value. + * + * @param suspendedTill the suspendedTill value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withSuspendedTill(DateTime suspendedTill) { + this.suspendedTill = suspendedTill; + return this; + } + /** * Get the maxNumberOfWorkers value. * @@ -655,6 +829,17 @@ public String resourceGroup() { return this.resourceGroup; } + /** + * Set the resourceGroup value. + * + * @param resourceGroup the resourceGroup value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + /** * Get the isDefaultContainer value. * @@ -664,6 +849,17 @@ public Boolean isDefaultContainer() { return this.isDefaultContainer; } + /** + * Set the isDefaultContainer value. + * + * @param isDefaultContainer the isDefaultContainer value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withIsDefaultContainer(Boolean isDefaultContainer) { + this.isDefaultContainer = isDefaultContainer; + return this; + } + /** * Get the defaultHostName value. * @@ -673,4 +869,15 @@ public String defaultHostName() { return this.defaultHostName; } + /** + * Set the defaultHostName value. + * + * @param defaultHostName the defaultHostName value to set + * @return the DeletedSiteInner object itself. + */ + public DeletedSiteInner withDefaultHostName(String defaultHostName) { + this.defaultHostName = defaultHostName; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java index b2ee42f85103..78646e9aed24 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java @@ -28,8 +28,8 @@ import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.Response; @@ -62,79 +62,607 @@ public DomainsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface DomainsService { + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") + Observable> checkAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NameIdentifierInner identifier, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") + Observable> getControlCenterSsoRequest(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") + Observable> listRecommendations(@Path("subscriptionId") String subscriptionId, @Body DomainRecommendationSearchParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/validateDomainRegistrationInformation") + Observable> validatePurchaseInformation(@Path("subscriptionId") String subscriptionId, @Body DomainRegistrationInputInner domainRegistrationInput, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") - Observable> getDomains(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") - Observable> getDomain(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") - Observable> createOrUpdateDomain(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Body DomainInner domain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Body DomainInner domain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}", method = "DELETE", hasBody = true) - Observable> deleteDomain(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Query("forceHardDeleteDomain") Boolean forceHardDeleteDomain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Body DomainInner domain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") - Observable> updateDomain(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Body DomainInner domain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("subscriptionId") String subscriptionId, @Query("forceHardDeleteDomain") Boolean forceHardDeleteDomain, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/operationresults/{operationId}") - Observable> getDomainOperation(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getOperation(@Path("resourceGroupName") String resourceGroupName, @Path("domainName") String domainName, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getDomainsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("{nextLink}") + Observable> listRecommendationsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @return the DomainAvailablilityCheckResultInner object if successful. + */ + public DomainAvailablilityCheckResultInner checkAvailability() { + return checkAvailabilityWithServiceResponseAsync().toBlocking().single().getBody(); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall checkAvailabilityAsync(final ServiceCallback serviceCallback) { + return ServiceCall.create(checkAvailabilityWithServiceResponseAsync(), serviceCallback); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @return the observable to the DomainAvailablilityCheckResultInner object + */ + public Observable checkAvailabilityAsync() { + return checkAvailabilityWithServiceResponseAsync().map(new Func1, DomainAvailablilityCheckResultInner>() { + @Override + public DomainAvailablilityCheckResultInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @return the observable to the DomainAvailablilityCheckResultInner object + */ + public Observable> checkAvailabilityWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final String name = null; + NameIdentifierInner identifier = new NameIdentifierInner(); + identifier.withName(null); + return service.checkAvailability(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), identifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @param name Name of the object + * @return the DomainAvailablilityCheckResultInner object if successful. + */ + public DomainAvailablilityCheckResultInner checkAvailability(String name) { + return checkAvailabilityWithServiceResponseAsync(name).toBlocking().single().getBody(); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @param name Name of the object + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall checkAvailabilityAsync(String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(checkAvailabilityWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @param name Name of the object + * @return the observable to the DomainAvailablilityCheckResultInner object + */ + public Observable checkAvailabilityAsync(String name) { + return checkAvailabilityWithServiceResponseAsync(name).map(new Func1, DomainAvailablilityCheckResultInner>() { + @Override + public DomainAvailablilityCheckResultInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Checks if a domain is available for registration. + * Checks if a domain is available for registration. + * + * @param name Name of the object + * @return the observable to the DomainAvailablilityCheckResultInner object + */ + public Observable> checkAvailabilityWithServiceResponseAsync(String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + NameIdentifierInner identifier = new NameIdentifierInner(); + identifier.withName(name); + return service.checkAvailability(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), identifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the PagedList<DomainInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates a single sign on request for domain management portal. + * Generates a single sign on request for domain management portal. + * + * @return the DomainControlCenterSsoRequestInner object if successful. + */ + public DomainControlCenterSsoRequestInner getControlCenterSsoRequest() { + return getControlCenterSsoRequestWithServiceResponseAsync().toBlocking().single().getBody(); + } + + /** + * Generates a single sign on request for domain management portal. + * Generates a single sign on request for domain management portal. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getControlCenterSsoRequestAsync(final ServiceCallback serviceCallback) { + return ServiceCall.create(getControlCenterSsoRequestWithServiceResponseAsync(), serviceCallback); + } + + /** + * Generates a single sign on request for domain management portal. + * Generates a single sign on request for domain management portal. + * + * @return the observable to the DomainControlCenterSsoRequestInner object + */ + public Observable getControlCenterSsoRequestAsync() { + return getControlCenterSsoRequestWithServiceResponseAsync().map(new Func1, DomainControlCenterSsoRequestInner>() { + @Override + public DomainControlCenterSsoRequestInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Generates a single sign on request for domain management portal. + * Generates a single sign on request for domain management portal. + * + * @return the observable to the DomainControlCenterSsoRequestInner object + */ + public Observable> getControlCenterSsoRequestWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.getControlCenterSsoRequest(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getControlCenterSsoRequestDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getControlCenterSsoRequestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param parameters Domain recommendation search parameters + * @return the PagedList<NameIdentifierInner> object if successful. + */ + public PagedList listRecommendations(final DomainRecommendationSearchParametersInner parameters) { + ServiceResponse> response = listRecommendationsSinglePageAsync(parameters).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param parameters Domain recommendation search parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listRecommendationsAsync(final DomainRecommendationSearchParametersInner parameters, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listRecommendationsSinglePageAsync(parameters), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param parameters Domain recommendation search parameters + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable> listRecommendationsAsync(final DomainRecommendationSearchParametersInner parameters) { + return listRecommendationsWithServiceResponseAsync(parameters) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param parameters Domain recommendation search parameters + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable>> listRecommendationsWithServiceResponseAsync(final DomainRecommendationSearchParametersInner parameters) { + return listRecommendationsSinglePageAsync(parameters) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + ServiceResponse> * @param parameters Domain recommendation search parameters + * @return the PagedList<NameIdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRecommendationsSinglePageAsync(final DomainRecommendationSearchParametersInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2016-03-01"; + return service.listRecommendations(this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendationsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validates domain registration information. + * Validates domain registration information. + * + * @param domainRegistrationInput Domain registration information + * @return the Object object if successful. + */ + public Object validatePurchaseInformation(DomainRegistrationInputInner domainRegistrationInput) { + return validatePurchaseInformationWithServiceResponseAsync(domainRegistrationInput).toBlocking().single().getBody(); + } + + /** + * Validates domain registration information. + * Validates domain registration information. + * + * @param domainRegistrationInput Domain registration information + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall validatePurchaseInformationAsync(DomainRegistrationInputInner domainRegistrationInput, final ServiceCallback serviceCallback) { + return ServiceCall.create(validatePurchaseInformationWithServiceResponseAsync(domainRegistrationInput), serviceCallback); + } + + /** + * Validates domain registration information. + * Validates domain registration information. + * + * @param domainRegistrationInput Domain registration information + * @return the observable to the Object object + */ + public Observable validatePurchaseInformationAsync(DomainRegistrationInputInner domainRegistrationInput) { + return validatePurchaseInformationWithServiceResponseAsync(domainRegistrationInput).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + /** + * Validates domain registration information. + * Validates domain registration information. + * + * @param domainRegistrationInput Domain registration information + * @return the observable to the Object object + */ + public Observable> validatePurchaseInformationWithServiceResponseAsync(DomainRegistrationInputInner domainRegistrationInput) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (domainRegistrationInput == null) { + throw new IllegalArgumentException("Parameter domainRegistrationInput is required and cannot be null."); + } + Validator.validate(domainRegistrationInput); + final String apiVersion = "2016-03-01"; + return service.validatePurchaseInformation(this.client.subscriptionId(), domainRegistrationInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validatePurchaseInformationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validatePurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param resourceGroupName Name of the resource group * @return the PagedList<DomainInner> object if successful. */ - public PagedList getDomains(final String resourceGroupName) { - ServiceResponse> response = getDomainsSinglePageAsync(resourceGroupName).toBlocking().single(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param resourceGroupName Name of the resource group * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDomainsAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getDomainsSinglePageAsync(resourceGroupName), + listByResourceGroupSinglePageAsync(resourceGroupName), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getDomainsNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the PagedList<DomainInner> object */ - public Observable> getDomainsAsync(final String resourceGroupName) { - return getDomainsWithServiceResponseAsync(resourceGroupName) + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -144,13 +672,14 @@ public Page call(ServiceResponse> response) { } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param resourceGroupName Name of the resource group * @return the observable to the PagedList<DomainInner> object */ - public Observable>> getDomainsWithServiceResponseAsync(final String resourceGroupName) { - return getDomainsSinglePageAsync(resourceGroupName) + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -158,33 +687,32 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName Name of the resource group * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getDomainsSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getDomains(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getDomainsDelegate(response); + ServiceResponse> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -193,7 +721,7 @@ public Observable>> call(Response> getDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -201,37 +729,125 @@ private ServiceResponse> getDomainsDelegate(Response getAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + } + + /** + * Gets details of a domain. + * Gets details of a domain. + * + * @param resourceGroupName Name of the resource group + * @param domainName Name of the domain + * @return the observable to the DomainInner object + */ + public Observable getAsync(String resourceGroupName, String domainName) { + return getWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets details of a domain. + * Gets details of a domain. + * + * @param resourceGroupName Name of the resource group + * @param domainName Name of the domain + * @return the observable to the DomainInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String domainName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (domainName == null) { + throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.get(resourceGroupName, domainName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a domain. + * Creates a domain. * - * @param resourceGroupName Name of the resource group + * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain + * @param domain Domain registration information * @return the DomainInner object if successful. */ - public DomainInner getDomain(String resourceGroupName, String domainName) { - return getDomainWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().getBody(); + public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domain) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().last().getBody(); } /** - * Gets details of a domain. + * Creates a domain. + * Creates a domain. * - * @param resourceGroupName Name of the resource group + * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain + * @param domain Domain registration information * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getDomainAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getDomainWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); } /** - * Gets details of a domain. + * Creates a domain. + * Creates a domain. * - * @param resourceGroupName Name of the resource group + * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain - * @return the observable to the DomainInner object + * @param domain Domain registration information + * @return the observable for the request */ - public Observable getDomainAsync(String resourceGroupName, String domainName) { - return getDomainWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, DomainInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { @Override public DomainInner call(ServiceResponse response) { return response.getBody(); @@ -240,13 +856,15 @@ public DomainInner call(ServiceResponse response) { } /** - * Gets details of a domain. + * Creates a domain. + * Creates a domain. * - * @param resourceGroupName Name of the resource group + * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain - * @return the observable to the DomainInner object + * @param domain Domain registration information + * @return the observable for the request */ - public Observable> getDomainWithServiceResponseAsync(String resourceGroupName, String domainName) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -256,31 +874,17 @@ public Observable> getDomainWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (domain == null) { + throw new IllegalArgumentException("Parameter domain is required and cannot be null."); } - return service.getDomain(resourceGroupName, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDomainDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(domain); + final String apiVersion = "2016-03-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, domainName, this.client.subscriptionId(), domain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** + * Creates a domain. * Creates a domain. * * @param resourceGroupName &gt;Name of the resource group @@ -288,11 +892,12 @@ private ServiceResponse getDomainDelegate(Response re * @param domain Domain registration information * @return the DomainInner object if successful. */ - public DomainInner createOrUpdateDomain(String resourceGroupName, String domainName, DomainInner domain) { - return createOrUpdateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().getBody(); + public DomainInner beginCreateOrUpdate(String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().getBody(); } /** + * Creates a domain. * Creates a domain. * * @param resourceGroupName &gt;Name of the resource group @@ -301,11 +906,12 @@ public DomainInner createOrUpdateDomain(String resourceGroupName, String domainN * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateDomainAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); } /** + * Creates a domain. * Creates a domain. * * @param resourceGroupName &gt;Name of the resource group @@ -313,8 +919,8 @@ public ServiceCall createOrUpdateDomainAsync(String resourceGroupNa * @param domain Domain registration information * @return the observable to the DomainInner object */ - public Observable createOrUpdateDomainAsync(String resourceGroupName, String domainName, DomainInner domain) { - return createOrUpdateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { @Override public DomainInner call(ServiceResponse response) { return response.getBody(); @@ -323,6 +929,7 @@ public DomainInner call(ServiceResponse response) { } /** + * Creates a domain. * Creates a domain. * * @param resourceGroupName &gt;Name of the resource group @@ -330,7 +937,7 @@ public DomainInner call(ServiceResponse response) { * @param domain Domain registration information * @return the observable to the DomainInner object */ - public Observable> createOrUpdateDomainWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -343,16 +950,14 @@ public Observable> createOrUpdateDomainWithServiceR if (domain == null) { throw new IllegalArgumentException("Parameter domain is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(domain); - return service.createOrUpdateDomain(resourceGroupName, domainName, this.client.subscriptionId(), domain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.beginCreateOrUpdate(resourceGroupName, domainName, this.client.subscriptionId(), domain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateDomainDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -361,7 +966,7 @@ public Observable> call(Response resp }); } - private ServiceResponse createOrUpdateDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) @@ -370,17 +975,19 @@ private ServiceResponse createOrUpdateDomainDelegate(Response deleteDomainAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteDomainWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String domainName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, domainName), serviceCallback); } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group * @param domainName Name of the domain * @return the observable to the Object object */ - public Observable deleteDomainAsync(String resourceGroupName, String domainName) { - return deleteDomainWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String domainName) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -409,13 +1017,14 @@ public Object call(ServiceResponse response) { } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group * @param domainName Name of the domain * @return the observable to the Object object */ - public Observable> deleteDomainWithServiceResponseAsync(String resourceGroupName, String domainName) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String domainName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -425,16 +1034,14 @@ public Observable> deleteDomainWithServiceResponseAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-03-01"; final Boolean forceHardDeleteDomain = null; - return service.deleteDomain(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.delete(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDomainDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -444,6 +1051,7 @@ public Observable> call(Response response) } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group @@ -451,11 +1059,12 @@ public Observable> call(Response response) * @param forceHardDeleteDomain If true then the domain will be deleted immediately instead of after 24 hours * @return the Object object if successful. */ - public Object deleteDomain(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { - return deleteDomainWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).toBlocking().single().getBody(); + public Object delete(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).toBlocking().single().getBody(); } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group @@ -464,11 +1073,12 @@ public Object deleteDomain(String resourceGroupName, String domainName, Boolean * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteDomainAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteDomainWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain), serviceCallback); } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group @@ -476,8 +1086,8 @@ public ServiceCall deleteDomainAsync(String resourceGroupName, String do * @param forceHardDeleteDomain If true then the domain will be deleted immediately instead of after 24 hours * @return the observable to the Object object */ - public Observable deleteDomainAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { - return deleteDomainWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + return deleteWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -486,6 +1096,7 @@ public Object call(ServiceResponse response) { } /** + * Deletes a domain. * Deletes a domain. * * @param resourceGroupName Name of the resource group @@ -493,7 +1104,7 @@ public Object call(ServiceResponse response) { * @param forceHardDeleteDomain If true then the domain will be deleted immediately instead of after 24 hours * @return the observable to the Object object */ - public Observable> deleteDomainWithServiceResponseAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -503,15 +1114,13 @@ public Observable> deleteDomainWithServiceResponseAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteDomain(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.delete(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDomainDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -520,7 +1129,7 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -528,40 +1137,43 @@ private ServiceResponse deleteDomainDelegate(Response resp } /** - * Creates a domain. + * Retrieves the latest status of a domain purchase operation. + * Retrieves the latest status of a domain purchase operation. * - * @param resourceGroupName &gt;Name of the resource group + * @param resourceGroupName Name of the resource group * @param domainName Name of the domain - * @param domain Domain registration information + * @param operationId Domain purchase operation Id * @return the DomainInner object if successful. */ - public DomainInner updateDomain(String resourceGroupName, String domainName, DomainInner domain) { - return updateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().getBody(); + public DomainInner getOperation(String resourceGroupName, String domainName, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId).toBlocking().single().getBody(); } /** - * Creates a domain. + * Retrieves the latest status of a domain purchase operation. + * Retrieves the latest status of a domain purchase operation. * - * @param resourceGroupName &gt;Name of the resource group + * @param resourceGroupName Name of the resource group * @param domainName Name of the domain - * @param domain Domain registration information + * @param operationId Domain purchase operation Id * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateDomainAsync(String resourceGroupName, String domainName, DomainInner domain, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + public ServiceCall getOperationAsync(String resourceGroupName, String domainName, String operationId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId), serviceCallback); } /** - * Creates a domain. + * Retrieves the latest status of a domain purchase operation. + * Retrieves the latest status of a domain purchase operation. * - * @param resourceGroupName &gt;Name of the resource group + * @param resourceGroupName Name of the resource group * @param domainName Name of the domain - * @param domain Domain registration information + * @param operationId Domain purchase operation Id * @return the observable to the DomainInner object */ - public Observable updateDomainAsync(String resourceGroupName, String domainName, DomainInner domain) { - return updateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { + public Observable getOperationAsync(String resourceGroupName, String domainName, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId).map(new Func1, DomainInner>() { @Override public DomainInner call(ServiceResponse response) { return response.getBody(); @@ -570,36 +1182,34 @@ public DomainInner call(ServiceResponse response) { } /** - * Creates a domain. + * Retrieves the latest status of a domain purchase operation. + * Retrieves the latest status of a domain purchase operation. * - * @param resourceGroupName &gt;Name of the resource group + * @param resourceGroupName Name of the resource group * @param domainName Name of the domain - * @param domain Domain registration information + * @param operationId Domain purchase operation Id * @return the observable to the DomainInner object */ - public Observable> updateDomainWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domain) { + public Observable> getOperationWithServiceResponseAsync(String resourceGroupName, String domainName, String operationId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (domainName == null) { throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (domain == null) { - throw new IllegalArgumentException("Parameter domain is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(domain); - return service.updateDomain(resourceGroupName, domainName, this.client.subscriptionId(), domain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.getOperation(resourceGroupName, domainName, operationId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateDomainDelegate(response); + ServiceResponse clientResponse = getOperationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -608,87 +1218,217 @@ public Observable> call(Response resp }); } - private ServiceResponse updateDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(500, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves the latest status of a domain purchase operation. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Name of the resource group - * @param domainName Name of the domain - * @param operationId Domain purchase operation Id - * @return the DomainInner object if successful. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DomainInner> object if successful. */ - public DomainInner getDomainOperation(String resourceGroupName, String domainName, String operationId) { - return getDomainOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId).toBlocking().single().getBody(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Retrieves the latest status of a domain purchase operation. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Name of the resource group - * @param domainName Name of the domain - * @param operationId Domain purchase operation Id + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getDomainOperationAsync(String resourceGroupName, String domainName, String operationId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getDomainOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId), serviceCallback); + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves the latest status of a domain purchase operation. + * Lists all domains in a subscription. + * Lists all domains in a subscription. * - * @param resourceGroupName Name of the resource group - * @param domainName Name of the domain - * @param operationId Domain purchase operation Id - * @return the observable to the DomainInner object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DomainInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DomainInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all domains in a subscription. + * Lists all domains in a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<NameIdentifierInner> object if successful. */ - public Observable getDomainOperationAsync(String resourceGroupName, String domainName, String operationId) { - return getDomainOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId).map(new Func1, DomainInner>() { + public PagedList listRecommendationsNext(final String nextPageLink) { + ServiceResponse> response = listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public DomainInner call(ServiceResponse response) { - return response.getBody(); + public Page nextPage(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } - }); + }; } /** - * Retrieves the latest status of a domain purchase operation. + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. * - * @param resourceGroupName Name of the resource group - * @param domainName Name of the domain - * @param operationId Domain purchase operation Id - * @return the observable to the DomainInner object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public Observable> getDomainOperationWithServiceResponseAsync(String resourceGroupName, String domainName, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (domainName == null) { - throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + public ServiceCall> listRecommendationsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listRecommendationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable> listRecommendationsNextAsync(final String nextPageLink) { + return listRecommendationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<NameIdentifierInner> object + */ + public Observable>> listRecommendationsNextWithServiceResponseAsync(final String nextPageLink) { + return listRecommendationsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists domain recommendations based on keywords. + * Lists domain recommendations based on keywords. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<NameIdentifierInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listRecommendationsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getDomainOperation(resourceGroupName, domainName, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + return service.listRecommendationsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getDomainOperationDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listRecommendationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -696,32 +1436,32 @@ public Observable> call(Response resp }); } - private ServiceResponse getDomainOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(200, new TypeToken() { }.getType()) - .register(500, new TypeToken() { }.getType()) + private ServiceResponse> listRecommendationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<DomainInner> object if successful. */ - public PagedList getDomainsNext(final String nextPageLink) { - ServiceResponse> response = getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -729,26 +1469,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDomainsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getDomainsNextSinglePageAsync(nextPageLink), + listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getDomainsNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<DomainInner> object */ - public Observable> getDomainsNextAsync(final String nextPageLink) { - return getDomainsNextWithServiceResponseAsync(nextPageLink) + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -758,13 +1499,14 @@ public Page call(ServiceResponse> response) { } /** + * Lists domains under a resource group. * Lists domains under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<DomainInner> object */ - public Observable>> getDomainsNextWithServiceResponseAsync(final String nextPageLink) { - return getDomainsNextSinglePageAsync(nextPageLink) + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -772,27 +1514,28 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getDomainsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getDomainsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getDomainsNextDelegate(response); + ServiceResponse> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -801,7 +1544,7 @@ public Observable>> call(Response> getDomainsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java deleted file mode 100644 index 9f256a3dd253..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java +++ /dev/null @@ -1,354 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GlobalCertificateOrders. - */ -public final class GlobalCertificateOrdersInner { - /** The Retrofit service to perform REST calls. */ - private GlobalCertificateOrdersService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of GlobalCertificateOrdersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GlobalCertificateOrdersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(GlobalCertificateOrdersService.class); - this.client = client; - } - - /** - * The interface defining all the services for GlobalCertificateOrders to be - * used by Retrofit to perform actually REST calls. - */ - interface GlobalCertificateOrdersService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") - Observable> getAllCertificateOrders(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") - Observable> validateCertificatePurchaseInformation(@Path("subscriptionId") String subscriptionId, @Body CertificateOrderInner certificateOrder, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllCertificateOrdersNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all domains in a subscription. - * - * @return the PagedList<CertificateOrderInner> object if successful. - */ - public PagedList getAllCertificateOrders() { - ServiceResponse> response = getAllCertificateOrdersSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists all domains in a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllCertificateOrdersAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllCertificateOrdersSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllCertificateOrdersNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all domains in a subscription. - * - * @return the observable to the PagedList<CertificateOrderInner> object - */ - public Observable> getAllCertificateOrdersAsync() { - return getAllCertificateOrdersWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @return the observable to the PagedList<CertificateOrderInner> object - */ - public Observable>> getAllCertificateOrdersWithServiceResponseAsync() { - return getAllCertificateOrdersSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllCertificateOrdersNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @return the PagedList<CertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllCertificateOrdersSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllCertificateOrders(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllCertificateOrdersDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllCertificateOrdersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Validate certificate purchase information. - * - * @param certificateOrder Certificate order - * @return the Object object if successful. - */ - public Object validateCertificatePurchaseInformation(CertificateOrderInner certificateOrder) { - return validateCertificatePurchaseInformationWithServiceResponseAsync(certificateOrder).toBlocking().single().getBody(); - } - - /** - * Validate certificate purchase information. - * - * @param certificateOrder Certificate order - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall validateCertificatePurchaseInformationAsync(CertificateOrderInner certificateOrder, final ServiceCallback serviceCallback) { - return ServiceCall.create(validateCertificatePurchaseInformationWithServiceResponseAsync(certificateOrder), serviceCallback); - } - - /** - * Validate certificate purchase information. - * - * @param certificateOrder Certificate order - * @return the observable to the Object object - */ - public Observable validateCertificatePurchaseInformationAsync(CertificateOrderInner certificateOrder) { - return validateCertificatePurchaseInformationWithServiceResponseAsync(certificateOrder).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Validate certificate purchase information. - * - * @param certificateOrder Certificate order - * @return the observable to the Object object - */ - public Observable> validateCertificatePurchaseInformationWithServiceResponseAsync(CertificateOrderInner certificateOrder) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (certificateOrder == null) { - throw new IllegalArgumentException("Parameter certificateOrder is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(certificateOrder); - return service.validateCertificatePurchaseInformation(this.client.subscriptionId(), certificateOrder, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = validateCertificatePurchaseInformationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse validateCertificatePurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderInner> object if successful. - */ - public PagedList getAllCertificateOrdersNext(final String nextPageLink) { - ServiceResponse> response = getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllCertificateOrdersNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllCertificateOrdersNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllCertificateOrdersNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderInner> object - */ - public Observable> getAllCertificateOrdersNextAsync(final String nextPageLink) { - return getAllCertificateOrdersNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateOrderInner> object - */ - public Observable>> getAllCertificateOrdersNextWithServiceResponseAsync(final String nextPageLink) { - return getAllCertificateOrdersNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllCertificateOrdersNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all domains in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateOrderInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllCertificateOrdersNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllCertificateOrdersNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllCertificateOrdersNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllCertificateOrdersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java deleted file mode 100644 index c8a1e17a8bf2..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java +++ /dev/null @@ -1,782 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GlobalDomainRegistrations. - */ -public final class GlobalDomainRegistrationsInner { - /** The Retrofit service to perform REST calls. */ - private GlobalDomainRegistrationsService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of GlobalDomainRegistrationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GlobalDomainRegistrationsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(GlobalDomainRegistrationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for GlobalDomainRegistrations to be - * used by Retrofit to perform actually REST calls. - */ - interface GlobalDomainRegistrationsService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") - Observable> getAllDomains(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") - Observable> getDomainControlCenterSsoRequest(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/validateDomainRegistrationInformation") - Observable> validateDomainPurchaseInformation(@Path("subscriptionId") String subscriptionId, @Body DomainRegistrationInputInner domainRegistrationInput, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") - Observable> checkDomainAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NameIdentifierInner identifier, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") - Observable> listDomainRecommendations(@Path("subscriptionId") String subscriptionId, @Body DomainRecommendationSearchParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllDomainsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> listDomainRecommendationsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all domains in a subscription. - * - * @return the PagedList<DomainInner> object if successful. - */ - public PagedList getAllDomains() { - ServiceResponse> response = getAllDomainsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists all domains in a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllDomainsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllDomainsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllDomainsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all domains in a subscription. - * - * @return the observable to the PagedList<DomainInner> object - */ - public Observable> getAllDomainsAsync() { - return getAllDomainsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @return the observable to the PagedList<DomainInner> object - */ - public Observable>> getAllDomainsWithServiceResponseAsync() { - return getAllDomainsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllDomainsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllDomainsSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllDomains(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllDomainsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Generates a single sign on request for domain management portal. - * - * @return the DomainControlCenterSsoRequestInner object if successful. - */ - public DomainControlCenterSsoRequestInner getDomainControlCenterSsoRequest() { - return getDomainControlCenterSsoRequestWithServiceResponseAsync().toBlocking().single().getBody(); - } - - /** - * Generates a single sign on request for domain management portal. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getDomainControlCenterSsoRequestAsync(final ServiceCallback serviceCallback) { - return ServiceCall.create(getDomainControlCenterSsoRequestWithServiceResponseAsync(), serviceCallback); - } - - /** - * Generates a single sign on request for domain management portal. - * - * @return the observable to the DomainControlCenterSsoRequestInner object - */ - public Observable getDomainControlCenterSsoRequestAsync() { - return getDomainControlCenterSsoRequestWithServiceResponseAsync().map(new Func1, DomainControlCenterSsoRequestInner>() { - @Override - public DomainControlCenterSsoRequestInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Generates a single sign on request for domain management portal. - * - * @return the observable to the DomainControlCenterSsoRequestInner object - */ - public Observable> getDomainControlCenterSsoRequestWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getDomainControlCenterSsoRequest(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDomainControlCenterSsoRequestDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDomainControlCenterSsoRequestDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Validates domain registration information. - * - * @param domainRegistrationInput Domain registration information - * @return the Object object if successful. - */ - public Object validateDomainPurchaseInformation(DomainRegistrationInputInner domainRegistrationInput) { - return validateDomainPurchaseInformationWithServiceResponseAsync(domainRegistrationInput).toBlocking().single().getBody(); - } - - /** - * Validates domain registration information. - * - * @param domainRegistrationInput Domain registration information - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall validateDomainPurchaseInformationAsync(DomainRegistrationInputInner domainRegistrationInput, final ServiceCallback serviceCallback) { - return ServiceCall.create(validateDomainPurchaseInformationWithServiceResponseAsync(domainRegistrationInput), serviceCallback); - } - - /** - * Validates domain registration information. - * - * @param domainRegistrationInput Domain registration information - * @return the observable to the Object object - */ - public Observable validateDomainPurchaseInformationAsync(DomainRegistrationInputInner domainRegistrationInput) { - return validateDomainPurchaseInformationWithServiceResponseAsync(domainRegistrationInput).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Validates domain registration information. - * - * @param domainRegistrationInput Domain registration information - * @return the observable to the Object object - */ - public Observable> validateDomainPurchaseInformationWithServiceResponseAsync(DomainRegistrationInputInner domainRegistrationInput) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (domainRegistrationInput == null) { - throw new IllegalArgumentException("Parameter domainRegistrationInput is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(domainRegistrationInput); - return service.validateDomainPurchaseInformation(this.client.subscriptionId(), domainRegistrationInput, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = validateDomainPurchaseInformationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse validateDomainPurchaseInformationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Checks if a domain is available for registration. - * - * @return the DomainAvailablilityCheckResultInner object if successful. - */ - public DomainAvailablilityCheckResultInner checkDomainAvailability() { - return checkDomainAvailabilityWithServiceResponseAsync().toBlocking().single().getBody(); - } - - /** - * Checks if a domain is available for registration. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall checkDomainAvailabilityAsync(final ServiceCallback serviceCallback) { - return ServiceCall.create(checkDomainAvailabilityWithServiceResponseAsync(), serviceCallback); - } - - /** - * Checks if a domain is available for registration. - * - * @return the observable to the DomainAvailablilityCheckResultInner object - */ - public Observable checkDomainAvailabilityAsync() { - return checkDomainAvailabilityWithServiceResponseAsync().map(new Func1, DomainAvailablilityCheckResultInner>() { - @Override - public DomainAvailablilityCheckResultInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Checks if a domain is available for registration. - * - * @return the observable to the DomainAvailablilityCheckResultInner object - */ - public Observable> checkDomainAvailabilityWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String name = null; - NameIdentifierInner identifier = new NameIdentifierInner(); - identifier.withName(null); - return service.checkDomainAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), identifier, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkDomainAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Checks if a domain is available for registration. - * - * @param name Name of the object - * @return the DomainAvailablilityCheckResultInner object if successful. - */ - public DomainAvailablilityCheckResultInner checkDomainAvailability(String name) { - return checkDomainAvailabilityWithServiceResponseAsync(name).toBlocking().single().getBody(); - } - - /** - * Checks if a domain is available for registration. - * - * @param name Name of the object - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall checkDomainAvailabilityAsync(String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(checkDomainAvailabilityWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Checks if a domain is available for registration. - * - * @param name Name of the object - * @return the observable to the DomainAvailablilityCheckResultInner object - */ - public Observable checkDomainAvailabilityAsync(String name) { - return checkDomainAvailabilityWithServiceResponseAsync(name).map(new Func1, DomainAvailablilityCheckResultInner>() { - @Override - public DomainAvailablilityCheckResultInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Checks if a domain is available for registration. - * - * @param name Name of the object - * @return the observable to the DomainAvailablilityCheckResultInner object - */ - public Observable> checkDomainAvailabilityWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - NameIdentifierInner identifier = new NameIdentifierInner(); - identifier.withName(name); - return service.checkDomainAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), identifier, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkDomainAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkDomainAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param parameters Domain recommendation search parameters - * @return the PagedList<NameIdentifierInner> object if successful. - */ - public PagedList listDomainRecommendations(final DomainRecommendationSearchParametersInner parameters) { - ServiceResponse> response = listDomainRecommendationsSinglePageAsync(parameters).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists domain recommendations based on keywords. - * - * @param parameters Domain recommendation search parameters - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> listDomainRecommendationsAsync(final DomainRecommendationSearchParametersInner parameters, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - listDomainRecommendationsSinglePageAsync(parameters), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listDomainRecommendationsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param parameters Domain recommendation search parameters - * @return the observable to the PagedList<NameIdentifierInner> object - */ - public Observable> listDomainRecommendationsAsync(final DomainRecommendationSearchParametersInner parameters) { - return listDomainRecommendationsWithServiceResponseAsync(parameters) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param parameters Domain recommendation search parameters - * @return the observable to the PagedList<NameIdentifierInner> object - */ - public Observable>> listDomainRecommendationsWithServiceResponseAsync(final DomainRecommendationSearchParametersInner parameters) { - return listDomainRecommendationsSinglePageAsync(parameters) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listDomainRecommendationsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists domain recommendations based on keywords. - * - ServiceResponse> * @param parameters Domain recommendation search parameters - * @return the PagedList<NameIdentifierInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listDomainRecommendationsSinglePageAsync(final DomainRecommendationSearchParametersInner parameters) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.listDomainRecommendations(this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDomainRecommendationsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDomainRecommendationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DomainInner> object if successful. - */ - public PagedList getAllDomainsNext(final String nextPageLink) { - ServiceResponse> response = getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllDomainsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllDomainsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllDomainsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DomainInner> object - */ - public Observable> getAllDomainsNextAsync(final String nextPageLink) { - return getAllDomainsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists all domains in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DomainInner> object - */ - public Observable>> getAllDomainsNextWithServiceResponseAsync(final String nextPageLink) { - return getAllDomainsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllDomainsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all domains in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DomainInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllDomainsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllDomainsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllDomainsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllDomainsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<NameIdentifierInner> object if successful. - */ - public PagedList listDomainRecommendationsNext(final String nextPageLink) { - ServiceResponse> response = listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Lists domain recommendations based on keywords. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> listDomainRecommendationsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - listDomainRecommendationsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listDomainRecommendationsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<NameIdentifierInner> object - */ - public Observable> listDomainRecommendationsNextAsync(final String nextPageLink) { - return listDomainRecommendationsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Lists domain recommendations based on keywords. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<NameIdentifierInner> object - */ - public Observable>> listDomainRecommendationsNextWithServiceResponseAsync(final String nextPageLink) { - return listDomainRecommendationsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listDomainRecommendationsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists domain recommendations based on keywords. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<NameIdentifierInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listDomainRecommendationsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.listDomainRecommendationsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDomainRecommendationsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDomainRecommendationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java deleted file mode 100644 index 4e146a8fa51e..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in GlobalResourceGroups. - */ -public final class GlobalResourceGroupsInner { - /** The Retrofit service to perform REST calls. */ - private GlobalResourceGroupsService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of GlobalResourceGroupsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GlobalResourceGroupsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(GlobalResourceGroupsService.class); - this.client = client; - } - - /** - * The interface defining all the services for GlobalResourceGroups to be - * used by Retrofit to perform actually REST calls. - */ - interface GlobalResourceGroupsService { - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") - Observable> moveResources(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelopeInner moveResourceEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * - * @param resourceGroupName the String value - * @param moveResourceEnvelope the CsmMoveResourceEnvelopeInner value - */ - public void moveResources(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { - moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().getBody(); - } - - /** - * - * @param resourceGroupName the String value - * @param moveResourceEnvelope the CsmMoveResourceEnvelopeInner value - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall moveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); - } - - /** - * - * @param resourceGroupName the String value - * @param moveResourceEnvelope the CsmMoveResourceEnvelopeInner value - * @return the {@link ServiceResponse} object if successful. - */ - public Observable moveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { - return moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * - * @param resourceGroupName the String value - * @param moveResourceEnvelope the CsmMoveResourceEnvelopeInner value - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> moveResourcesWithServiceResponseAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (moveResourceEnvelope == null) { - throw new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(moveResourceEnvelope); - return service.moveResources(resourceGroupName, this.client.subscriptionId(), moveResourceEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = moveResourcesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse moveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(204, new TypeToken() { }.getType()) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java deleted file mode 100644 index a0be88ef7bd9..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java +++ /dev/null @@ -1,2196 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Globals. - */ -public final class GlobalsInner { - /** The Retrofit service to perform REST calls. */ - private GlobalsService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of GlobalsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public GlobalsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(GlobalsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Globals to be - * used by Retrofit to perform actually REST calls. - */ - interface GlobalsService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials") - Observable> getSubscriptionPublishingCredentials(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials") - Observable> updateSubscriptionPublishingCredentials(@Path("subscriptionId") String subscriptionId, @Body UserInner requestMessage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") - Observable> getSubscriptionGeoRegions(@Path("subscriptionId") String subscriptionId, @Query("sku") String sku, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") - Observable> getAllCertificates(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") - Observable> getAllServerFarms(@Path("subscriptionId") String subscriptionId, @Query("detailed") Boolean detailed, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") - Observable> getAllSites(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") - Observable> getAllHostingEnvironments(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/managedHostingEnvironments") - Observable> getAllManagedHostingEnvironments(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/classicMobileServices") - Observable> getAllClassicMobileServices(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") - Observable> listPremierAddOnOffers(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable") - Observable> isHostingEnvironmentNameAvailable(@Path("subscriptionId") String subscriptionId, @Query("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable/{name}") - Observable> isHostingEnvironmentWithLegacyNameAvailable(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Body ResourceNameAvailabilityRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getSubscriptionGeoRegionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllCertificatesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllServerFarmsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllHostingEnvironmentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllManagedHostingEnvironmentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getAllClassicMobileServicesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets publishing credentials for the subscription owner. - * - * @return the UserInner object if successful. - */ - public UserInner getSubscriptionPublishingCredentials() { - return getSubscriptionPublishingCredentialsWithServiceResponseAsync().toBlocking().single().getBody(); - } - - /** - * Gets publishing credentials for the subscription owner. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getSubscriptionPublishingCredentialsAsync(final ServiceCallback serviceCallback) { - return ServiceCall.create(getSubscriptionPublishingCredentialsWithServiceResponseAsync(), serviceCallback); - } - - /** - * Gets publishing credentials for the subscription owner. - * - * @return the observable to the UserInner object - */ - public Observable getSubscriptionPublishingCredentialsAsync() { - return getSubscriptionPublishingCredentialsWithServiceResponseAsync().map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets publishing credentials for the subscription owner. - * - * @return the observable to the UserInner object - */ - public Observable> getSubscriptionPublishingCredentialsWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSubscriptionPublishingCredentials(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSubscriptionPublishingCredentialsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSubscriptionPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates publishing credentials for the subscription owner. - * - * @param requestMessage requestMessage with new publishing credentials - * @return the UserInner object if successful. - */ - public UserInner updateSubscriptionPublishingCredentials(UserInner requestMessage) { - return updateSubscriptionPublishingCredentialsWithServiceResponseAsync(requestMessage).toBlocking().single().getBody(); - } - - /** - * Updates publishing credentials for the subscription owner. - * - * @param requestMessage requestMessage with new publishing credentials - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall updateSubscriptionPublishingCredentialsAsync(UserInner requestMessage, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSubscriptionPublishingCredentialsWithServiceResponseAsync(requestMessage), serviceCallback); - } - - /** - * Updates publishing credentials for the subscription owner. - * - * @param requestMessage requestMessage with new publishing credentials - * @return the observable to the UserInner object - */ - public Observable updateSubscriptionPublishingCredentialsAsync(UserInner requestMessage) { - return updateSubscriptionPublishingCredentialsWithServiceResponseAsync(requestMessage).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Updates publishing credentials for the subscription owner. - * - * @param requestMessage requestMessage with new publishing credentials - * @return the observable to the UserInner object - */ - public Observable> updateSubscriptionPublishingCredentialsWithServiceResponseAsync(UserInner requestMessage) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (requestMessage == null) { - throw new IllegalArgumentException("Parameter requestMessage is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(requestMessage); - return service.updateSubscriptionPublishingCredentials(this.client.subscriptionId(), requestMessage, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateSubscriptionPublishingCredentialsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateSubscriptionPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets list of available geo regions. - * - * @return the PagedList<GeoRegionInner> object if successful. - */ - public PagedList getSubscriptionGeoRegions() { - ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of available geo regions. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getSubscriptionGeoRegionsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSubscriptionGeoRegionsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of available geo regions. - * - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable> getSubscriptionGeoRegionsAsync() { - return getSubscriptionGeoRegionsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of available geo regions. - * - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable>> getSubscriptionGeoRegionsWithServiceResponseAsync() { - return getSubscriptionGeoRegionsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of available geo regions. - * - * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSubscriptionGeoRegionsSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String sku = null; - return service.getSubscriptionGeoRegions(this.client.subscriptionId(), sku, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSubscriptionGeoRegionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets list of available geo regions. - * - * @param sku Filter only to regions that support this sku - * @return the PagedList<GeoRegionInner> object if successful. - */ - public PagedList getSubscriptionGeoRegions(final String sku) { - ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync(sku).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of available geo regions. - * - * @param sku Filter only to regions that support this sku - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getSubscriptionGeoRegionsAsync(final String sku, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSubscriptionGeoRegionsSinglePageAsync(sku), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of available geo regions. - * - * @param sku Filter only to regions that support this sku - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable> getSubscriptionGeoRegionsAsync(final String sku) { - return getSubscriptionGeoRegionsWithServiceResponseAsync(sku) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of available geo regions. - * - * @param sku Filter only to regions that support this sku - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable>> getSubscriptionGeoRegionsWithServiceResponseAsync(final String sku) { - return getSubscriptionGeoRegionsSinglePageAsync(sku) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of available geo regions. - * - ServiceResponse> * @param sku Filter only to regions that support this sku - * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSubscriptionGeoRegionsSinglePageAsync(final String sku) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSubscriptionGeoRegions(this.client.subscriptionId(), sku, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSubscriptionGeoRegionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getSubscriptionGeoRegionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all certificates for a subscription. - * - * @return the PagedList<CertificateInner> object if successful. - */ - public PagedList getAllCertificates() { - ServiceResponse> response = getAllCertificatesSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all certificates for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllCertificatesAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllCertificatesSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllCertificatesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all certificates for a subscription. - * - * @return the observable to the PagedList<CertificateInner> object - */ - public Observable> getAllCertificatesAsync() { - return getAllCertificatesWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all certificates for a subscription. - * - * @return the observable to the PagedList<CertificateInner> object - */ - public Observable>> getAllCertificatesWithServiceResponseAsync() { - return getAllCertificatesSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllCertificatesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all certificates for a subscription. - * - * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllCertificatesSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllCertificates(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllCertificatesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllCertificatesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getAllServerFarms() { - ServiceResponse> response = getAllServerFarmsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllServerFarmsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllServerFarmsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getAllServerFarmsAsync() { - return getAllServerFarmsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getAllServerFarmsWithServiceResponseAsync() { - return getAllServerFarmsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllServerFarmsSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean detailed = null; - return service.getAllServerFarms(this.client.subscriptionId(), detailed, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllServerFarmsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. - Retrieval of all properties may increase the API latency. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getAllServerFarms(final Boolean detailed) { - ServiceResponse> response = getAllServerFarmsSinglePageAsync(detailed).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. - Retrieval of all properties may increase the API latency. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllServerFarmsAsync(final Boolean detailed, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllServerFarmsSinglePageAsync(detailed), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. - Retrieval of all properties may increase the API latency. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getAllServerFarmsAsync(final Boolean detailed) { - return getAllServerFarmsWithServiceResponseAsync(detailed) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. - Retrieval of all properties may increase the API latency. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getAllServerFarmsWithServiceResponseAsync(final Boolean detailed) { - return getAllServerFarmsSinglePageAsync(detailed) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - ServiceResponse> * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. - Retrieval of all properties may increase the API latency. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllServerFarmsSinglePageAsync(final Boolean detailed) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllServerFarms(this.client.subscriptionId(), detailed, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllServerFarmsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all Web Apps for a subscription. - * - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getAllSites() { - ServiceResponse> response = getAllSitesSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all Web Apps for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllSitesAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllSitesSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all Web Apps for a subscription. - * - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getAllSitesAsync() { - return getAllSitesWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all Web Apps for a subscription. - * - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getAllSitesWithServiceResponseAsync() { - return getAllSitesSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all Web Apps for a subscription. - * - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllSitesSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllSites(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @return the PagedList<HostingEnvironmentInner> object if successful. - */ - public PagedList getAllHostingEnvironments() { - ServiceResponse> response = getAllHostingEnvironmentsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllHostingEnvironmentsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllHostingEnvironmentsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable> getAllHostingEnvironmentsAsync() { - return getAllHostingEnvironmentsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable>> getAllHostingEnvironmentsWithServiceResponseAsync() { - return getAllHostingEnvironmentsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllHostingEnvironmentsSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllHostingEnvironments(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllHostingEnvironmentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @return the PagedList<ManagedHostingEnvironmentInner> object if successful. - */ - public PagedList getAllManagedHostingEnvironments() { - ServiceResponse> response = getAllManagedHostingEnvironmentsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllManagedHostingEnvironmentsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllManagedHostingEnvironmentsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @return the observable to the PagedList<ManagedHostingEnvironmentInner> object - */ - public Observable> getAllManagedHostingEnvironmentsAsync() { - return getAllManagedHostingEnvironmentsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @return the observable to the PagedList<ManagedHostingEnvironmentInner> object - */ - public Observable>> getAllManagedHostingEnvironmentsWithServiceResponseAsync() { - return getAllManagedHostingEnvironmentsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @return the PagedList<ManagedHostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllManagedHostingEnvironmentsSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllManagedHostingEnvironments(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllManagedHostingEnvironmentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllManagedHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all mobile services for a subscription. - * - * @return the PagedList<ClassicMobileServiceInner> object if successful. - */ - public PagedList getAllClassicMobileServices() { - ServiceResponse> response = getAllClassicMobileServicesSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all mobile services for a subscription. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllClassicMobileServicesAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllClassicMobileServicesSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all mobile services for a subscription. - * - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable> getAllClassicMobileServicesAsync() { - return getAllClassicMobileServicesWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all mobile services for a subscription. - * - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable>> getAllClassicMobileServicesWithServiceResponseAsync() { - return getAllClassicMobileServicesSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllClassicMobileServicesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all mobile services for a subscription. - * - * @return the PagedList<ClassicMobileServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllClassicMobileServicesSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getAllClassicMobileServices(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllClassicMobileServicesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllClassicMobileServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List premier add on offers. - * - * @return the Object object if successful. - */ - public Object listPremierAddOnOffers() { - return listPremierAddOnOffersWithServiceResponseAsync().toBlocking().single().getBody(); - } - - /** - * List premier add on offers. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall listPremierAddOnOffersAsync(final ServiceCallback serviceCallback) { - return ServiceCall.create(listPremierAddOnOffersWithServiceResponseAsync(), serviceCallback); - } - - /** - * List premier add on offers. - * - * @return the observable to the Object object - */ - public Observable listPremierAddOnOffersAsync() { - return listPremierAddOnOffersWithServiceResponseAsync().map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * List premier add on offers. - * - * @return the observable to the Object object - */ - public Observable> listPremierAddOnOffersWithServiceResponseAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listPremierAddOnOffers(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listPremierAddOnOffersDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listPremierAddOnOffersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the Object object if successful. - */ - public Object isHostingEnvironmentNameAvailable(String name) { - return isHostingEnvironmentNameAvailableWithServiceResponseAsync(name).toBlocking().single().getBody(); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall isHostingEnvironmentNameAvailableAsync(String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(isHostingEnvironmentNameAvailableWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the observable to the Object object - */ - public Observable isHostingEnvironmentNameAvailableAsync(String name) { - return isHostingEnvironmentNameAvailableWithServiceResponseAsync(name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the observable to the Object object - */ - public Observable> isHostingEnvironmentNameAvailableWithServiceResponseAsync(String name) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name 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.isHostingEnvironmentNameAvailable(this.client.subscriptionId(), name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = isHostingEnvironmentNameAvailableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse isHostingEnvironmentNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the Object object if successful. - */ - public Object isHostingEnvironmentWithLegacyNameAvailable(String name) { - return isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name).toBlocking().single().getBody(); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall isHostingEnvironmentWithLegacyNameAvailableAsync(String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name), serviceCallback); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the observable to the Object object - */ - public Observable isHostingEnvironmentWithLegacyNameAvailableAsync(String name) { - return isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Whether hosting environment name is available. - * - * @param name Hosting environment name - * @return the observable to the Object object - */ - public Observable> isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(String name) { - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.isHostingEnvironmentWithLegacyNameAvailable(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = isHostingEnvironmentWithLegacyNameAvailableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse isHostingEnvironmentWithLegacyNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Check if resource name is available. - * - * @param request Name availability request - * @return the ResourceNameAvailabilityInner object if successful. - */ - public ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequestInner request) { - return checkNameAvailabilityWithServiceResponseAsync(request).toBlocking().single().getBody(); - } - - /** - * Check if resource name is available. - * - * @param request Name availability request - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall checkNameAvailabilityAsync(ResourceNameAvailabilityRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(checkNameAvailabilityWithServiceResponseAsync(request), serviceCallback); - } - - /** - * Check if resource name is available. - * - * @param request Name availability request - * @return the observable to the ResourceNameAvailabilityInner object - */ - public Observable checkNameAvailabilityAsync(ResourceNameAvailabilityRequestInner request) { - return checkNameAvailabilityWithServiceResponseAsync(request).map(new Func1, ResourceNameAvailabilityInner>() { - @Override - public ResourceNameAvailabilityInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Check if resource name is available. - * - * @param request Name availability request - * @return the observable to the ResourceNameAvailabilityInner object - */ - public Observable> checkNameAvailabilityWithServiceResponseAsync(ResourceNameAvailabilityRequestInner request) { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.checkNameAvailability(this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets list of available geo regions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<GeoRegionInner> object if successful. - */ - public PagedList getSubscriptionGeoRegionsNext(final String nextPageLink) { - ServiceResponse> response = getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of available geo regions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getSubscriptionGeoRegionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of available geo regions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable> getSubscriptionGeoRegionsNextAsync(final String nextPageLink) { - return getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of available geo regions. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<GeoRegionInner> object - */ - public Observable>> getSubscriptionGeoRegionsNextWithServiceResponseAsync(final String nextPageLink) { - return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of available geo regions. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSubscriptionGeoRegionsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getSubscriptionGeoRegionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSubscriptionGeoRegionsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getSubscriptionGeoRegionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all certificates for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateInner> object if successful. - */ - public PagedList getAllCertificatesNext(final String nextPageLink) { - ServiceResponse> response = getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all certificates for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllCertificatesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllCertificatesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllCertificatesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all certificates for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateInner> object - */ - public Observable> getAllCertificatesNextAsync(final String nextPageLink) { - return getAllCertificatesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all certificates for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CertificateInner> object - */ - public Observable>> getAllCertificatesNextWithServiceResponseAsync(final String nextPageLink) { - return getAllCertificatesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllCertificatesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all certificates for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CertificateInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllCertificatesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllCertificatesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllCertificatesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllCertificatesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getAllServerFarmsNext(final String nextPageLink) { - ServiceResponse> response = getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllServerFarmsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllServerFarmsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getAllServerFarmsNextAsync(final String nextPageLink) { - return getAllServerFarmsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getAllServerFarmsNextWithServiceResponseAsync(final String nextPageLink) { - return getAllServerFarmsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all App Service Plans for a subcription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllServerFarmsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllServerFarmsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllServerFarmsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllServerFarmsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all Web Apps for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getAllSitesNext(final String nextPageLink) { - ServiceResponse> response = getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all Web Apps for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllSitesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all Web Apps for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getAllSitesNextAsync(final String nextPageLink) { - return getAllSitesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all Web Apps for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getAllSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getAllSitesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all Web Apps for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllSitesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllSitesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object if successful. - */ - public PagedList getAllHostingEnvironmentsNext(final String nextPageLink) { - ServiceResponse> response = getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllHostingEnvironmentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable> getAllHostingEnvironmentsNextAsync(final String nextPageLink) { - return getAllHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable>> getAllHostingEnvironmentsNextWithServiceResponseAsync(final String nextPageLink) { - return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all hostingEnvironments (App Service Environment) for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllHostingEnvironmentsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllHostingEnvironmentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllHostingEnvironmentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllHostingEnvironmentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ManagedHostingEnvironmentInner> object if successful. - */ - public PagedList getAllManagedHostingEnvironmentsNext(final String nextPageLink) { - ServiceResponse> response = getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllManagedHostingEnvironmentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ManagedHostingEnvironmentInner> object - */ - public Observable> getAllManagedHostingEnvironmentsNextAsync(final String nextPageLink) { - return getAllManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all managed hosting environments for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ManagedHostingEnvironmentInner> object - */ - public Observable>> getAllManagedHostingEnvironmentsNextWithServiceResponseAsync(final String nextPageLink) { - return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all managed hosting environments for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ManagedHostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllManagedHostingEnvironmentsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllManagedHostingEnvironmentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllManagedHostingEnvironmentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllManagedHostingEnvironmentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all mobile services for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ClassicMobileServiceInner> object if successful. - */ - public PagedList getAllClassicMobileServicesNext(final String nextPageLink) { - ServiceResponse> response = getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets all mobile services for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getAllClassicMobileServicesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getAllClassicMobileServicesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all mobile services for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable> getAllClassicMobileServicesNextAsync(final String nextPageLink) { - return getAllClassicMobileServicesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets all mobile services for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ClassicMobileServiceInner> object - */ - public Observable>> getAllClassicMobileServicesNextWithServiceResponseAsync(final String nextPageLink) { - return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getAllClassicMobileServicesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all mobile services for a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ClassicMobileServiceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getAllClassicMobileServicesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getAllClassicMobileServicesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getAllClassicMobileServicesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getAllClassicMobileServicesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionInner.java new file mode 100644 index 000000000000..74e6a2bb89dd --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionInner.java @@ -0,0 +1,205 @@ +/** + * 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.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Hybrid Connection contract. This is used to configure a Hybrid Connection. + */ +@JsonFlatten +public class HybridConnectionInner extends Resource { + /** + * The name of the Service Bus Namespace. + */ + @JsonProperty(value = "properties.serviceBusNamespace") + private String serviceBusNamespace; + + /** + * The name of the Service Bus Relay. + */ + @JsonProperty(value = "properties.relayName") + private String relayName; + + /** + * The ARM URI to the Service Bus Relay. + */ + @JsonProperty(value = "properties.relayArmUri") + private String relayArmUri; + + /** + * The hostname of the endpoint. + */ + @JsonProperty(value = "properties.hostname") + private String hostname; + + /** + * The port of the endpoint. + */ + @JsonProperty(value = "properties.port") + private Integer port; + + /** + * The name of the Service Bus key which has Send permissions. This is + * used to authenticate to Service Bus. + */ + @JsonProperty(value = "properties.sendKeyName") + private String sendKeyName; + + /** + * The value of the Service Bus key. This is used to authenticate to + * Service Bus. In ARM this key will not be returned + * normally, use the POST /listKeys API instead. + */ + @JsonProperty(value = "properties.sendKeyValue") + private String sendKeyValue; + + /** + * Get the serviceBusNamespace value. + * + * @return the serviceBusNamespace value + */ + public String serviceBusNamespace() { + return this.serviceBusNamespace; + } + + /** + * Set the serviceBusNamespace value. + * + * @param serviceBusNamespace the serviceBusNamespace value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withServiceBusNamespace(String serviceBusNamespace) { + this.serviceBusNamespace = serviceBusNamespace; + return this; + } + + /** + * Get the relayName value. + * + * @return the relayName value + */ + public String relayName() { + return this.relayName; + } + + /** + * Set the relayName value. + * + * @param relayName the relayName value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withRelayName(String relayName) { + this.relayName = relayName; + return this; + } + + /** + * Get the relayArmUri value. + * + * @return the relayArmUri value + */ + public String relayArmUri() { + return this.relayArmUri; + } + + /** + * Set the relayArmUri value. + * + * @param relayArmUri the relayArmUri value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withRelayArmUri(String relayArmUri) { + this.relayArmUri = relayArmUri; + return this; + } + + /** + * Get the hostname value. + * + * @return the hostname value + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname value. + * + * @param hostname the hostname value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the port value. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the port value. + * + * @param port the port value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the sendKeyName value. + * + * @return the sendKeyName value + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Set the sendKeyName value. + * + * @param sendKeyName the sendKeyName value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyName(String sendKeyName) { + this.sendKeyName = sendKeyName; + return this; + } + + /** + * Get the sendKeyValue value. + * + * @return the sendKeyValue value + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + + /** + * Set the sendKeyValue value. + * + * @param sendKeyValue the sendKeyValue value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyValue(String sendKeyValue) { + this.sendKeyValue = sendKeyValue; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionKeyInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionKeyInner.java new file mode 100644 index 000000000000..c55b9a844d55 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HybridConnectionKeyInner.java @@ -0,0 +1,73 @@ +/** + * 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.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Hybrid Connection key contract. This has the send key name and value for a + * Hybrid Connection. + */ +@JsonFlatten +public class HybridConnectionKeyInner extends Resource { + /** + * The name of the send key. + */ + @JsonProperty(value = "properties.sendKeyName") + private String sendKeyName; + + /** + * The value of the send key. + */ + @JsonProperty(value = "properties.sendKeyValue") + private String sendKeyValue; + + /** + * Get the sendKeyName value. + * + * @return the sendKeyName value + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Set the sendKeyName value. + * + * @param sendKeyName the sendKeyName value to set + * @return the HybridConnectionKeyInner object itself. + */ + public HybridConnectionKeyInner withSendKeyName(String sendKeyName) { + this.sendKeyName = sendKeyName; + return this; + } + + /** + * Get the sendKeyValue value. + * + * @return the sendKeyValue value + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + + /** + * Set the sendKeyValue value. + * + * @param sendKeyValue the sendKeyValue value to set + * @return the HybridConnectionKeyInner object itself. + */ + public HybridConnectionKeyInner withSendKeyValue(String sendKeyValue) { + this.sendKeyValue = sendKeyValue; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentInner.java deleted file mode 100644 index 3278b7419ac7..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentInner.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import com.microsoft.azure.management.website.ManagedHostingEnvironmentStatus; -import com.microsoft.azure.management.website.VirtualNetworkProfile; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * Description of a managed hosting environment. - */ -@JsonFlatten -public class ManagedHostingEnvironmentInner extends Resource { - /** - * Name of the managed hosting environment. - */ - @JsonProperty(value = "properties.name") - private String managedHostingEnvironmentName; - - /** - * Location of the managed hosting environment e.g. "West US". - */ - @JsonProperty(value = "properties.location") - private String managedHostingEnvironmentLocation; - - /** - * Current status of the managed hosting environment. Possible values - * include: 'Preparing', 'Ready', 'Deleting'. - */ - @JsonProperty(value = "properties.status") - private ManagedHostingEnvironmentStatus status; - - /** - * Description of the managed hosting environment's virtual network. - */ - @JsonProperty(value = "properties.virtualNetwork") - private VirtualNetworkProfile virtualNetwork; - - /** - * Number of ip ssl addresses reserved for the managed hosting environment. - */ - @JsonProperty(value = "properties.ipsslAddressCount") - private Integer ipsslAddressCount; - - /** - * DNS suffix of the managed hosting environment. - */ - @JsonProperty(value = "properties.dnsSuffix") - private String dnsSuffix; - - /** - * Subscription of the managed hosting environment (read only). - */ - @JsonProperty(value = "properties.subscriptionId") - private String subscriptionId; - - /** - * Resource group of the managed hosting environment (read only). - */ - @JsonProperty(value = "properties.resourceGroup") - private String resourceGroup; - - /** - * True/false indicating whether the managed hosting environment is - * healthy. - */ - @JsonProperty(value = "properties.environmentIsHealthy") - private Boolean environmentIsHealthy; - - /** - * Detailed message about with results of the last check of the managed - * hosting environment. - */ - @JsonProperty(value = "properties.environmentStatus") - private String environmentStatus; - - /** - * True/false indicating whether the managed hosting environment is - * suspended. The environment can be suspended e.g. when the management - * endpoint is no longer available - * (most likely because NSG blocked the incoming traffic). - */ - @JsonProperty(value = "properties.suspended") - private Boolean suspended; - - /** - * Resource id of the api management account associated with this managed - * hosting environment (read only). - */ - @JsonProperty(value = "properties.apiManagementAccount") - private String apiManagementAccount; - - /** - * Get the managedHostingEnvironmentName value. - * - * @return the managedHostingEnvironmentName value - */ - public String managedHostingEnvironmentName() { - return this.managedHostingEnvironmentName; - } - - /** - * Set the managedHostingEnvironmentName value. - * - * @param managedHostingEnvironmentName the managedHostingEnvironmentName value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withManagedHostingEnvironmentName(String managedHostingEnvironmentName) { - this.managedHostingEnvironmentName = managedHostingEnvironmentName; - return this; - } - - /** - * Get the managedHostingEnvironmentLocation value. - * - * @return the managedHostingEnvironmentLocation value - */ - public String managedHostingEnvironmentLocation() { - return this.managedHostingEnvironmentLocation; - } - - /** - * Set the managedHostingEnvironmentLocation value. - * - * @param managedHostingEnvironmentLocation the managedHostingEnvironmentLocation value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withManagedHostingEnvironmentLocation(String managedHostingEnvironmentLocation) { - this.managedHostingEnvironmentLocation = managedHostingEnvironmentLocation; - return this; - } - - /** - * Get the status value. - * - * @return the status value - */ - public ManagedHostingEnvironmentStatus status() { - return this.status; - } - - /** - * Set the status value. - * - * @param status the status value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withStatus(ManagedHostingEnvironmentStatus status) { - this.status = status; - return this; - } - - /** - * Get the virtualNetwork value. - * - * @return the virtualNetwork value - */ - public VirtualNetworkProfile virtualNetwork() { - return this.virtualNetwork; - } - - /** - * Set the virtualNetwork value. - * - * @param virtualNetwork the virtualNetwork value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get the ipsslAddressCount value. - * - * @return the ipsslAddressCount value - */ - public Integer ipsslAddressCount() { - return this.ipsslAddressCount; - } - - /** - * Set the ipsslAddressCount value. - * - * @param ipsslAddressCount the ipsslAddressCount value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withIpsslAddressCount(Integer ipsslAddressCount) { - this.ipsslAddressCount = ipsslAddressCount; - return this; - } - - /** - * Get the dnsSuffix value. - * - * @return the dnsSuffix value - */ - public String dnsSuffix() { - return this.dnsSuffix; - } - - /** - * Set the dnsSuffix value. - * - * @param dnsSuffix the dnsSuffix value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withDnsSuffix(String dnsSuffix) { - this.dnsSuffix = dnsSuffix; - return this; - } - - /** - * Get the subscriptionId value. - * - * @return the subscriptionId value - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId value. - * - * @param subscriptionId the subscriptionId value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup value. - * - * @return the resourceGroup value - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup value. - * - * @param resourceGroup the resourceGroup value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the environmentIsHealthy value. - * - * @return the environmentIsHealthy value - */ - public Boolean environmentIsHealthy() { - return this.environmentIsHealthy; - } - - /** - * Set the environmentIsHealthy value. - * - * @param environmentIsHealthy the environmentIsHealthy value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withEnvironmentIsHealthy(Boolean environmentIsHealthy) { - this.environmentIsHealthy = environmentIsHealthy; - return this; - } - - /** - * Get the environmentStatus value. - * - * @return the environmentStatus value - */ - public String environmentStatus() { - return this.environmentStatus; - } - - /** - * Set the environmentStatus value. - * - * @param environmentStatus the environmentStatus value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withEnvironmentStatus(String environmentStatus) { - this.environmentStatus = environmentStatus; - return this; - } - - /** - * Get the suspended value. - * - * @return the suspended value - */ - public Boolean suspended() { - return this.suspended; - } - - /** - * Set the suspended value. - * - * @param suspended the suspended value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withSuspended(Boolean suspended) { - this.suspended = suspended; - return this; - } - - /** - * Get the apiManagementAccount value. - * - * @return the apiManagementAccount value - */ - public String apiManagementAccount() { - return this.apiManagementAccount; - } - - /** - * Set the apiManagementAccount value. - * - * @param apiManagementAccount the apiManagementAccount value to set - * @return the ManagedHostingEnvironmentInner object itself. - */ - public ManagedHostingEnvironmentInner withApiManagementAccount(String apiManagementAccount) { - this.apiManagementAccount = apiManagementAccount; - return this; - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java deleted file mode 100644 index 2cb7f5a5b23c..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java +++ /dev/null @@ -1,1812 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ManagedHostingEnvironments. - */ -public final class ManagedHostingEnvironmentsInner { - /** The Retrofit service to perform REST calls. */ - private ManagedHostingEnvironmentsService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of ManagedHostingEnvironmentsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ManagedHostingEnvironmentsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(ManagedHostingEnvironmentsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ManagedHostingEnvironments to be - * used by Retrofit to perform actually REST calls. - */ - interface ManagedHostingEnvironmentsService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}") - Observable> getManagedHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}") - Observable> createOrUpdateManagedHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body HostingEnvironmentInner managedHostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}") - Observable> beginCreateOrUpdateManagedHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body HostingEnvironmentInner managedHostingEnvironmentEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}", method = "DELETE", hasBody = true) - Observable> deleteManagedHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}", method = "DELETE", hasBody = true) - Observable> beginDeleteManagedHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("forceDelete") Boolean forceDelete, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments") - Observable> getManagedHostingEnvironments(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/capacities/virtualip") - Observable> getManagedHostingEnvironmentVips(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/operations/{operationId}") - Observable> getManagedHostingEnvironmentOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/sites") - Observable> getManagedHostingEnvironmentSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/webhostingplans") - Observable> getManagedHostingEnvironmentWebHostingPlans(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/serverfarms") - Observable> getManagedHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getManagedHostingEnvironmentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getManagedHostingEnvironmentSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getManagedHostingEnvironmentWebHostingPlansNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getManagedHostingEnvironmentServerFarmsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Get properties of a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the ManagedHostingEnvironmentInner object if successful. - */ - public ManagedHostingEnvironmentInner getManagedHostingEnvironment(String resourceGroupName, String name) { - return getManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Get properties of a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getManagedHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Get properties of a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the ManagedHostingEnvironmentInner object - */ - public Observable getManagedHostingEnvironmentAsync(String resourceGroupName, String name) { - return getManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ManagedHostingEnvironmentInner>() { - @Override - public ManagedHostingEnvironmentInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Get properties of a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the ManagedHostingEnvironmentInner object - */ - public Observable> getManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getManagedHostingEnvironmentDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the HostingEnvironmentInner object if successful. - */ - public HostingEnvironmentInner createOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - return createOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).toBlocking().last().getBody(); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateManagedHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope), serviceCallback); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the observable for the request - */ - public Observable createOrUpdateManagedHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - return createOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).map(new Func1, HostingEnvironmentInner>() { - @Override - public HostingEnvironmentInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the observable for the request - */ - public Observable> createOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (managedHostingEnvironmentEnvelope == null) { - throw new IllegalArgumentException("Parameter managedHostingEnvironmentEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(managedHostingEnvironmentEnvelope); - Observable> observable = service.createOrUpdateManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), managedHostingEnvironmentEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the HostingEnvironmentInner object if successful. - */ - public HostingEnvironmentInner beginCreateOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - return beginCreateOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).toBlocking().single().getBody(); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall beginCreateOrUpdateManagedHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope), serviceCallback); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the observable to the HostingEnvironmentInner object - */ - public Observable beginCreateOrUpdateManagedHostingEnvironmentAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - return beginCreateOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).map(new Func1, HostingEnvironmentInner>() { - @Override - public HostingEnvironmentInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Create or update a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @return the observable to the HostingEnvironmentInner object - */ - public Observable> beginCreateOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (managedHostingEnvironmentEnvelope == null) { - throw new IllegalArgumentException("Parameter managedHostingEnvironmentEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(managedHostingEnvironmentEnvelope); - return service.beginCreateOrUpdateManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), managedHostingEnvironmentEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateManagedHostingEnvironmentDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the Object object if successful. - */ - public Object deleteManagedHostingEnvironment(String resourceGroupName, String name) { - return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall deleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable for the request - */ - public Observable deleteManagedHostingEnvironmentAsync(String resourceGroupName, String name) { - return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable for the request - */ - public Observable> deleteManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean forceDelete = null; - Observable> observable = service.deleteManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the Object object if successful. - */ - public Object deleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { - return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().getBody(); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall deleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the observable for the request - */ - public Observable deleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete) { - return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the observable for the request - */ - public Observable> deleteManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.deleteManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the Object object if successful. - */ - public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name) { - return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall beginDeleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the Object object - */ - public Observable beginDeleteManagedHostingEnvironmentAsync(String resourceGroupName, String name) { - return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the Object object - */ - public Observable> beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean forceDelete = null; - return service.beginDeleteManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteManagedHostingEnvironmentDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the Object object if successful. - */ - public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { - return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().getBody(); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall beginDeleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete), serviceCallback); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the observable to the Object object - */ - public Observable beginDeleteManagedHostingEnvironmentAsync(String resourceGroupName, String name, Boolean forceDelete) { - return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Delete a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param forceDelete Delete even if the managed hosting environment contains resources - * @return the observable to the Object object - */ - public Observable> beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, Boolean forceDelete) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDeleteManagedHostingEnvironment(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteManagedHostingEnvironmentDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteManagedHostingEnvironmentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the PagedList<HostingEnvironmentInner> object if successful. - */ - public PagedList getManagedHostingEnvironments(final String resourceGroupName) { - ServiceResponse> response = getManagedHostingEnvironmentsSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param resourceGroupName Name of resource group - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentsAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentsSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable> getManagedHostingEnvironmentsAsync(final String resourceGroupName) { - return getManagedHostingEnvironmentsWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable>> getManagedHostingEnvironmentsWithServiceResponseAsync(final String resourceGroupName) { - return getManagedHostingEnvironmentsSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all managed hosting environments in a resource group. - * - ServiceResponse> * @param resourceGroupName Name of resource group - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentsSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironments(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get list of ip addresses assigned to a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the AddressResponseInner object if successful. - */ - public AddressResponseInner getManagedHostingEnvironmentVips(String resourceGroupName, String name) { - return getManagedHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Get list of ip addresses assigned to a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getManagedHostingEnvironmentVipsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getManagedHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Get list of ip addresses assigned to a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the AddressResponseInner object - */ - public Observable getManagedHostingEnvironmentVipsAsync(String resourceGroupName, String name) { - return getManagedHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AddressResponseInner>() { - @Override - public AddressResponseInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Get list of ip addresses assigned to a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the AddressResponseInner object - */ - public Observable> getManagedHostingEnvironmentVipsWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironmentVips(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getManagedHostingEnvironmentVipsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getManagedHostingEnvironmentVipsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get status of an operation on a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param operationId operation identifier GUID - * @return the Object object if successful. - */ - public Object getManagedHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) { - return getManagedHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); - } - - /** - * Get status of an operation on a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param operationId operation identifier GUID - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getManagedHostingEnvironmentOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getManagedHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); - } - - /** - * Get status of an operation on a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param operationId operation identifier GUID - * @return the observable to the Object object - */ - public Observable getManagedHostingEnvironmentOperationAsync(String resourceGroupName, String name, String operationId) { - return getManagedHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Get status of an operation on a managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param operationId operation identifier GUID - * @return the observable to the Object object - */ - public Observable> getManagedHostingEnvironmentOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironmentOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getManagedHostingEnvironmentOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getManagedHostingEnvironmentOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .register(500, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name) { - ServiceResponse> response = getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getManagedHostingEnvironmentSitesAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentSitesWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getManagedHostingEnvironmentSitesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentSitesSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String propertiesToInclude = null; - return service.getManagedHostingEnvironmentSites(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param propertiesToInclude Comma separated list of site properties to include - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) { - ServiceResponse> response = getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param propertiesToInclude Comma separated list of site properties to include - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param propertiesToInclude Comma separated list of site properties to include - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getManagedHostingEnvironmentSitesAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getManagedHostingEnvironmentSitesWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param propertiesToInclude Comma separated list of site properties to include - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getManagedHostingEnvironmentSitesWithServiceResponseAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of managed hosting environment - ServiceResponse> * @param propertiesToInclude Comma separated list of site properties to include - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentSitesSinglePageAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironmentSites(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) { - ServiceResponse> response = getManagedHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentWebHostingPlansAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getManagedHostingEnvironmentWebHostingPlansAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentWebHostingPlansWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getManagedHostingEnvironmentWebHostingPlansWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of managed hosting environment - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentWebHostingPlansSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentWebHostingPlansDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentServerFarms(final String resourceGroupName, final String name) { - ServiceResponse> response = getManagedHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentServerFarmsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getManagedHostingEnvironmentServerFarmsAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentServerFarmsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param resourceGroupName Name of resource group - * @param name Name of managed hosting environment - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getManagedHostingEnvironmentServerFarmsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getManagedHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of managed hosting environment - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentServerFarmsSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getManagedHostingEnvironmentServerFarms(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentServerFarmsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentsNext(final String nextPageLink) { - ServiceResponse> response = getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable> getManagedHostingEnvironmentsNextAsync(final String nextPageLink) { - return getManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all managed hosting environments in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostingEnvironmentInner> object - */ - public Observable>> getManagedHostingEnvironmentsNextWithServiceResponseAsync(final String nextPageLink) { - return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all managed hosting environments in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostingEnvironmentInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getManagedHostingEnvironmentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentSitesNext(final String nextPageLink) { - ServiceResponse> response = getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all sites on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getManagedHostingEnvironmentSitesNextAsync(final String nextPageLink) { - return getManagedHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getManagedHostingEnvironmentSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all sites on the managed hosting environment. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentSitesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getManagedHostingEnvironmentSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentSitesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentWebHostingPlansNext(final String nextPageLink) { - ServiceResponse> response = getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentWebHostingPlansNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getManagedHostingEnvironmentWebHostingPlansNextAsync(final String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getManagedHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(final String nextPageLink) { - return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentWebHostingPlansNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getManagedHostingEnvironmentWebHostingPlansNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentWebHostingPlansNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentWebHostingPlansNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getManagedHostingEnvironmentServerFarmsNext(final String nextPageLink) { - ServiceResponse> response = getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getManagedHostingEnvironmentServerFarmsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getManagedHostingEnvironmentServerFarmsNextAsync(final String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getManagedHostingEnvironmentServerFarmsNextWithServiceResponseAsync(final String nextPageLink) { - return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getManagedHostingEnvironmentServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all serverfarms (App Service Plans) on the managed hosting environment. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getManagedHostingEnvironmentServerFarmsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getManagedHostingEnvironmentServerFarmsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getManagedHostingEnvironmentServerFarmsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/MigrateMySqlRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/MigrateMySqlRequestInner.java new file mode 100644 index 000000000000..9b4e270c96ae --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/MigrateMySqlRequestInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Description of a MySql migration request. + */ +@JsonFlatten +public class MigrateMySqlRequestInner extends Resource { + /** + * Connection string to the remote MySql database to which data should be + * migrated. + */ + @JsonProperty(value = "properties.connectionString") + private String connectionString; + + /** + * Get the connectionString value. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString value. + * + * @param connectionString the connectionString value to set + * @return the MigrateMySqlRequestInner object itself. + */ + public MigrateMySqlRequestInner withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/NetworkFeaturesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/NetworkFeaturesInner.java index 516d543a2406..e31f718742b0 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/NetworkFeaturesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/NetworkFeaturesInner.java @@ -38,6 +38,12 @@ public class NetworkFeaturesInner extends Resource { @JsonProperty(value = "properties.hybridConnections") private List hybridConnections; + /** + * The Hybrid Connection V2 (service bus) view. + */ + @JsonProperty(value = "properties.hybridConnectionsV2") + private List hybridConnectionsV2; + /** * Get the virtualNetworkName value. * @@ -98,4 +104,24 @@ public NetworkFeaturesInner withHybridConnections(List hybridConnectionsV2() { + return this.hybridConnectionsV2; + } + + /** + * Set the hybridConnectionsV2 value. + * + * @param hybridConnectionsV2 the hybridConnectionsV2 value to set + * @return the NetworkFeaturesInner object itself. + */ + public NetworkFeaturesInner withHybridConnectionsV2(List hybridConnectionsV2) { + this.hybridConnectionsV2 = hybridConnectionsV2; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/OperationInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/OperationInner.java new file mode 100644 index 000000000000..4dae406ece77 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/OperationInner.java @@ -0,0 +1,223 @@ +/** + * 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.website.implementation; + +import com.microsoft.azure.management.website.OperationStatus; +import java.util.List; +import com.microsoft.azure.management.website.ErrorEntity; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class that represents an operation. + */ +public class OperationInner { + /** + * Operation Id. + */ + private String id; + + /** + * Operation Name. + */ + private String name; + + /** + * The current status of the operation. Possible values include: + * 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'. + */ + @JsonProperty(required = true) + private OperationStatus status; + + /** + * Any errors associate with the operation. + */ + private List errors; + + /** + * Time when operation has started. + */ + private DateTime createdTime; + + /** + * Time when operation has been updated. + */ + private DateTime modifiedTime; + + /** + * Time when operation will expire. + */ + private DateTime expirationTime; + + /** + * Applicable only for stamp operation ids. + */ + private String geoMasterOperationId; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the OperationInner object itself. + */ + public OperationInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public OperationStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the OperationInner object itself. + */ + public OperationInner withStatus(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get the errors value. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set the errors value. + * + * @param errors the errors value to set + * @return the OperationInner object itself. + */ + public OperationInner withErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the createdTime value. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Set the createdTime value. + * + * @param createdTime the createdTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withCreatedTime(DateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get the modifiedTime value. + * + * @return the modifiedTime value + */ + public DateTime modifiedTime() { + return this.modifiedTime; + } + + /** + * Set the modifiedTime value. + * + * @param modifiedTime the modifiedTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withModifiedTime(DateTime modifiedTime) { + this.modifiedTime = modifiedTime; + return this; + } + + /** + * Get the expirationTime value. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set the expirationTime value. + * + * @param expirationTime the expirationTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withExpirationTime(DateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Get the geoMasterOperationId value. + * + * @return the geoMasterOperationId value + */ + public String geoMasterOperationId() { + return this.geoMasterOperationId; + } + + /** + * Set the geoMasterOperationId value. + * + * @param geoMasterOperationId the geoMasterOperationId value to set + * @return the OperationInner object itself. + */ + public OperationInner withGeoMasterOperationId(String geoMasterOperationId) { + this.geoMasterOperationId = geoMasterOperationId; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PerfMonResponseInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PerfMonResponseInner.java new file mode 100644 index 000000000000..a50dbac216fe --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PerfMonResponseInner.java @@ -0,0 +1,92 @@ +/** + * 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.website.implementation; + +import com.microsoft.azure.management.website.PerfMonSet; + +/** + * Represents the perf monitor api reponse. + */ +public class PerfMonResponseInner { + /** + * Gets or sets the response code. + */ + private String code; + + /** + * Gets or sets the message. + */ + private String message; + + /** + * Gets or sets the perf mon counters. + */ + private PerfMonSet data; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the data value. + * + * @return the data value + */ + public PerfMonSet data() { + return this.data; + } + + /** + * Set the data value. + * + * @param data the data value to set + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withData(PerfMonSet data) { + this.data = data; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PremierAddOnRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PremierAddOnRequestInner.java index 0ad27a961070..7f2c8cc87283 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PremierAddOnRequestInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PremierAddOnRequestInner.java @@ -13,7 +13,7 @@ import com.microsoft.azure.management.website.SkuDescription; /** - * The PremierAddOnRequestInner model. + * Request representing premier add-on. */ public class PremierAddOnRequestInner { /** diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java deleted file mode 100644 index 5d6c56a1e3d8..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java +++ /dev/null @@ -1,571 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Providers. - */ -public final class ProvidersInner { - /** The Retrofit service to perform REST calls. */ - private ProvidersService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of ProvidersInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ProvidersInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(ProvidersService.class); - this.client = client; - } - - /** - * The interface defining all the services for Providers to be - * used by Retrofit to perform actually REST calls. - */ - interface ProvidersService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("providers/Microsoft.Web/sourcecontrols") - Observable> getSourceControls(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("providers/Microsoft.Web/sourcecontrols/{sourceControlType}") - Observable> getSourceControl(@Path("sourceControlType") String sourceControlType, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("providers/Microsoft.Web/sourcecontrols/{sourceControlType}") - Observable> updateSourceControl(@Path("sourceControlType") String sourceControlType, @Body SourceControlInner requestMessage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("providers/Microsoft.Web/publishingUsers/web") - Observable> getPublishingUser(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("providers/Microsoft.Web/publishingUsers/web") - Observable> updatePublishingUser(@Body UserInner requestMessage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getSourceControlsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the source controls available for Azure websites. - * - * @return the PagedList<SourceControlInner> object if successful. - */ - public PagedList getSourceControls() { - ServiceResponse> response = getSourceControlsSinglePageAsync().toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets the source controls available for Azure websites. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getSourceControlsAsync(final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSourceControlsSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSourceControlsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the source controls available for Azure websites. - * - * @return the observable to the PagedList<SourceControlInner> object - */ - public Observable> getSourceControlsAsync() { - return getSourceControlsWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets the source controls available for Azure websites. - * - * @return the observable to the PagedList<SourceControlInner> object - */ - public Observable>> getSourceControlsWithServiceResponseAsync() { - return getSourceControlsSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSourceControlsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the source controls available for Azure websites. - * - * @return the PagedList<SourceControlInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSourceControlsSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSourceControls(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSourceControlsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getSourceControlsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets source control token. - * - * @param sourceControlType Type of source control - * @return the SourceControlInner object if successful. - */ - public SourceControlInner getSourceControl(String sourceControlType) { - return getSourceControlWithServiceResponseAsync(sourceControlType).toBlocking().single().getBody(); - } - - /** - * Gets source control token. - * - * @param sourceControlType Type of source control - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getSourceControlAsync(String sourceControlType, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSourceControlWithServiceResponseAsync(sourceControlType), serviceCallback); - } - - /** - * Gets source control token. - * - * @param sourceControlType Type of source control - * @return the observable to the SourceControlInner object - */ - public Observable getSourceControlAsync(String sourceControlType) { - return getSourceControlWithServiceResponseAsync(sourceControlType).map(new Func1, SourceControlInner>() { - @Override - public SourceControlInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets source control token. - * - * @param sourceControlType Type of source control - * @return the observable to the SourceControlInner object - */ - public Observable> getSourceControlWithServiceResponseAsync(String sourceControlType) { - if (sourceControlType == null) { - throw new IllegalArgumentException("Parameter sourceControlType 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.getSourceControl(sourceControlType, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSourceControlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates source control token. - * - * @param sourceControlType Type of source control - * @param requestMessage Source control token information - * @return the SourceControlInner object if successful. - */ - public SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { - return updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage).toBlocking().single().getBody(); - } - - /** - * Updates source control token. - * - * @param sourceControlType Type of source control - * @param requestMessage Source control token information - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall updateSourceControlAsync(String sourceControlType, SourceControlInner requestMessage, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage), serviceCallback); - } - - /** - * Updates source control token. - * - * @param sourceControlType Type of source control - * @param requestMessage Source control token information - * @return the observable to the SourceControlInner object - */ - public Observable updateSourceControlAsync(String sourceControlType, SourceControlInner requestMessage) { - return updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage).map(new Func1, SourceControlInner>() { - @Override - public SourceControlInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Updates source control token. - * - * @param sourceControlType Type of source control - * @param requestMessage Source control token information - * @return the observable to the SourceControlInner object - */ - public Observable> updateSourceControlWithServiceResponseAsync(String sourceControlType, SourceControlInner requestMessage) { - if (sourceControlType == null) { - throw new IllegalArgumentException("Parameter sourceControlType is required and cannot be null."); - } - if (requestMessage == null) { - throw new IllegalArgumentException("Parameter requestMessage is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(requestMessage); - return service.updateSourceControl(sourceControlType, requestMessage, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateSourceControlDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets publishing user. - * - * @return the UserInner object if successful. - */ - public UserInner getPublishingUser() { - return getPublishingUserWithServiceResponseAsync().toBlocking().single().getBody(); - } - - /** - * Gets publishing user. - * - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getPublishingUserAsync(final ServiceCallback serviceCallback) { - return ServiceCall.create(getPublishingUserWithServiceResponseAsync(), serviceCallback); - } - - /** - * Gets publishing user. - * - * @return the observable to the UserInner object - */ - public Observable getPublishingUserAsync() { - return getPublishingUserWithServiceResponseAsync().map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets publishing user. - * - * @return the observable to the UserInner object - */ - public Observable> getPublishingUserWithServiceResponseAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getPublishingUser(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getPublishingUserDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getPublishingUserDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates publishing user. - * - * @param requestMessage Details of publishing user - * @return the UserInner object if successful. - */ - public UserInner updatePublishingUser(UserInner requestMessage) { - return updatePublishingUserWithServiceResponseAsync(requestMessage).toBlocking().single().getBody(); - } - - /** - * Updates publishing user. - * - * @param requestMessage Details of publishing user - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall updatePublishingUserAsync(UserInner requestMessage, final ServiceCallback serviceCallback) { - return ServiceCall.create(updatePublishingUserWithServiceResponseAsync(requestMessage), serviceCallback); - } - - /** - * Updates publishing user. - * - * @param requestMessage Details of publishing user - * @return the observable to the UserInner object - */ - public Observable updatePublishingUserAsync(UserInner requestMessage) { - return updatePublishingUserWithServiceResponseAsync(requestMessage).map(new Func1, UserInner>() { - @Override - public UserInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Updates publishing user. - * - * @param requestMessage Details of publishing user - * @return the observable to the UserInner object - */ - public Observable> updatePublishingUserWithServiceResponseAsync(UserInner requestMessage) { - if (requestMessage == null) { - throw new IllegalArgumentException("Parameter requestMessage is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(requestMessage); - return service.updatePublishingUser(requestMessage, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updatePublishingUserDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updatePublishingUserDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the source controls available for Azure websites. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SourceControlInner> object if successful. - */ - public PagedList getSourceControlsNext(final String nextPageLink) { - ServiceResponse> response = getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets the source controls available for Azure websites. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getSourceControlsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSourceControlsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSourceControlsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the source controls available for Azure websites. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SourceControlInner> object - */ - public Observable> getSourceControlsNextAsync(final String nextPageLink) { - return getSourceControlsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets the source controls available for Azure websites. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SourceControlInner> object - */ - public Observable>> getSourceControlsNextWithServiceResponseAsync(final String nextPageLink) { - return getSourceControlsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSourceControlsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the source controls available for Azure websites. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SourceControlInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSourceControlsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getSourceControlsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSourceControlsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getSourceControlsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PushSettingsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PushSettingsInner.java new file mode 100644 index 000000000000..acb2e8e4be31 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/PushSettingsInner.java @@ -0,0 +1,119 @@ +/** + * 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.website.implementation; + + +/** + * Push settings for the Web App. + */ +public class PushSettingsInner { + /** + * Gets or sets a flag indicating whether the Push endpoint is enabled. + */ + private Boolean isPushEnabled; + + /** + * Gets or sets a JSON string containing a list of tags that are + * whitelisted for use by the push registration endpoint. + */ + private String tagWhitelistJson; + + /** + * Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. + */ + private String tagsRequiringAuth; + + /** + * Gets or sets a JSON string containing a list of dynamic tags that will + * be evaluated from user claims in the push registration endpoint. + */ + private String dynamicTagsJson; + + /** + * Get the isPushEnabled value. + * + * @return the isPushEnabled value + */ + public Boolean isPushEnabled() { + return this.isPushEnabled; + } + + /** + * Set the isPushEnabled value. + * + * @param isPushEnabled the isPushEnabled value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withIsPushEnabled(Boolean isPushEnabled) { + this.isPushEnabled = isPushEnabled; + return this; + } + + /** + * Get the tagWhitelistJson value. + * + * @return the tagWhitelistJson value + */ + public String tagWhitelistJson() { + return this.tagWhitelistJson; + } + + /** + * Set the tagWhitelistJson value. + * + * @param tagWhitelistJson the tagWhitelistJson value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagWhitelistJson(String tagWhitelistJson) { + this.tagWhitelistJson = tagWhitelistJson; + return this; + } + + /** + * Get the tagsRequiringAuth value. + * + * @return the tagsRequiringAuth value + */ + public String tagsRequiringAuth() { + return this.tagsRequiringAuth; + } + + /** + * Set the tagsRequiringAuth value. + * + * @param tagsRequiringAuth the tagsRequiringAuth value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagsRequiringAuth(String tagsRequiringAuth) { + this.tagsRequiringAuth = tagsRequiringAuth; + return this; + } + + /** + * Get the dynamicTagsJson value. + * + * @return the dynamicTagsJson value + */ + public String dynamicTagsJson() { + return this.dynamicTagsJson; + } + + /** + * Set the dynamicTagsJson value. + * + * @param dynamicTagsJson the dynamicTagsJson value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withDynamicTagsJson(String dynamicTagsJson) { + this.dynamicTagsJson = dynamicTagsJson; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java index bb11224023b8..b5aa7e009810 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java @@ -55,48 +55,51 @@ public RecommendationsInner(Retrofit retrofit, WebSiteManagementClientImpl clien interface RecommendationsService { @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") - Observable> getRecommendationBySubscription(@Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") - Observable> getRuleDetailsBySiteName(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") + Observable> listHistoryForWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("startTime") String startTime, @Query("endTime") String endTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") - Observable> getRecommendedRulesForSite(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("siteSku") String siteSku, @Query("numSlots") Integer numSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listRecommendedRulesForWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("webAppSku") String webAppSku, @Query("numSlots") Integer numSlots, @Query("liveHours") Integer liveHours, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") - Observable> getRecommendationHistoryForSite(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("startTime") String startTime, @Query("endTime") String endTime, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") + Observable> getRuleDetailsByWebApp(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("updateSeen") Boolean updateSeen, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @return the List<RecommendationInner> object if successful. */ - public List getRecommendationBySubscription() { - return getRecommendationBySubscriptionWithServiceResponseAsync().toBlocking().single().getBody(); + public List get() { + return getWithServiceResponseAsync().toBlocking().single().getBody(); } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendationBySubscriptionAsync(final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendationBySubscriptionWithServiceResponseAsync(), serviceCallback); + public ServiceCall> getAsync(final ServiceCallback> serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(), serviceCallback); } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @return the observable to the List<RecommendationInner> object */ - public Observable> getRecommendationBySubscriptionAsync() { - return getRecommendationBySubscriptionWithServiceResponseAsync().map(new Func1>, List>() { + public Observable> getAsync() { + return getWithServiceResponseAsync().map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.getBody(); @@ -105,25 +108,24 @@ public List call(ServiceResponse> } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @return the observable to the List<RecommendationInner> object */ - public Observable>> getRecommendationBySubscriptionWithServiceResponseAsync() { + public Observable>> getWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-03-01"; final Boolean featured = null; final String filter = null; - return service.getRecommendationBySubscription(this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.get(this.client.subscriptionId(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendationBySubscriptionDelegate(response); + ServiceResponse> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -133,17 +135,19 @@ public Observable>> call(Response getRecommendationBySubscription(Boolean featured, String filter) { - return getRecommendationBySubscriptionWithServiceResponseAsync(featured, filter).toBlocking().single().getBody(); + public List get(Boolean featured, String filter) { + return getWithServiceResponseAsync(featured, filter).toBlocking().single().getBody(); } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available @@ -151,19 +155,20 @@ public List getRecommendationBySubscription(Boolean feature * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendationBySubscriptionAsync(Boolean featured, String filter, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendationBySubscriptionWithServiceResponseAsync(featured, filter), serviceCallback); + public ServiceCall> getAsync(Boolean featured, String filter, final ServiceCallback> serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(featured, filter), serviceCallback); } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' * @return the observable to the List<RecommendationInner> object */ - public Observable> getRecommendationBySubscriptionAsync(Boolean featured, String filter) { - return getRecommendationBySubscriptionWithServiceResponseAsync(featured, filter).map(new Func1>, List>() { + public Observable> getAsync(Boolean featured, String filter) { + return getWithServiceResponseAsync(featured, filter).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.getBody(); @@ -172,25 +177,24 @@ public List call(ServiceResponse> } /** + * Gets a list of recommendations associated with the specified subscription. * Gets a list of recommendations associated with the specified subscription. * * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' * @return the observable to the List<RecommendationInner> object */ - public Observable>> getRecommendationBySubscriptionWithServiceResponseAsync(Boolean featured, String filter) { + public Observable>> getWithServiceResponseAsync(Boolean featured, String filter) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getRecommendationBySubscription(this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.get(this.client.subscriptionId(), featured, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendationBySubscriptionDelegate(response); + ServiceResponse> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -199,7 +203,7 @@ public Observable>> call(Response> getRecommendationBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -207,77 +211,157 @@ private ServiceResponse> getRecommendationBySubscripti } /** - * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. * * @param resourceGroupName Resource group name * @param siteName Site name - * @param name Recommendation rule name - * @return the RecommendationRuleInner object if successful. + * @return the List<RecommendationInner> object if successful. */ - public RecommendationRuleInner getRuleDetailsBySiteName(String resourceGroupName, String siteName, String name) { - return getRuleDetailsBySiteNameWithServiceResponseAsync(resourceGroupName, siteName, name).toBlocking().single().getBody(); + public List listHistoryForWebApp(String resourceGroupName, String siteName) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); } /** - * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. * * @param resourceGroupName Resource group name * @param siteName Site name - * @param name Recommendation rule name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getRuleDetailsBySiteNameAsync(String resourceGroupName, String siteName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getRuleDetailsBySiteNameWithServiceResponseAsync(resourceGroupName, siteName, name), serviceCallback); + public ServiceCall> listHistoryForWebAppAsync(String resourceGroupName, String siteName, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); } /** - * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. * * @param resourceGroupName Resource group name * @param siteName Site name - * @param name Recommendation rule name - * @return the observable to the RecommendationRuleInner object + * @return the observable to the List<RecommendationInner> object */ - public Observable getRuleDetailsBySiteNameAsync(String resourceGroupName, String siteName, String name) { - return getRuleDetailsBySiteNameWithServiceResponseAsync(resourceGroupName, siteName, name).map(new Func1, RecommendationRuleInner>() { + public Observable> listHistoryForWebAppAsync(String resourceGroupName, String siteName) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1>, List>() { @Override - public RecommendationRuleInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. * * @param resourceGroupName Resource group name * @param siteName Site name - * @param name Recommendation rule name - * @return the observable to the RecommendationRuleInner object + * @return the observable to the List<RecommendationInner> object */ - public Observable> getRuleDetailsBySiteNameWithServiceResponseAsync(String resourceGroupName, String siteName, String name) { + public Observable>> listHistoryForWebAppWithServiceResponseAsync(String resourceGroupName, String siteName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (siteName == null) { throw new IllegalArgumentException("Parameter siteName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + final String apiVersion = "2016-03-01"; + final String startTime = null; + final String endTime = null; + return service.listHistoryForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), startTime, endTime, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listHistoryForWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. + * + * @param resourceGroupName Resource group name + * @param siteName Site name + * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @return the List<RecommendationInner> object if successful. + */ + public List listHistoryForWebApp(String resourceGroupName, String siteName, String startTime, String endTime) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime).toBlocking().single().getBody(); + } + + /** + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. + * + * @param resourceGroupName Resource group name + * @param siteName Site name + * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listHistoryForWebAppAsync(String resourceGroupName, String siteName, String startTime, String endTime, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime), serviceCallback); + } + + /** + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. + * + * @param resourceGroupName Resource group name + * @param siteName Site name + * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @return the observable to the List<RecommendationInner> object + */ + public Observable> listHistoryForWebAppAsync(String resourceGroupName, String siteName, String startTime, String endTime) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the list of past recommendations optionally specified by the time range. + * Gets the list of past recommendations optionally specified by the time range. + * + * @param resourceGroupName Resource group name + * @param siteName Site name + * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @return the observable to the List<RecommendationInner> object + */ + public Observable>> listHistoryForWebAppWithServiceResponseAsync(String resourceGroupName, String siteName, String startTime, String endTime) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - return service.getRuleDetailsBySiteName(resourceGroupName, siteName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + if (siteName == null) { + throw new IllegalArgumentException("Parameter siteName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.listHistoryForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), startTime, endTime, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getRuleDetailsBySiteNameDelegate(response); + ServiceResponse> clientResponse = listHistoryForWebAppDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -286,25 +370,27 @@ public Observable> call(Response getRuleDetailsBySiteNameDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listHistoryForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @return the List<RecommendationInner> object if successful. */ - public List getRecommendedRulesForSite(String resourceGroupName, String siteName) { - return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); + public List listRecommendedRulesForWebApp(String resourceGroupName, String siteName) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name @@ -312,19 +398,20 @@ public List getRecommendedRulesForSite(String resourceGroup * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); + public ServiceCall> listRecommendedRulesForWebAppAsync(String resourceGroupName, String siteName, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @return the observable to the List<RecommendationInner> object */ - public Observable> getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName) { - return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1>, List>() { + public Observable> listRecommendedRulesForWebAppAsync(String resourceGroupName, String siteName) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.getBody(); @@ -333,13 +420,14 @@ public List call(ServiceResponse> } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @return the observable to the List<RecommendationInner> object */ - public Observable>> getRecommendedRulesForSiteWithServiceResponseAsync(String resourceGroupName, String siteName) { + public Observable>> listRecommendedRulesForWebAppWithServiceResponseAsync(String resourceGroupName, String siteName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -349,18 +437,17 @@ public Observable>> getRecommendedRule if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-03-01"; final Boolean featured = null; - final String siteSku = null; + final String webAppSku = null; final Integer numSlots = null; - return service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.subscriptionId(), featured, siteSku, numSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final Integer liveHours = null; + return service.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, webAppSku, numSlots, liveHours, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendedRulesForSiteDelegate(response); + ServiceResponse> clientResponse = listRecommendedRulesForWebAppDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -370,46 +457,52 @@ public Observable>> call(Response getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) { - return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName, featured, siteSku, numSlots).toBlocking().single().getBody(); + public List listRecommendedRulesForWebApp(String resourceGroupName, String siteName, Boolean featured, String webAppSku, Integer numSlots, Integer liveHours) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName, featured, webAppSku, numSlots, liveHours).toBlocking().single().getBody(); } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available - * @param siteSku The name of site SKU. + * @param webAppSku The name of web app SKU. * @param numSlots The number of site slots associated to the site + * @param liveHours If greater than zero, this API scans the last active live site symptoms, dynamically generate on-the-fly recommendations * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName, featured, siteSku, numSlots), serviceCallback); + public ServiceCall> listRecommendedRulesForWebAppAsync(String resourceGroupName, String siteName, Boolean featured, String webAppSku, Integer numSlots, Integer liveHours, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName, featured, webAppSku, numSlots, liveHours), serviceCallback); } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available - * @param siteSku The name of site SKU. + * @param webAppSku The name of web app SKU. * @param numSlots The number of site slots associated to the site + * @param liveHours If greater than zero, this API scans the last active live site symptoms, dynamically generate on-the-fly recommendations * @return the observable to the List<RecommendationInner> object */ - public Observable> getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) { - return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName, featured, siteSku, numSlots).map(new Func1>, List>() { + public Observable> listRecommendedRulesForWebAppAsync(String resourceGroupName, String siteName, Boolean featured, String webAppSku, Integer numSlots, Integer liveHours) { + return listRecommendedRulesForWebAppWithServiceResponseAsync(resourceGroupName, siteName, featured, webAppSku, numSlots, liveHours).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.getBody(); @@ -418,16 +511,18 @@ public List call(ServiceResponse> } /** + * Gets a list of recommendations associated with the specified web site. * Gets a list of recommendations associated with the specified web site. * * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available - * @param siteSku The name of site SKU. + * @param webAppSku The name of web app SKU. * @param numSlots The number of site slots associated to the site + * @param liveHours If greater than zero, this API scans the last active live site symptoms, dynamically generate on-the-fly recommendations * @return the observable to the List<RecommendationInner> object */ - public Observable>> getRecommendedRulesForSiteWithServiceResponseAsync(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) { + public Observable>> listRecommendedRulesForWebAppWithServiceResponseAsync(String resourceGroupName, String siteName, Boolean featured, String webAppSku, Integer numSlots, Integer liveHours) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -437,15 +532,13 @@ public Observable>> getRecommendedRule if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.subscriptionId(), featured, siteSku, numSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, webAppSku, numSlots, liveHours, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendedRulesForSiteDelegate(response); + ServiceResponse> clientResponse = listRecommendedRulesForWebAppDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -454,7 +547,7 @@ public Observable>> call(Response> getRecommendedRulesForSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listRecommendedRulesForWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -462,72 +555,80 @@ private ServiceResponse> getRecommendedRulesForSiteDel } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @return the List<RecommendationInner> object if successful. + * @param siteName Name of web app + * @param name Recommendation rule name + * @return the RecommendationRuleInner object if successful. */ - public List getRecommendationHistoryForSite(String resourceGroupName, String siteName) { - return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); + public RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name).toBlocking().single().getBody(); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name + * @param siteName Name of web app + * @param name Recommendation rule name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendationHistoryForSiteAsync(String resourceGroupName, String siteName, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName), serviceCallback); + public ServiceCall getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name), serviceCallback); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @return the observable to the List<RecommendationInner> object + * @param siteName Name of web app + * @param name Recommendation rule name + * @return the observable to the RecommendationRuleInner object */ - public Observable> getRecommendationHistoryForSiteAsync(String resourceGroupName, String siteName) { - return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1>, List>() { + public Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name).map(new Func1, RecommendationRuleInner>() { @Override - public List call(ServiceResponse> response) { + public RecommendationRuleInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @return the observable to the List<RecommendationInner> object + * @param siteName Name of web app + * @param name Recommendation rule name + * @return the observable to the RecommendationRuleInner object */ - public Observable>> getRecommendationHistoryForSiteWithServiceResponseAsync(String resourceGroupName, String siteName) { + public Observable> getRuleDetailsByWebAppWithServiceResponseAsync(String resourceGroupName, String siteName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (siteName == null) { throw new IllegalArgumentException("Parameter siteName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String startTime = null; - final String endTime = null; - return service.getRecommendationHistoryForSite(resourceGroupName, siteName, this.client.subscriptionId(), startTime, endTime, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-03-01"; + final Boolean updateSeen = null; + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendationHistoryForSiteDelegate(response); + ServiceResponse clientResponse = getRuleDetailsByWebAppDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -537,78 +638,83 @@ public Observable>> call(Response getRecommendationHistoryForSite(String resourceGroupName, String siteName, String startTime, String endTime) { - return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime).toBlocking().single().getBody(); + public RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name, Boolean updateSeen) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen).toBlocking().single().getBody(); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' - * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' + * @param siteName Name of web app + * @param name Recommendation rule name + * @param updateSeen If true, the backend updates the last seen timestamp of the recommendation object. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getRecommendationHistoryForSiteAsync(String resourceGroupName, String siteName, String startTime, String endTime, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime), serviceCallback); + public ServiceCall getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen, final ServiceCallback serviceCallback) { + return ServiceCall.create(getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen), serviceCallback); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' - * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' - * @return the observable to the List<RecommendationInner> object + * @param siteName Name of web app + * @param name Recommendation rule name + * @param updateSeen If true, the backend updates the last seen timestamp of the recommendation object. + * @return the observable to the RecommendationRuleInner object */ - public Observable> getRecommendationHistoryForSiteAsync(String resourceGroupName, String siteName, String startTime, String endTime) { - return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime).map(new Func1>, List>() { + public Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen) { + return getRuleDetailsByWebAppWithServiceResponseAsync(resourceGroupName, siteName, name, updateSeen).map(new Func1, RecommendationRuleInner>() { @Override - public List call(ServiceResponse> response) { + public RecommendationRuleInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the list of past recommendations optionally specified by the time range. + * Gets the detailed properties of the recommendation object for the specified web site. + * Gets the detailed properties of the recommendation object for the specified web site. * * @param resourceGroupName Resource group name - * @param siteName Site name - * @param startTime The start time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' - * @param endTime The end time of a time range to query, e.g. $filter=startTime eq '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z' - * @return the observable to the List<RecommendationInner> object + * @param siteName Name of web app + * @param name Recommendation rule name + * @param updateSeen If true, the backend updates the last seen timestamp of the recommendation object. + * @return the observable to the RecommendationRuleInner object */ - public Observable>> getRecommendationHistoryForSiteWithServiceResponseAsync(String resourceGroupName, String siteName, String startTime, String endTime) { + public Observable> getRuleDetailsByWebAppWithServiceResponseAsync(String resourceGroupName, String siteName, String name, Boolean updateSeen) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (siteName == null) { throw new IllegalArgumentException("Parameter siteName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getRecommendationHistoryForSite(resourceGroupName, siteName, this.client.subscriptionId(), startTime, endTime, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-03-01"; + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> clientResponse = getRecommendationHistoryForSiteDelegate(response); + ServiceResponse clientResponse = getRuleDetailsByWebAppDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -617,9 +723,9 @@ public Observable>> call(Response> getRecommendationHistoryForSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getRuleDetailsByWebAppDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecoverResponseInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecoverResponseInner.java new file mode 100644 index 000000000000..06fceaeeb820 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecoverResponseInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Response for a recover site request. + */ +@JsonFlatten +public class RecoverResponseInner extends Resource { + /** + * ID of the recovery operation. Can be used to check the status of the + * corresponding operation. + */ + @JsonProperty(value = "properties.operationId") + private String operationId; + + /** + * Get the operationId value. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Set the operationId value. + * + * @param operationId the operationId value to set + * @return the RecoverResponseInner object itself. + */ + public RecoverResponseInner withOperationId(String operationId) { + this.operationId = operationId; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ReissueCertificateOrderRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ReissueCertificateOrderRequestInner.java index 5b67fa6b50b0..2ee79bea65a7 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ReissueCertificateOrderRequestInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ReissueCertificateOrderRequestInner.java @@ -30,6 +30,19 @@ public class ReissueCertificateOrderRequestInner extends Resource { @JsonProperty(value = "properties.delayExistingRevokeInHours") private Integer delayExistingRevokeInHours; + /** + * Csr to be used for re-key operation. + */ + @JsonProperty(value = "properties.csr") + private String csr; + + /** + * Should we change the ASC type (from managed private key to external + * private key and vice versa). + */ + @JsonProperty(value = "properties.isPrivateKeyExternal") + private Boolean isPrivateKeyExternal; + /** * Get the keySize value. * @@ -70,4 +83,44 @@ public ReissueCertificateOrderRequestInner withDelayExistingRevokeInHours(Intege return this; } + /** + * Get the csr value. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr value. + * + * @param csr the csr value to set + * @return the ReissueCertificateOrderRequestInner object itself. + */ + public ReissueCertificateOrderRequestInner withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the isPrivateKeyExternal value. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set the isPrivateKeyExternal value. + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set + * @return the ReissueCertificateOrderRequestInner object itself. + */ + public ReissueCertificateOrderRequestInner withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RenewCertificateOrderRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RenewCertificateOrderRequestInner.java index 8d5e0f6040e4..120d1f29512c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RenewCertificateOrderRequestInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RenewCertificateOrderRequestInner.java @@ -23,6 +23,19 @@ public class RenewCertificateOrderRequestInner extends Resource { @JsonProperty(value = "properties.keySize") private Integer keySize; + /** + * Csr to be used for re-key operation. + */ + @JsonProperty(value = "properties.csr") + private String csr; + + /** + * Should we change the ASC type (from managed private key to external + * private key and vice versa). + */ + @JsonProperty(value = "properties.isPrivateKeyExternal") + private Boolean isPrivateKeyExternal; + /** * Get the keySize value. * @@ -43,4 +56,44 @@ public RenewCertificateOrderRequestInner withKeySize(Integer keySize) { return this; } + /** + * Get the csr value. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr value. + * + * @param csr the csr value to set + * @return the RenewCertificateOrderRequestInner object itself. + */ + public RenewCertificateOrderRequestInner withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the isPrivateKeyExternal value. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set the isPrivateKeyExternal value. + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set + * @return the RenewCertificateOrderRequestInner object itself. + */ + public RenewCertificateOrderRequestInner withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceMetricInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceMetricInner.java index eef0eecde1e4..07afe1dbe108 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceMetricInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceMetricInner.java @@ -12,7 +12,8 @@ import org.joda.time.DateTime; import java.util.List; import com.microsoft.azure.management.website.ResourceMetricValue; -import com.microsoft.azure.management.website.KeyValuePairStringString; +import com.microsoft.azure.management.website.ResourceMetricProperty; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Object representing a metric for any resource. @@ -21,42 +22,56 @@ public class ResourceMetricInner { /** * Name of metric. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private ResourceMetricName name; /** * Metric unit. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String unit; /** * Metric granularity. E.g PT1H, PT5M, P1D. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String timeGrain; /** * Metric start time. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private DateTime startTime; /** * Metric end time. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private DateTime endTime; /** * Metric resource Id. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private String resourceId; + /** + * Resource Id. + */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private String id; + /** * Metric values. */ + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) private List metricValues; /** * Properties. */ - private List properties; + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private List properties; /** * Get the name value. @@ -67,17 +82,6 @@ public ResourceMetricName name() { return this.name; } - /** - * Set the name value. - * - * @param name the name value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withName(ResourceMetricName name) { - this.name = name; - return this; - } - /** * Get the unit value. * @@ -87,17 +91,6 @@ public String unit() { return this.unit; } - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withUnit(String unit) { - this.unit = unit; - return this; - } - /** * Get the timeGrain value. * @@ -107,17 +100,6 @@ public String timeGrain() { return this.timeGrain; } - /** - * Set the timeGrain value. - * - * @param timeGrain the timeGrain value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withTimeGrain(String timeGrain) { - this.timeGrain = timeGrain; - return this; - } - /** * Get the startTime value. * @@ -127,17 +109,6 @@ public DateTime startTime() { return this.startTime; } - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - /** * Get the endTime value. * @@ -147,17 +118,6 @@ public DateTime endTime() { return this.endTime; } - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - /** * Get the resourceId value. * @@ -168,14 +128,12 @@ public String resourceId() { } /** - * Set the resourceId value. + * Get the id value. * - * @param resourceId the resourceId value to set - * @return the ResourceMetricInner object itself. + * @return the id value */ - public ResourceMetricInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; + public String id() { + return this.id; } /** @@ -187,35 +145,13 @@ public List metricValues() { return this.metricValues; } - /** - * Set the metricValues value. - * - * @param metricValues the metricValues value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withMetricValues(List metricValues) { - this.metricValues = metricValues; - return this; - } - /** * Get the properties value. * * @return the properties value */ - public List properties() { + public List properties() { return this.properties; } - /** - * Set the properties value. - * - * @param properties the properties value to set - * @return the ResourceMetricInner object itself. - */ - public ResourceMetricInner withProperties(List properties) { - this.properties = properties; - return this; - } - } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceNameAvailabilityRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceNameAvailabilityRequestInner.java index b61d94f4176c..5ad5fa8ebd4b 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceNameAvailabilityRequestInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ResourceNameAvailabilityRequestInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.website.implementation; +import com.microsoft.azure.management.website.CheckNameResourceTypes; /** * Resource name availability request content. @@ -19,9 +20,10 @@ public class ResourceNameAvailabilityRequestInner { private String name; /** - * Resource type used for verification. + * Resource type used for verification. Possible values include: 'Site', + * 'Slot', 'HostingEnvironment'. */ - private String type; + private CheckNameResourceTypes type; /** * Is fully qualified domain name. @@ -53,7 +55,7 @@ public ResourceNameAvailabilityRequestInner withName(String name) { * * @return the type value */ - public String type() { + public CheckNameResourceTypes type() { return this.type; } @@ -63,7 +65,7 @@ public String type() { * @param type the type value to set * @return the ResourceNameAvailabilityRequestInner object itself. */ - public ResourceNameAvailabilityRequestInner withType(String type) { + public ResourceNameAvailabilityRequestInner withType(CheckNameResourceTypes type) { this.type = type; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java deleted file mode 100644 index cb07a84e5ada..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java +++ /dev/null @@ -1,2942 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceCall; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ServerFarms. - */ -public final class ServerFarmsInner { - /** The Retrofit service to perform REST calls. */ - private ServerFarmsService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of ServerFarmsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ServerFarmsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(ServerFarmsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ServerFarms to be - * used by Retrofit to perform actually REST calls. - */ - interface ServerFarmsService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") - Observable> getServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") - Observable> getServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") - Observable> createOrUpdateServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ServerFarmWithRichSkuInner serverFarmEnvelope, @Query("allowPendingState") Boolean allowPendingState, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") - Observable> beginCreateOrUpdateServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ServerFarmWithRichSkuInner serverFarmEnvelope, @Query("allowPendingState") Boolean allowPendingState, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}", method = "DELETE", hasBody = true) - Observable> deleteServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics") - Observable> getServerFarmMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions") - Observable> getServerFarmMetricDefintions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") - Observable> getVnetsForServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") - Observable> getVnetFromServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") - Observable> getRoutesForVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") - Observable> getRouteForVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") - Observable> createOrUpdateVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body VnetRouteInner route, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}", method = "DELETE", hasBody = true) - Observable> deleteVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") - Observable> updateVnetRoute(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("routeName") String routeName, @Path("subscriptionId") String subscriptionId, @Body VnetRouteInner route, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> getServerFarmVnetGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> updateServerFarmVnetGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") - Observable> getServerFarmSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$skipToken") String skipToken, @Query("$filter") String filter, @Query("$top") String top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") - Observable> rebootWorkerForServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerName") String workerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") - Observable> restartSitesForServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/operationresults/{operationId}") - Observable> getServerFarmOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getServerFarmsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getServerFarmMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getServerFarmMetricDefintionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET("{nextLink}") - Observable> getServerFarmSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param resourceGroupName Name of resource group - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getServerFarms(final String resourceGroupName) { - ServiceResponse> response = getServerFarmsSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param resourceGroupName Name of resource group - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmsAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmsSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getServerFarmsAsync(final String resourceGroupName) { - return getServerFarmsWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getServerFarmsWithServiceResponseAsync(final String resourceGroupName) { - return getServerFarmsSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - ServiceResponse> * @param resourceGroupName Name of resource group - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmsSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarms(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets specified App Service Plan in a resource group. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner getServerFarm(String resourceGroupName, String name) { - return getServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Gets specified App Service Plan in a resource group. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getServerFarmAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getServerFarmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Gets specified App Service Plan in a resource group. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable getServerFarmAsync(String resourceGroupName, String name) { - return getServerFarmWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets specified App Service Plan in a resource group. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable> getServerFarmWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarm(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).toBlocking().last().getBody(); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope), serviceCallback); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the observable for the request - */ - public Observable createOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the observable for the request - */ - public Observable> createOrUpdateServerFarmWithServiceResponseAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (serverFarmEnvelope == null) { - throw new IllegalArgumentException("Parameter serverFarmEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(serverFarmEnvelope); - final Boolean allowPendingState = null; - Observable> observable = service.createOrUpdateServerFarm(resourceGroupName, name, this.client.subscriptionId(), serverFarmEnvelope, allowPendingState, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState).toBlocking().last().getBody(); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState), serviceCallback); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the observable for the request - */ - public Observable createOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the observable for the request - */ - public Observable> createOrUpdateServerFarmWithServiceResponseAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (serverFarmEnvelope == null) { - throw new IllegalArgumentException("Parameter serverFarmEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(serverFarmEnvelope); - Observable> observable = service.createOrUpdateServerFarm(resourceGroupName, name, this.client.subscriptionId(), serverFarmEnvelope, allowPendingState, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner beginCreateOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - return beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).toBlocking().single().getBody(); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall beginCreateOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope), serviceCallback); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable beginCreateOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - return beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable> beginCreateOrUpdateServerFarmWithServiceResponseAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (serverFarmEnvelope == null) { - throw new IllegalArgumentException("Parameter serverFarmEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(serverFarmEnvelope); - final Boolean allowPendingState = null; - return service.beginCreateOrUpdateServerFarm(resourceGroupName, name, this.client.subscriptionId(), serverFarmEnvelope, allowPendingState, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner beginCreateOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - return beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState).toBlocking().single().getBody(); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall beginCreateOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState), serviceCallback); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable beginCreateOrUpdateServerFarmAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - return beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates or updates an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serverFarmEnvelope Details of App Service Plan - * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable> beginCreateOrUpdateServerFarmWithServiceResponseAsync(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (serverFarmEnvelope == null) { - throw new IllegalArgumentException("Parameter serverFarmEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(serverFarmEnvelope); - return service.beginCreateOrUpdateServerFarm(resourceGroupName, name, this.client.subscriptionId(), serverFarmEnvelope, allowPendingState, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes a App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the Object object if successful. - */ - public Object deleteServerFarm(String resourceGroupName, String name) { - return deleteServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Deletes a App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall deleteServerFarmAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteServerFarmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Deletes a App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the Object object - */ - public Observable deleteServerFarmAsync(String resourceGroupName, String name) { - return deleteServerFarmWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Deletes a App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the Object object - */ - public Observable> deleteServerFarmWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteServerFarm(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the PagedList<ResourceMetricInner> object if successful. - */ - public PagedList getServerFarmMetrics(final String resourceGroupName, final String name) { - ServiceResponse> response = getServerFarmMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmMetricsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable> getServerFarmMetricsAsync(final String resourceGroupName, final String name) { - return getServerFarmMetricsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable>> getServerFarmMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getServerFarmMetricsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmMetricsSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getServerFarmMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param details If true, metrics are broken down per App Service Plan instance - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object if successful. - */ - public PagedList getServerFarmMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { - ServiceResponse> response = getServerFarmMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param details If true, metrics are broken down per App Service Plan instance - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmMetricsSinglePageAsync(resourceGroupName, name, details, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param details If true, metrics are broken down per App Service Plan instance - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable> getServerFarmMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getServerFarmMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param details If true, metrics are broken down per App Service Plan instance - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable>> getServerFarmMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getServerFarmMetricsSinglePageAsync(resourceGroupName, name, details, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of App Service Plan - ServiceResponse> * @param details If true, metrics are broken down per App Service Plan instance - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarmMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the PagedList<MetricDefinitionInner> object if successful. - */ - public PagedList getServerFarmMetricDefintions(final String resourceGroupName, final String name) { - ServiceResponse> response = getServerFarmMetricDefintionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmMetricDefintionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmMetricDefintionsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<MetricDefinitionInner> object - */ - public Observable> getServerFarmMetricDefintionsAsync(final String resourceGroupName, final String name) { - return getServerFarmMetricDefintionsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<MetricDefinitionInner> object - */ - public Observable>> getServerFarmMetricDefintionsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getServerFarmMetricDefintionsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of App Service Plan - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmMetricDefintionsSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarmMetricDefintions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmMetricDefintionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmMetricDefintionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets list of vnets associated with App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the List<VnetInfoInner> object if successful. - */ - public List getVnetsForServerFarm(String resourceGroupName, String name) { - return getVnetsForServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Gets list of vnets associated with App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getVnetsForServerFarmAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getVnetsForServerFarmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Gets list of vnets associated with App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the List<VnetInfoInner> object - */ - public Observable> getVnetsForServerFarmAsync(String resourceGroupName, String name) { - return getVnetsForServerFarmWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of vnets associated with App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the List<VnetInfoInner> object - */ - public Observable>> getVnetsForServerFarmWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getVnetsForServerFarm(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = getVnetsForServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getVnetsForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a vnet associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the VnetInfoInner object if successful. - */ - public VnetInfoInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { - return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); - } - - /** - * Gets a vnet associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); - } - - /** - * Gets a vnet associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the observable to the VnetInfoInner object - */ - public Observable getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName) { - return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, VnetInfoInner>() { - @Override - public VnetInfoInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets a vnet associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the observable to the VnetInfoInner object - */ - public Observable> getVnetFromServerFarmWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getVnetFromServerFarm(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getVnetFromServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getVnetFromServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a list of all routes associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the List<VnetRouteInner> object if successful. - */ - public List getRoutesForVnet(String resourceGroupName, String name, String vnetName) { - return getRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); - } - - /** - * Gets a list of all routes associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getRoutesForVnetAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); - } - - /** - * Gets a list of all routes associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the observable to the List<VnetRouteInner> object - */ - public Observable> getRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { - return getRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets a list of all routes associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @return the observable to the List<VnetRouteInner> object - */ - public Observable>> getRoutesForVnetWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getRoutesForVnet(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = getRoutesForVnetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getRoutesForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a specific route associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the List<VnetRouteInner> object if successful. - */ - public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) { - return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); - } - - /** - * Gets a specific route associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); - } - - /** - * Gets a specific route associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the observable to the List<VnetRouteInner> object - */ - public Observable> getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName) { - return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets a specific route associated with a vnet, in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the observable to the List<VnetRouteInner> object - */ - public Observable>> getRouteForVnetWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (routeName == null) { - throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getRouteForVnet(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> clientResponse = getRouteForVnetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getRouteForVnetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the VnetRouteInner object if successful. - */ - public VnetRouteInner createOrUpdateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - return createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).toBlocking().single().getBody(); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall createOrUpdateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the observable to the VnetRouteInner object - */ - public Observable createOrUpdateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - return createOrUpdateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).map(new Func1, VnetRouteInner>() { - @Override - public VnetRouteInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the observable to the VnetRouteInner object - */ - public Observable> createOrUpdateVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (routeName == null) { - throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (route == null) { - throw new IllegalArgumentException("Parameter route is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(route); - return service.createOrUpdateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateVnetRouteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the Object object if successful. - */ - public Object deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { - return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); - } - - /** - * Deletes an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName), serviceCallback); - } - - /** - * Deletes an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the observable to the Object object - */ - public Observable deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName) { - return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Deletes an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @return the observable to the Object object - */ - public Observable> deleteVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (routeName == null) { - throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteVnetRouteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the VnetRouteInner object if successful. - */ - public VnetRouteInner updateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).toBlocking().single().getBody(); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), serviceCallback); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the observable to the VnetRouteInner object - */ - public Observable updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).map(new Func1, VnetRouteInner>() { - @Override - public VnetRouteInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Creates a new route or updates an existing route for a vnet in an app service plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param vnetName Name of virtual network - * @param routeName Name of the virtual network route - * @param route The route object - * @return the observable to the VnetRouteInner object - */ - public Observable> updateVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (routeName == null) { - throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (route == null) { - throw new IllegalArgumentException("Parameter route is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(route); - return service.updateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateVnetRouteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateVnetRouteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(400, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the vnet gateway. - * - * @param resourceGroupName Name of resource group - * @param name Name of the App Service Plan - * @param vnetName Name of the virtual network - * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. - * @return the VnetGatewayInner object if successful. - */ - public VnetGatewayInner getServerFarmVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { - return getServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().getBody(); - } - - /** - * Gets the vnet gateway. - * - * @param resourceGroupName Name of resource group - * @param name Name of the App Service Plan - * @param vnetName Name of the virtual network - * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getServerFarmVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); - } - - /** - * Gets the vnet gateway. - * - * @param resourceGroupName Name of resource group - * @param name Name of the App Service Plan - * @param vnetName Name of the virtual network - * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. - * @return the observable to the VnetGatewayInner object - */ - public Observable getServerFarmVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { - return getServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1, VnetGatewayInner>() { - @Override - public VnetGatewayInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets the vnet gateway. - * - * @param resourceGroupName Name of resource group - * @param name Name of the App Service Plan - * @param vnetName Name of the virtual network - * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. - * @return the observable to the VnetGatewayInner object - */ - public Observable> getServerFarmVnetGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarmVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getServerFarmVnetGatewayDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getServerFarmVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the vnet gateway. - * - * @param resourceGroupName The resource group - * @param name The name of the App Service Plan - * @param vnetName The name of the virtual network - * @param gatewayName The name of the gateway. Only 'primary' is supported. - * @param connectionEnvelope The gateway entity. - * @return the VnetGatewayInner object if successful. - */ - public VnetGatewayInner updateServerFarmVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return updateServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); - } - - /** - * Updates the vnet gateway. - * - * @param resourceGroupName The resource group - * @param name The name of the App Service Plan - * @param vnetName The name of the virtual network - * @param gatewayName The name of the gateway. Only 'primary' is supported. - * @param connectionEnvelope The gateway entity. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall updateServerFarmVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); - } - - /** - * Updates the vnet gateway. - * - * @param resourceGroupName The resource group - * @param name The name of the App Service Plan - * @param vnetName The name of the virtual network - * @param gatewayName The name of the gateway. Only 'primary' is supported. - * @param connectionEnvelope The gateway entity. - * @return the observable to the VnetGatewayInner object - */ - public Observable updateServerFarmVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return updateServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { - @Override - public VnetGatewayInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Updates the vnet gateway. - * - * @param resourceGroupName The resource group - * @param name The name of the App Service Plan - * @param vnetName The name of the virtual network - * @param gatewayName The name of the gateway. Only 'primary' is supported. - * @param connectionEnvelope The gateway entity. - * @return the observable to the VnetGatewayInner object - */ - public Observable> updateServerFarmVnetGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.updateServerFarmVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateServerFarmVnetGatewayDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateServerFarmVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getServerFarmSites(final String resourceGroupName, final String name) { - ServiceResponse> response = getServerFarmSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmSitesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmSitesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getServerFarmSitesAsync(final String resourceGroupName, final String name) { - return getServerFarmSitesWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getServerFarmSitesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getServerFarmSitesSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmSitesSinglePageAsync(final String resourceGroupName, final String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String skipToken = null; - final String filter = null; - final String top = null; - return service.getServerFarmSites(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list - * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running - * @param top List page size. If specified, results are paged. - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getServerFarmSites(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { - ServiceResponse> response = getServerFarmSitesSinglePageAsync(resourceGroupName, name, skipToken, filter, top).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list - * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running - * @param top List page size. If specified, results are paged. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmSitesAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmSitesSinglePageAsync(resourceGroupName, name, skipToken, filter, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list - * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running - * @param top List page size. If specified, results are paged. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getServerFarmSitesAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { - return getServerFarmSitesWithServiceResponseAsync(resourceGroupName, name, skipToken, filter, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list - * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running - * @param top List page size. If specified, results are paged. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getServerFarmSitesWithServiceResponseAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { - return getServerFarmSitesSinglePageAsync(resourceGroupName, name, skipToken, filter, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of App Service Plan - ServiceResponse> * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list - ServiceResponse> * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running - ServiceResponse> * @param top List page size. If specified, results are paged. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmSitesSinglePageAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarmSites(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Submit a reboot request for a worker machine in the specified server farm. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param workerName Name of worker machine, typically starts with RD - * @return the Object object if successful. - */ - public Object rebootWorkerForServerFarm(String resourceGroupName, String name, String workerName) { - return rebootWorkerForServerFarmWithServiceResponseAsync(resourceGroupName, name, workerName).toBlocking().single().getBody(); - } - - /** - * Submit a reboot request for a worker machine in the specified server farm. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param workerName Name of worker machine, typically starts with RD - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall rebootWorkerForServerFarmAsync(String resourceGroupName, String name, String workerName, final ServiceCallback serviceCallback) { - return ServiceCall.create(rebootWorkerForServerFarmWithServiceResponseAsync(resourceGroupName, name, workerName), serviceCallback); - } - - /** - * Submit a reboot request for a worker machine in the specified server farm. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param workerName Name of worker machine, typically starts with RD - * @return the observable to the Object object - */ - public Observable rebootWorkerForServerFarmAsync(String resourceGroupName, String name, String workerName) { - return rebootWorkerForServerFarmWithServiceResponseAsync(resourceGroupName, name, workerName).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Submit a reboot request for a worker machine in the specified server farm. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param workerName Name of worker machine, typically starts with RD - * @return the observable to the Object object - */ - public Observable> rebootWorkerForServerFarmWithServiceResponseAsync(String resourceGroupName, String name, String workerName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (workerName == null) { - throw new IllegalArgumentException("Parameter workerName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.rebootWorkerForServerFarm(resourceGroupName, name, workerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = rebootWorkerForServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse rebootWorkerForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the Object object if successful. - */ - public Object restartSitesForServerFarm(String resourceGroupName, String name) { - return restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall restartSitesForServerFarmAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name), serviceCallback); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the Object object - */ - public Observable restartSitesForServerFarmAsync(String resourceGroupName, String name) { - return restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @return the observable to the Object object - */ - public Observable> restartSitesForServerFarmWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean softRestart = null; - return service.restartSitesForServerFarm(resourceGroupName, name, this.client.subscriptionId(), softRestart, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = restartSitesForServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps - * @return the Object object if successful. - */ - public Object restartSitesForServerFarm(String resourceGroupName, String name, Boolean softRestart) { - return restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name, softRestart).toBlocking().single().getBody(); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall restartSitesForServerFarmAsync(String resourceGroupName, String name, Boolean softRestart, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name, softRestart), serviceCallback); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps - * @return the observable to the Object object - */ - public Observable restartSitesForServerFarmAsync(String resourceGroupName, String name, Boolean softRestart) { - return restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name, softRestart).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Restarts web apps in a specified App Service Plan. - * - * @param resourceGroupName Name of resource group - * @param name Name of App Service Plan - * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps - * @return the observable to the Object object - */ - public Observable> restartSitesForServerFarmWithServiceResponseAsync(String resourceGroupName, String name, Boolean softRestart) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.restartSitesForServerFarm(resourceGroupName, name, this.client.subscriptionId(), softRestart, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = restartSitesForServerFarmDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse restartSitesForServerFarmDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a server farm operation. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param operationId Id of Server farm operation"&gt; - * @return the ServerFarmWithRichSkuInner object if successful. - */ - public ServerFarmWithRichSkuInner getServerFarmOperation(String resourceGroupName, String name, String operationId) { - return getServerFarmOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); - } - - /** - * Gets a server farm operation. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param operationId Id of Server farm operation"&gt; - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getServerFarmOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getServerFarmOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); - } - - /** - * Gets a server farm operation. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param operationId Id of Server farm operation"&gt; - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable getServerFarmOperationAsync(String resourceGroupName, String name, String operationId) { - return getServerFarmOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, ServerFarmWithRichSkuInner>() { - @Override - public ServerFarmWithRichSkuInner call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Gets a server farm operation. - * - * @param resourceGroupName Name of resource group - * @param name Name of server farm - * @param operationId Id of Server farm operation"&gt; - * @return the observable to the ServerFarmWithRichSkuInner object - */ - public Observable> getServerFarmOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getServerFarmOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getServerFarmOperationDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getServerFarmOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. - */ - public PagedList getServerFarmsNext(final String nextPageLink) { - ServiceResponse> response = getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable> getServerFarmsNextAsync(final String nextPageLink) { - return getServerFarmsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ServerFarmWithRichSkuInner> object - */ - public Observable>> getServerFarmsNextWithServiceResponseAsync(final String nextPageLink) { - return getServerFarmsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets collection of App Service Plans in a resource group for a given subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ServerFarmWithRichSkuInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getServerFarmsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. - */ - public PagedList getServerFarmMetricsNext(final String nextPageLink) { - ServiceResponse> response = getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Queries for App Serice Plan metrics. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable> getServerFarmMetricsNextAsync(final String nextPageLink) { - return getServerFarmMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable>> getServerFarmMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getServerFarmMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Queries for App Serice Plan metrics. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmMetricsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getServerFarmMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object if successful. - */ - public PagedList getServerFarmMetricDefintionsNext(final String nextPageLink) { - ServiceResponse> response = getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmMetricDefintionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object - */ - public Observable> getServerFarmMetricDefintionsNextAsync(final String nextPageLink) { - return getServerFarmMetricDefintionsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object - */ - public Observable>> getServerFarmMetricDefintionsNextWithServiceResponseAsync(final String nextPageLink) { - return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmMetricDefintionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List of metrics that can be queried for an App Service Plan. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmMetricDefintionsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getServerFarmMetricDefintionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmMetricDefintionsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmMetricDefintionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. - */ - public PagedList getServerFarmSitesNext(final String nextPageLink) { - ServiceResponse> response = getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall> getServerFarmSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getServerFarmSitesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getServerFarmSitesNextAsync(final String nextPageLink) { - return getServerFarmSitesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getServerFarmSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getServerFarmSitesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getServerFarmSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets list of Apps associated with an App Service Plan. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getServerFarmSitesNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - return service.getServerFarmSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getServerFarmSitesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getServerFarmSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteConfigInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteConfigInner.java index 2700818b9439..b084231ace04 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteConfigInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteConfigInner.java @@ -10,8 +10,7 @@ import java.util.List; import org.joda.time.DateTime; -import com.microsoft.azure.management.website.NameValuePair; -import com.microsoft.azure.management.website.ConnStringInfo; +import com.microsoft.azure.management.website.SiteMachineKey; import com.microsoft.azure.management.website.HandlerMapping; import com.microsoft.azure.management.website.ManagedPipelineMode; import com.microsoft.azure.management.website.VirtualApplication; @@ -61,6 +60,12 @@ public class SiteConfigInner extends Resource { @JsonProperty(value = "properties.pythonVersion") private String pythonVersion; + /** + * Version of Node. + */ + @JsonProperty(value = "properties.nodeVersion") + private String nodeVersion; + /** * Enable request tracing. */ @@ -110,28 +115,10 @@ public class SiteConfigInner extends Resource { private String publishingUsername; /** - * Publishing password. - */ - @JsonProperty(value = "properties.publishingPassword") - private String publishingPassword; - - /** - * Application Settings. - */ - @JsonProperty(value = "properties.appSettings") - private List appSettings; - - /** - * Site Metadata. - */ - @JsonProperty(value = "properties.metadata") - private List metadata; - - /** - * Connection strings. + * Site MachineKey. */ - @JsonProperty(value = "properties.connectionStrings") - private List connectionStrings; + @JsonProperty(value = "properties.machineKey") + private SiteMachineKey machineKey; /** * Handler mappings. @@ -187,6 +174,12 @@ public class SiteConfigInner extends Resource { @JsonProperty(value = "properties.javaContainerVersion") private String javaContainerVersion; + /** + * App Command Line to launch. + */ + @JsonProperty(value = "properties.appCommandLine") + private String appCommandLine; + /** * Managed pipeline mode. Possible values include: 'Integrated', 'Classic'. */ @@ -249,6 +242,12 @@ public class SiteConfigInner extends Resource { @JsonProperty(value = "properties.cors") private CorsSettings cors; + /** + * Push endpoint settings. + */ + @JsonProperty(value = "properties.push") + private PushSettingsInner push; + /** * Information about the formal API definition for the web app. */ @@ -373,6 +372,26 @@ public SiteConfigInner withPythonVersion(String pythonVersion) { return this; } + /** + * Get the nodeVersion value. + * + * @return the nodeVersion value + */ + public String nodeVersion() { + return this.nodeVersion; + } + + /** + * Set the nodeVersion value. + * + * @param nodeVersion the nodeVersion value to set + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + /** * Get the requestTracingEnabled value. * @@ -534,82 +553,22 @@ public SiteConfigInner withPublishingUsername(String publishingUsername) { } /** - * Get the publishingPassword value. - * - * @return the publishingPassword value - */ - public String publishingPassword() { - return this.publishingPassword; - } - - /** - * Set the publishingPassword value. - * - * @param publishingPassword the publishingPassword value to set - * @return the SiteConfigInner object itself. - */ - public SiteConfigInner withPublishingPassword(String publishingPassword) { - this.publishingPassword = publishingPassword; - return this; - } - - /** - * Get the appSettings value. - * - * @return the appSettings value - */ - public List appSettings() { - return this.appSettings; - } - - /** - * Set the appSettings value. - * - * @param appSettings the appSettings value to set - * @return the SiteConfigInner object itself. - */ - public SiteConfigInner withAppSettings(List appSettings) { - this.appSettings = appSettings; - return this; - } - - /** - * Get the metadata value. + * Get the machineKey value. * - * @return the metadata value + * @return the machineKey value */ - public List metadata() { - return this.metadata; + public SiteMachineKey machineKey() { + return this.machineKey; } /** - * Set the metadata value. + * Set the machineKey value. * - * @param metadata the metadata value to set + * @param machineKey the machineKey value to set * @return the SiteConfigInner object itself. */ - public SiteConfigInner withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the connectionStrings value. - * - * @return the connectionStrings value - */ - public List connectionStrings() { - return this.connectionStrings; - } - - /** - * Set the connectionStrings value. - * - * @param connectionStrings the connectionStrings value to set - * @return the SiteConfigInner object itself. - */ - public SiteConfigInner withConnectionStrings(List connectionStrings) { - this.connectionStrings = connectionStrings; + public SiteConfigInner withMachineKey(SiteMachineKey machineKey) { + this.machineKey = machineKey; return this; } @@ -793,6 +752,26 @@ public SiteConfigInner withJavaContainerVersion(String javaContainerVersion) { return this; } + /** + * Get the appCommandLine value. + * + * @return the appCommandLine value + */ + public String appCommandLine() { + return this.appCommandLine; + } + + /** + * Set the appCommandLine value. + * + * @param appCommandLine the appCommandLine value to set + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + /** * Get the managedPipelineMode value. * @@ -993,6 +972,26 @@ public SiteConfigInner withCors(CorsSettings cors) { return this; } + /** + * Get the push value. + * + * @return the push value + */ + public PushSettingsInner push() { + return this.push; + } + + /** + * Set the push value. + * + * @param push the push value to set + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPush(PushSettingsInner push) { + this.push = push; + return this; + } + /** * Get the apiDefinition value. * diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteInner.java index e9f88ebafc6d..91d7ae00e410 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteInner.java @@ -24,35 +24,29 @@ */ @JsonFlatten public class SiteInner extends Resource { - /** - * Name of web app. - */ - @JsonProperty(value = "properties.name") - private String siteName; - /** * State of the web app. */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.state") private String state; /** * Hostnames associated with web app. */ - @JsonProperty(value = "properties.hostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.hostNames") private List hostNames; /** * Name of repository site. */ - @JsonProperty(value = "properties.repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.repositorySiteName") private String repositorySiteName; /** - * PendingOperation indicating whether web app has exceeded its quota usage. Possible + * State indicating whether web app has exceeded its quota usage. Possible * values include: 'Normal', 'Exceeded'. */ - @JsonProperty(value = "properties.usageState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.usageState") private UsageState usageState; /** @@ -67,7 +61,7 @@ public class SiteInner extends Resource { * assigned and enabled. If some hostnames are assigned but not enabled * the app is not served on those hostnames. */ - @JsonProperty(value = "properties.enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.enabledHostNames") private List enabledHostNames; /** @@ -80,7 +74,7 @@ public class SiteInner extends Resource { * unavailable. Possible values include: 'Normal', 'Limited', * 'DisasterRecoveryMode'. */ - @JsonProperty(value = "properties.availabilityState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.availabilityState") private SiteAvailabilityState availabilityState; /** @@ -96,10 +90,16 @@ public class SiteInner extends Resource { @JsonProperty(value = "properties.serverFarmId") private String serverFarmId; + /** + * Reserved. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + /** * Last time web app was modified in UTC. */ - @JsonProperty(value = "properties.lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.lastModifiedTimeUtc") private DateTime lastModifiedTimeUtc; /** @@ -112,13 +112,13 @@ public class SiteInner extends Resource { * Read-only list of Azure Traffic manager hostnames associated with web * app. */ - @JsonProperty(value = "properties.trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.trafficManagerHostNames") private List trafficManagerHostNames; /** * If set indicates whether web app is deployed as a premium app. */ - @JsonProperty(value = "properties.premiumAppDeployed", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.premiumAppDeployed") private Boolean premiumAppDeployed; /** @@ -131,7 +131,7 @@ public class SiteInner extends Resource { /** * Read-only property that specifies which slot this app will swap into. */ - @JsonProperty(value = "properties.targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.targetSwapSlot") private String targetSwapSlot; /** @@ -142,7 +142,7 @@ public class SiteInner extends Resource { private HostingEnvironmentProfile hostingEnvironmentProfile; /** - * The microService property. + * Micro services like WebSites, Logic Apps. */ @JsonProperty(value = "properties.microService") private String microService; @@ -179,7 +179,7 @@ public class SiteInner extends Resource { * outbound connections. Those can be used when configuring firewall * rules for databases accessed by this web app. */ - @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.outboundIpAddresses") private String outboundIpAddresses; /** @@ -188,6 +188,19 @@ public class SiteInner extends Resource { @JsonProperty(value = "properties.containerSize") private Integer containerSize; + /** + * Maximum allowed daily memory-time quota (applicable on dynamic sites + * only). + */ + @JsonProperty(value = "properties.dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /** + * Site suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "properties.suspendedTill") + private DateTime suspendedTill; + /** * Maximum number of workers * This only applies to function container. @@ -206,57 +219,59 @@ public class SiteInner extends Resource { /** * Resource group web app belongs to. */ - @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.resourceGroup") private String resourceGroup; /** * Site is a default container. */ - @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.isDefaultContainer") private Boolean isDefaultContainer; /** * Default hostname of the web app. */ - @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.defaultHostName") private String defaultHostName; /** - * Get the siteName value. + * Get the state value. * - * @return the siteName value + * @return the state value */ - public String siteName() { - return this.siteName; + public String state() { + return this.state; } /** - * Set the siteName value. + * Set the state value. * - * @param siteName the siteName value to set + * @param state the state value to set * @return the SiteInner object itself. */ - public SiteInner withSiteName(String siteName) { - this.siteName = siteName; + public SiteInner withState(String state) { + this.state = state; return this; } /** - * Get the state value. + * Get the hostNames value. * - * @return the state value + * @return the hostNames value */ - public String state() { - return this.state; + public List hostNames() { + return this.hostNames; } /** - * Get the hostNames value. + * Set the hostNames value. * - * @return the hostNames value + * @param hostNames the hostNames value to set + * @return the SiteInner object itself. */ - public List hostNames() { - return this.hostNames; + public SiteInner withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; } /** @@ -268,6 +283,17 @@ public String repositorySiteName() { return this.repositorySiteName; } + /** + * Set the repositorySiteName value. + * + * @param repositorySiteName the repositorySiteName value to set + * @return the SiteInner object itself. + */ + public SiteInner withRepositorySiteName(String repositorySiteName) { + this.repositorySiteName = repositorySiteName; + return this; + } + /** * Get the usageState value. * @@ -277,6 +303,17 @@ public UsageState usageState() { return this.usageState; } + /** + * Set the usageState value. + * + * @param usageState the usageState value to set + * @return the SiteInner object itself. + */ + public SiteInner withUsageState(UsageState usageState) { + this.usageState = usageState; + return this; + } + /** * Get the enabled value. * @@ -306,6 +343,17 @@ public List enabledHostNames() { return this.enabledHostNames; } + /** + * Set the enabledHostNames value. + * + * @param enabledHostNames the enabledHostNames value to set + * @return the SiteInner object itself. + */ + public SiteInner withEnabledHostNames(List enabledHostNames) { + this.enabledHostNames = enabledHostNames; + return this; + } + /** * Get the availabilityState value. * @@ -315,6 +363,17 @@ public SiteAvailabilityState availabilityState() { return this.availabilityState; } + /** + * Set the availabilityState value. + * + * @param availabilityState the availabilityState value to set + * @return the SiteInner object itself. + */ + public SiteInner withAvailabilityState(SiteAvailabilityState availabilityState) { + this.availabilityState = availabilityState; + return this; + } + /** * Get the hostNameSslStates value. * @@ -355,6 +414,26 @@ public SiteInner withServerFarmId(String serverFarmId) { return this; } + /** + * Get the reserved value. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved value. + * + * @param reserved the reserved value to set + * @return the SiteInner object itself. + */ + public SiteInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + /** * Get the lastModifiedTimeUtc value. * @@ -364,6 +443,17 @@ public DateTime lastModifiedTimeUtc() { return this.lastModifiedTimeUtc; } + /** + * Set the lastModifiedTimeUtc value. + * + * @param lastModifiedTimeUtc the lastModifiedTimeUtc value to set + * @return the SiteInner object itself. + */ + public SiteInner withLastModifiedTimeUtc(DateTime lastModifiedTimeUtc) { + this.lastModifiedTimeUtc = lastModifiedTimeUtc; + return this; + } + /** * Get the siteConfig value. * @@ -393,6 +483,17 @@ public List trafficManagerHostNames() { return this.trafficManagerHostNames; } + /** + * Set the trafficManagerHostNames value. + * + * @param trafficManagerHostNames the trafficManagerHostNames value to set + * @return the SiteInner object itself. + */ + public SiteInner withTrafficManagerHostNames(List trafficManagerHostNames) { + this.trafficManagerHostNames = trafficManagerHostNames; + return this; + } + /** * Get the premiumAppDeployed value. * @@ -402,6 +503,17 @@ public Boolean premiumAppDeployed() { return this.premiumAppDeployed; } + /** + * Set the premiumAppDeployed value. + * + * @param premiumAppDeployed the premiumAppDeployed value to set + * @return the SiteInner object itself. + */ + public SiteInner withPremiumAppDeployed(Boolean premiumAppDeployed) { + this.premiumAppDeployed = premiumAppDeployed; + return this; + } + /** * Get the scmSiteAlsoStopped value. * @@ -431,6 +543,17 @@ public String targetSwapSlot() { return this.targetSwapSlot; } + /** + * Set the targetSwapSlot value. + * + * @param targetSwapSlot the targetSwapSlot value to set + * @return the SiteInner object itself. + */ + public SiteInner withTargetSwapSlot(String targetSwapSlot) { + this.targetSwapSlot = targetSwapSlot; + return this; + } + /** * Get the hostingEnvironmentProfile value. * @@ -560,6 +683,17 @@ public String outboundIpAddresses() { return this.outboundIpAddresses; } + /** + * Set the outboundIpAddresses value. + * + * @param outboundIpAddresses the outboundIpAddresses value to set + * @return the SiteInner object itself. + */ + public SiteInner withOutboundIpAddresses(String outboundIpAddresses) { + this.outboundIpAddresses = outboundIpAddresses; + return this; + } + /** * Get the containerSize value. * @@ -580,6 +714,46 @@ public SiteInner withContainerSize(Integer containerSize) { return this; } + /** + * Get the dailyMemoryTimeQuota value. + * + * @return the dailyMemoryTimeQuota value + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set the dailyMemoryTimeQuota value. + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set + * @return the SiteInner object itself. + */ + public SiteInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get the suspendedTill value. + * + * @return the suspendedTill value + */ + public DateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Set the suspendedTill value. + * + * @param suspendedTill the suspendedTill value to set + * @return the SiteInner object itself. + */ + public SiteInner withSuspendedTill(DateTime suspendedTill) { + this.suspendedTill = suspendedTill; + return this; + } + /** * Get the maxNumberOfWorkers value. * @@ -629,6 +803,17 @@ public String resourceGroup() { return this.resourceGroup; } + /** + * Set the resourceGroup value. + * + * @param resourceGroup the resourceGroup value to set + * @return the SiteInner object itself. + */ + public SiteInner withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + /** * Get the isDefaultContainer value. * @@ -638,6 +823,17 @@ public Boolean isDefaultContainer() { return this.isDefaultContainer; } + /** + * Set the isDefaultContainer value. + * + * @param isDefaultContainer the isDefaultContainer value to set + * @return the SiteInner object itself. + */ + public SiteInner withIsDefaultContainer(Boolean isDefaultContainer) { + this.isDefaultContainer = isDefaultContainer; + return this; + } + /** * Get the defaultHostName value. * @@ -647,4 +843,15 @@ public String defaultHostName() { return this.defaultHostName; } + /** + * Set the defaultHostName value. + * + * @param defaultHostName the defaultHostName value to set + * @return the SiteInner object itself. + */ + public SiteInner withDefaultHostName(String defaultHostName) { + this.defaultHostName = defaultHostName; + return this; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SnapshotInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SnapshotInner.java new file mode 100644 index 000000000000..5918c44a1707 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SnapshotInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * A snapshot of a web app. + */ +@JsonFlatten +public class SnapshotInner extends Resource { + /** + * The time the snapshot was taken. + */ + @JsonProperty(value = "properties.time") + private DateTime time; + + /** + * Get the time value. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set the time value. + * + * @param time the time value to set + * @return the SnapshotInner object itself. + */ + public SnapshotInner withTime(DateTime time) { + this.time = time; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationOptionsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationOptionsInner.java new file mode 100644 index 000000000000..2edf640cacae --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationOptionsInner.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Description of a backup which will be performed. + */ +@JsonFlatten +public class StorageMigrationOptionsInner extends Resource { + /** + * AzureFiles connection string. + */ + @JsonProperty(value = "properties.azurefilesConnectionString") + private String azurefilesConnectionString; + + /** + * AzureFiles share. + */ + @JsonProperty(value = "properties.azurefilesShare") + private String azurefilesShare; + + /** + * Indicate if site should be switched over. + */ + @JsonProperty(value = "properties.switchSiteAfterMigration") + private Boolean switchSiteAfterMigration; + + /** + * Indicate if the site should be read only during copy operation. + */ + @JsonProperty(value = "properties.blockWriteAccessToSite") + private Boolean blockWriteAccessToSite; + + /** + * Get the azurefilesConnectionString value. + * + * @return the azurefilesConnectionString value + */ + public String azurefilesConnectionString() { + return this.azurefilesConnectionString; + } + + /** + * Set the azurefilesConnectionString value. + * + * @param azurefilesConnectionString the azurefilesConnectionString value to set + * @return the StorageMigrationOptionsInner object itself. + */ + public StorageMigrationOptionsInner withAzurefilesConnectionString(String azurefilesConnectionString) { + this.azurefilesConnectionString = azurefilesConnectionString; + return this; + } + + /** + * Get the azurefilesShare value. + * + * @return the azurefilesShare value + */ + public String azurefilesShare() { + return this.azurefilesShare; + } + + /** + * Set the azurefilesShare value. + * + * @param azurefilesShare the azurefilesShare value to set + * @return the StorageMigrationOptionsInner object itself. + */ + public StorageMigrationOptionsInner withAzurefilesShare(String azurefilesShare) { + this.azurefilesShare = azurefilesShare; + return this; + } + + /** + * Get the switchSiteAfterMigration value. + * + * @return the switchSiteAfterMigration value + */ + public Boolean switchSiteAfterMigration() { + return this.switchSiteAfterMigration; + } + + /** + * Set the switchSiteAfterMigration value. + * + * @param switchSiteAfterMigration the switchSiteAfterMigration value to set + * @return the StorageMigrationOptionsInner object itself. + */ + public StorageMigrationOptionsInner withSwitchSiteAfterMigration(Boolean switchSiteAfterMigration) { + this.switchSiteAfterMigration = switchSiteAfterMigration; + return this; + } + + /** + * Get the blockWriteAccessToSite value. + * + * @return the blockWriteAccessToSite value + */ + public Boolean blockWriteAccessToSite() { + return this.blockWriteAccessToSite; + } + + /** + * Set the blockWriteAccessToSite value. + * + * @param blockWriteAccessToSite the blockWriteAccessToSite value to set + * @return the StorageMigrationOptionsInner object itself. + */ + public StorageMigrationOptionsInner withBlockWriteAccessToSite(Boolean blockWriteAccessToSite) { + this.blockWriteAccessToSite = blockWriteAccessToSite; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationResponseInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationResponseInner.java new file mode 100644 index 000000000000..3a996affe414 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/StorageMigrationResponseInner.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.website.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Response for a migration of site content request. + */ +@JsonFlatten +public class StorageMigrationResponseInner extends Resource { + /** + * When server starts the migration process, it will return an OperationId + * identifying that particular migration operation. + */ + @JsonProperty(value = "properties.operationId") + private String operationId; + + /** + * Get the operationId value. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Set the operationId value. + * + * @param operationId the operationId value to set + * @return the StorageMigrationResponseInner object itself. + */ + public StorageMigrationResponseInner withOperationId(String operationId) { + this.operationId = operationId; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java index 796f48bcf655..64394140a624 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java @@ -62,66 +62,69 @@ public TopLevelDomainsInner(Retrofit retrofit, WebSiteManagementClientImpl clien interface TopLevelDomainsService { @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") - Observable> getGetTopLevelDomains(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") - Observable> getTopLevelDomain(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") - Observable> listTopLevelDomainAgreements(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopLevelDomainAgreementOption agreementOption, @Header("User-Agent") String userAgent); + Observable> listAgreements(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopLevelDomainAgreementOption agreementOption, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getGetTopLevelDomainsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("{nextLink}") - Observable> listTopLevelDomainAgreementsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAgreementsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @return the PagedList<TopLevelDomainInner> object if successful. */ - public PagedList getGetTopLevelDomains() { - ServiceResponse> response = getGetTopLevelDomainsSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getGetTopLevelDomainsAsync(final ListOperationCallback serviceCallback) { + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getGetTopLevelDomainsSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @return the observable to the PagedList<TopLevelDomainInner> object */ - public Observable> getGetTopLevelDomainsAsync() { - return getGetTopLevelDomainsWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -131,12 +134,13 @@ public Page call(ServiceResponse> } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @return the observable to the PagedList<TopLevelDomainInner> object */ - public Observable>> getGetTopLevelDomainsWithServiceResponseAsync() { - return getGetTopLevelDomainsSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -144,29 +148,28 @@ public Observable>> call(ServiceRespon if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getGetTopLevelDomainsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @return the PagedList<TopLevelDomainInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getGetTopLevelDomainsSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getGetTopLevelDomains(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getGetTopLevelDomainsDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -175,7 +178,7 @@ public Observable>> call(Response> getGetTopLevelDomainsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -183,34 +186,37 @@ private ServiceResponse> getGetTopLevelDomainsDele } /** + * Gets details of a top level domain. * Gets details of a top level domain. * * @param name Name of the top level domain * @return the TopLevelDomainInner object if successful. */ - public TopLevelDomainInner getTopLevelDomain(String name) { - return getTopLevelDomainWithServiceResponseAsync(name).toBlocking().single().getBody(); + public TopLevelDomainInner get(String name) { + return getWithServiceResponseAsync(name).toBlocking().single().getBody(); } /** + * Gets details of a top level domain. * Gets details of a top level domain. * * @param name Name of the top level domain * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getTopLevelDomainAsync(String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getTopLevelDomainWithServiceResponseAsync(name), serviceCallback); + public ServiceCall getAsync(String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(name), serviceCallback); } /** + * Gets details of a top level domain. * Gets details of a top level domain. * * @param name Name of the top level domain * @return the observable to the TopLevelDomainInner object */ - public Observable getTopLevelDomainAsync(String name) { - return getTopLevelDomainWithServiceResponseAsync(name).map(new Func1, TopLevelDomainInner>() { + public Observable getAsync(String name) { + return getWithServiceResponseAsync(name).map(new Func1, TopLevelDomainInner>() { @Override public TopLevelDomainInner call(ServiceResponse response) { return response.getBody(); @@ -219,27 +225,26 @@ public TopLevelDomainInner call(ServiceResponse response) { } /** + * Gets details of a top level domain. * Gets details of a top level domain. * * @param name Name of the top level domain * @return the observable to the TopLevelDomainInner object */ - public Observable> getTopLevelDomainWithServiceResponseAsync(String name) { + public Observable> getWithServiceResponseAsync(String name) { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getTopLevelDomain(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-03-01"; + return service.get(name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getTopLevelDomainDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -248,7 +253,7 @@ public Observable> call(Response getTopLevelDomainDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -256,48 +261,51 @@ private ServiceResponse getTopLevelDomainDelegate(Response< } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain * @return the PagedList<TldLegalAgreementInner> object if successful. */ - public PagedList listTopLevelDomainAgreements(final String name) { - ServiceResponse> response = listTopLevelDomainAgreementsSinglePageAsync(name).toBlocking().single(); + public PagedList listAgreements(final String name) { + ServiceResponse> response = listAgreementsSinglePageAsync(name).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listTopLevelDomainAgreementsAsync(final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listAgreementsAsync(final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - listTopLevelDomainAgreementsSinglePageAsync(name), + listAgreementsSinglePageAsync(name), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink); + return listAgreementsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain * @return the observable to the PagedList<TldLegalAgreementInner> object */ - public Observable> listTopLevelDomainAgreementsAsync(final String name) { - return listTopLevelDomainAgreementsWithServiceResponseAsync(name) + public Observable> listAgreementsAsync(final String name) { + return listAgreementsWithServiceResponseAsync(name) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -307,13 +315,14 @@ public Page call(ServiceResponse>> listTopLevelDomainAgreementsWithServiceResponseAsync(final String name) { - return listTopLevelDomainAgreementsSinglePageAsync(name) + public Observable>> listAgreementsWithServiceResponseAsync(final String name) { + return listAgreementsSinglePageAsync(name) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -321,36 +330,35 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listTopLevelDomainAgreementsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAgreementsNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain * @return the PagedList<TldLegalAgreementInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listTopLevelDomainAgreementsSinglePageAsync(final String name) { + public Observable>> listAgreementsSinglePageAsync(final String name) { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-03-01"; final Boolean includePrivacy = null; TopLevelDomainAgreementOption agreementOption = new TopLevelDomainAgreementOption(); agreementOption.withIncludePrivacy(null); - return service.listTopLevelDomainAgreements(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), agreementOption, this.client.userAgent()) + return service.listAgreements(name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), agreementOption, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listTopLevelDomainAgreementsDelegate(response); + ServiceResponse> result = listAgreementsDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -360,23 +368,25 @@ public Observable>> call(Response listTopLevelDomainAgreements(final String name, final Boolean includePrivacy) { - ServiceResponse> response = listTopLevelDomainAgreementsSinglePageAsync(name, includePrivacy).toBlocking().single(); + public PagedList listAgreements(final String name, final Boolean includePrivacy) { + ServiceResponse> response = listAgreementsSinglePageAsync(name, includePrivacy).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain @@ -384,27 +394,28 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listTopLevelDomainAgreementsAsync(final String name, final Boolean includePrivacy, final ListOperationCallback serviceCallback) { + public ServiceCall> listAgreementsAsync(final String name, final Boolean includePrivacy, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - listTopLevelDomainAgreementsSinglePageAsync(name, includePrivacy), + listAgreementsSinglePageAsync(name, includePrivacy), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink); + return listAgreementsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain * @param includePrivacy If true then the list of agreements will inclue agreements for domain privacy as well. * @return the observable to the PagedList<TldLegalAgreementInner> object */ - public Observable> listTopLevelDomainAgreementsAsync(final String name, final Boolean includePrivacy) { - return listTopLevelDomainAgreementsWithServiceResponseAsync(name, includePrivacy) + public Observable> listAgreementsAsync(final String name, final Boolean includePrivacy) { + return listAgreementsWithServiceResponseAsync(name, includePrivacy) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -414,14 +425,15 @@ public Page call(ServiceResponse>> listTopLevelDomainAgreementsWithServiceResponseAsync(final String name, final Boolean includePrivacy) { - return listTopLevelDomainAgreementsSinglePageAsync(name, includePrivacy) + public Observable>> listAgreementsWithServiceResponseAsync(final String name, final Boolean includePrivacy) { + return listAgreementsSinglePageAsync(name, includePrivacy) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -429,36 +441,35 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listTopLevelDomainAgreementsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAgreementsNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * ServiceResponse> * @param name Name of the top level domain ServiceResponse> * @param includePrivacy If true then the list of agreements will inclue agreements for domain privacy as well. * @return the PagedList<TldLegalAgreementInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listTopLevelDomainAgreementsSinglePageAsync(final String name, final Boolean includePrivacy) { + public Observable>> listAgreementsSinglePageAsync(final String name, final Boolean includePrivacy) { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2016-03-01"; TopLevelDomainAgreementOption agreementOption = new TopLevelDomainAgreementOption(); agreementOption.withIncludePrivacy(includePrivacy); - return service.listTopLevelDomainAgreements(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), agreementOption, this.client.userAgent()) + return service.listAgreements(name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), agreementOption, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listTopLevelDomainAgreementsDelegate(response); + ServiceResponse> result = listAgreementsDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -467,7 +478,7 @@ public Observable>> call(Response> listTopLevelDomainAgreementsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAgreementsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -475,22 +486,24 @@ private ServiceResponse> listTopLevelDomainAgre } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<TopLevelDomainInner> object if successful. */ - public PagedList getGetTopLevelDomainsNext(final String nextPageLink) { - ServiceResponse> response = getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -498,26 +511,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getGetTopLevelDomainsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getGetTopLevelDomainsNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<TopLevelDomainInner> object */ - public Observable> getGetTopLevelDomainsNextAsync(final String nextPageLink) { - return getGetTopLevelDomainsNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -527,13 +541,14 @@ public Page call(ServiceResponse> } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<TopLevelDomainInner> object */ - public Observable>> getGetTopLevelDomainsNextWithServiceResponseAsync(final String nextPageLink) { - return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -541,27 +556,28 @@ public Observable>> call(ServiceRespon if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getGetTopLevelDomainsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Lists all top level domains supported for registration. * Lists all top level domains supported for registration. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<TopLevelDomainInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getGetTopLevelDomainsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getGetTopLevelDomainsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getGetTopLevelDomainsNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -570,7 +586,7 @@ public Observable>> call(Response> getGetTopLevelDomainsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -578,22 +594,24 @@ private ServiceResponse> getGetTopLevelDomainsNext } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<TldLegalAgreementInner> object if successful. */ - public PagedList listTopLevelDomainAgreementsNext(final String nextPageLink) { - ServiceResponse> response = listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listAgreementsNext(final String nextPageLink) { + ServiceResponse> response = listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -601,26 +619,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listTopLevelDomainAgreementsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listAgreementsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink), + listAgreementsNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink); + return listAgreementsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<TldLegalAgreementInner> object */ - public Observable> listTopLevelDomainAgreementsNextAsync(final String nextPageLink) { - return listTopLevelDomainAgreementsNextWithServiceResponseAsync(nextPageLink) + public Observable> listAgreementsNextAsync(final String nextPageLink) { + return listAgreementsNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -630,13 +649,14 @@ public Page call(ServiceResponse>> listTopLevelDomainAgreementsNextWithServiceResponseAsync(final String nextPageLink) { - return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink) + public Observable>> listAgreementsNextWithServiceResponseAsync(final String nextPageLink) { + return listAgreementsNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -644,27 +664,28 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listTopLevelDomainAgreementsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAgreementsNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Lists legal agreements that user needs to accept before purchasing domain. * Lists legal agreements that user needs to accept before purchasing domain. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<TldLegalAgreementInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listTopLevelDomainAgreementsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listAgreementsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.listTopLevelDomainAgreementsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listAgreementsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listTopLevelDomainAgreementsNextDelegate(response); + ServiceResponse> result = listAgreementsNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -673,7 +694,7 @@ public Observable>> call(Response> listTopLevelDomainAgreementsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAgreementsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java deleted file mode 100644 index 9d2a730ad0dd..000000000000 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.website.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceResponseBuilder; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCall; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Usages. - */ -public final class UsagesInner { - /** The Retrofit service to perform REST calls. */ - private UsagesService service; - /** The service client containing this operation class. */ - private WebSiteManagementClientImpl client; - - /** - * Initializes an instance of UsagesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public UsagesInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(UsagesService.class); - this.client = client; - } - - /** - * The interface defining all the services for Usages to be - * used by Retrofit to perform actually REST calls. - */ - interface UsagesService { - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web.Admin/environments/{environmentName}/usage") - Observable> getUsage(@Path("resourceGroupName") String resourceGroupName, @Path("environmentName") String environmentName, @Path("subscriptionId") String subscriptionId, @Query("lastId") String lastId, @Query("batchSize") int batchSize, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Returns usage records for specified subscription and resource groups. - * - * @param resourceGroupName Name of resource group - * @param environmentName Environment name - * @param lastId Last marker that was returned from the batch - * @param batchSize size of the batch to be returned. - * @return the Object object if successful. - */ - public Object getUsage(String resourceGroupName, String environmentName, String lastId, int batchSize) { - return getUsageWithServiceResponseAsync(resourceGroupName, environmentName, lastId, batchSize).toBlocking().single().getBody(); - } - - /** - * Returns usage records for specified subscription and resource groups. - * - * @param resourceGroupName Name of resource group - * @param environmentName Environment name - * @param lastId Last marker that was returned from the batch - * @param batchSize size of the batch to be returned. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object - */ - public ServiceCall getUsageAsync(String resourceGroupName, String environmentName, String lastId, int batchSize, final ServiceCallback serviceCallback) { - return ServiceCall.create(getUsageWithServiceResponseAsync(resourceGroupName, environmentName, lastId, batchSize), serviceCallback); - } - - /** - * Returns usage records for specified subscription and resource groups. - * - * @param resourceGroupName Name of resource group - * @param environmentName Environment name - * @param lastId Last marker that was returned from the batch - * @param batchSize size of the batch to be returned. - * @return the observable to the Object object - */ - public Observable getUsageAsync(String resourceGroupName, String environmentName, String lastId, int batchSize) { - return getUsageWithServiceResponseAsync(resourceGroupName, environmentName, lastId, batchSize).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); - } - - /** - * Returns usage records for specified subscription and resource groups. - * - * @param resourceGroupName Name of resource group - * @param environmentName Environment name - * @param lastId Last marker that was returned from the batch - * @param batchSize size of the batch to be returned. - * @return the observable to the Object object - */ - public Observable> getUsageWithServiceResponseAsync(String resourceGroupName, String environmentName, String lastId, int batchSize) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (environmentName == null) { - throw new IllegalArgumentException("Parameter environmentName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (lastId == null) { - throw new IllegalArgumentException("Parameter lastId 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.getUsage(resourceGroupName, environmentName, this.client.subscriptionId(), lastId, batchSize, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getUsageDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getUsageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UserInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UserInner.java index 3b1d2a218037..6c5387fed233 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UserInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UserInner.java @@ -36,10 +36,16 @@ public class UserInner extends Resource { private String publishingPassword; /** - * Service Control Manager URI, including username and password. + * PasswordHash used for publishing. */ - @JsonProperty(value = "properties.scmUri") - private String scmUri; + @JsonProperty(value = "properties.publishingPasswordHash") + private String publishingPasswordHash; + + /** + * PasswordHashSalt used for publishing. + */ + @JsonProperty(value = "properties.publishingPasswordHashSalt") + private String publishingPasswordHashSalt; /** * Get the userName value. @@ -102,22 +108,42 @@ public UserInner withPublishingPassword(String publishingPassword) { } /** - * Get the scmUri value. + * Get the publishingPasswordHash value. + * + * @return the publishingPasswordHash value + */ + public String publishingPasswordHash() { + return this.publishingPasswordHash; + } + + /** + * Set the publishingPasswordHash value. + * + * @param publishingPasswordHash the publishingPasswordHash value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHash(String publishingPasswordHash) { + this.publishingPasswordHash = publishingPasswordHash; + return this; + } + + /** + * Get the publishingPasswordHashSalt value. * - * @return the scmUri value + * @return the publishingPasswordHashSalt value */ - public String scmUri() { - return this.scmUri; + public String publishingPasswordHashSalt() { + return this.publishingPasswordHashSalt; } /** - * Set the scmUri value. + * Set the publishingPasswordHashSalt value. * - * @param scmUri the scmUri value to set + * @param publishingPasswordHashSalt the publishingPasswordHashSalt value to set * @return the UserInner object itself. */ - public UserInner withScmUri(String scmUri) { - this.scmUri = scmUri; + public UserInner withPublishingPasswordHashSalt(String publishingPasswordHashSalt) { + this.publishingPasswordHashSalt = publishingPasswordHashSalt; return this; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateRequestInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateRequestInner.java new file mode 100644 index 000000000000..48c447be2434 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateRequestInner.java @@ -0,0 +1,119 @@ +/** + * 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.website.implementation; + +import com.microsoft.azure.management.website.ValidateResourceTypes; +import com.microsoft.azure.management.website.ValidateProperties; + +/** + * Resource validation request content. + */ +public class ValidateRequestInner { + /** + * Resource name to verify. + */ + private String name; + + /** + * Resource type used for verification. Possible values include: + * 'ServerFarm', 'Site'. + */ + private ValidateResourceTypes type; + + /** + * Expected location of the resource. + */ + private String location; + + /** + * Properties of the resource to validate. + */ + private ValidateProperties properties; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public ValidateResourceTypes type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withType(ValidateResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get the location value. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the location value. + * + * @param location the location value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public ValidateProperties properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the ValidateRequestInner object itself. + */ + public ValidateRequestInner withProperties(ValidateProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateResponseInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateResponseInner.java new file mode 100644 index 000000000000..18f5af969e99 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ValidateResponseInner.java @@ -0,0 +1,67 @@ +/** + * 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.website.implementation; + +import com.microsoft.azure.management.website.ValidateResponseError; + +/** + * Describes the result of resource validation. + */ +public class ValidateResponseInner { + /** + * Indicates the result of validation. + */ + private String status; + + /** + * Error details for the case when validation fails. + */ + private ValidateResponseError error; + + /** + * Get the status value. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the ValidateResponseInner object itself. + */ + public ValidateResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public ValidateResponseError error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ValidateResponseInner object itself. + */ + public ValidateResponseInner withError(ValidateResponseError error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebAppsInner.java similarity index 59% rename from azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java rename to azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebAppsInner.java index 59ad2457471e..dfa3376f63e8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebAppsInner.java @@ -42,882 +42,1043 @@ /** * An instance of this class provides access to all the operations defined - * in Sites. + * in WebApps. */ -public final class SitesInner { +public final class WebAppsInner { /** The Retrofit service to perform REST calls. */ - private SitesService service; + private WebAppsService service; /** The service client containing this operation class. */ private WebSiteManagementClientImpl client; /** - * Initializes an instance of SitesInner. + * Initializes an instance of WebAppsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public SitesInner(Retrofit retrofit, WebSiteManagementClientImpl client) { - this.service = retrofit.create(SitesService.class); + public WebAppsInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(WebAppsService.class); this.client = client; } /** - * The interface defining all the services for Sites to be + * The interface defining all the services for WebApps to be * used by Retrofit to perform actually REST calls. */ - interface SitesService { + interface WebAppsService { @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") - Observable> getSiteVNETConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") - Observable> createOrUpdateSiteVNETConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) - Observable> deleteSiteVNETConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/deletedSites") + Observable> listDeleted(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") - Observable> updateSiteVNETConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("includeSlots") Boolean includeSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Observable> getSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Observable> createOrUpdateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("skipCustomDomainVerification") Boolean skipCustomDomainVerification, @Query("forceDnsRegistration") Boolean forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) - Observable> deleteSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("skipCustomDomainVerification") Boolean skipCustomDomainVerification, @Query("forceDnsRegistration") Boolean forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Observable> updateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("deleteMetrics") Boolean deleteMetrics, @Query("deleteEmptyServerFarm") Boolean deleteEmptyServerFarm, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") - Observable> getSiteNetworkFeaturesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") + Observable> analyzeCustomHostname(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("hostName") String hostName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") - Observable> getSiteNetworkFeatures(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") + Observable> applySlotConfigToProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/operationresults/{operationId}") - Observable> getSiteOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") + Observable> backup(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/operationresults/{operationId}") - Observable> getSiteOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") + Observable> listBackups(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") - Observable> swapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover") + Observable> discoverRestore(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") - Observable> beginSwapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") + Observable> getBackupStatus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") - Observable> swapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", method = "DELETE", hasBody = true) + Observable> deleteBackup(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") - Observable> beginSwapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") + Observable> listBackupStatusSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") - Observable> getSlotsDifferencesFromProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") + Observable> restore(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") - Observable> getSlotsDifferencesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") + Observable> beginRestore(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") - Observable> applySlotConfigToProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") + Observable> updateApplicationSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner appSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") - Observable> applySlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") + Observable> listApplicationSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") - Observable> resetProductionSlotConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") + Observable> updateAuthSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteAuthSettingsInner siteAuthSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") - Observable> resetSlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") + Observable> listAuthSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") - Observable> getSlotConfigNames(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") + Observable> updateBackupConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") - Observable> updateSlotConfigNames(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SlotConfigNamesResourceInner slotConfigNames, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", method = "DELETE", hasBody = true) + Observable> deleteBackupConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") - Observable> getSiteSlots(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") + Observable> getBackupConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") - Observable> getSites(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("includeSiteTypes") String includeSiteTypes, @Query("includeSlots") Boolean includeSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") + Observable> updateConnectionStrings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ConnectionStringDictionaryInner connectionStrings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") - Observable> getSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") + Observable> listConnectionStrings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") - Observable> createOrUpdateSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("skipCustomDomainVerification") String skipCustomDomainVerification, @Query("forceDnsRegistration") String forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") + Observable> getDiagnosticLogsConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") - Observable> beginCreateOrUpdateSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("skipCustomDomainVerification") String skipCustomDomainVerification, @Query("forceDnsRegistration") String forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") + Observable> updateDiagnosticLogsConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteLogsConfigInner siteLogsConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", method = "DELETE", hasBody = true) - Observable> deleteSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("deleteMetrics") String deleteMetrics, @Query("deleteEmptyServerFarm") String deleteEmptyServerFarm, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("deleteAllSlots") String deleteAllSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") + Observable> updateMetadata(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner metadata, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") - Observable> getSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") + Observable> listMetadata(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") - Observable> createOrUpdateSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("skipCustomDomainVerification") String skipCustomDomainVerification, @Query("forceDnsRegistration") String forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") + Observable> listPublishingCredentials(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") - Observable> beginCreateOrUpdateSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("skipCustomDomainVerification") String skipCustomDomainVerification, @Query("forceDnsRegistration") String forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") + Observable> beginListPublishingCredentials(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", method = "DELETE", hasBody = true) - Observable> deleteSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("deleteMetrics") String deleteMetrics, @Query("deleteEmptyServerFarm") String deleteEmptyServerFarm, @Query("skipDnsRegistration") String skipDnsRegistration, @Query("deleteAllSlots") String deleteAllSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") + Observable> updateSitePushSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body PushSettingsInner pushSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") - Observable> isSiteCloneable(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") + Observable> listSitePushSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") - Observable> isSiteCloneableSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") + Observable> listSlotConfigurationNames(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover") - Observable> recoverSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") + Observable> updateSlotConfigurationNames(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SlotConfigNamesResourceInner slotConfigNames, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover") - Observable> beginRecoverSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") + Observable> getConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") - Observable> recoverSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") + Observable> createOrUpdateConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") - Observable> beginRecoverSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") + Observable> updateConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") - Observable> getSiteSnapshots(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") + Observable> listDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") - Observable> getSiteSnapshotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") + Observable> getDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/deletedSites") - Observable> getDeletedSites(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("includeSiteTypes") String includeSiteTypes, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") + Observable> createDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") - Observable> getDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", method = "DELETE", hasBody = true) + Observable> deleteDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") - Observable> getDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") + Observable> listHostNameBindings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments") - Observable> getInstanceDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") + Observable> getHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments") - Observable> getInstanceDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") + Observable> createOrUpdateHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Body HostNameBindingInner hostNameBinding, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") - Observable> getInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", method = "DELETE", hasBody = true) + Observable> deleteHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") - Observable> createInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> getHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) - Observable> deleteInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> createOrUpdateHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") - Observable> getDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", method = "DELETE", hasBody = true) + Observable> deleteHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") - Observable> createDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> updateHybridConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", method = "DELETE", hasBody = true) - Observable> deleteDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") + Observable> listHybridConnectionKeys(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") - Observable> getDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") + Observable> listHybridConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") - Observable> createDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") + Observable> listRelayServiceConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", method = "DELETE", hasBody = true) - Observable> deleteDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") + Observable> getRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") - Observable> getInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") + Observable> createOrUpdateRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") - Observable> createInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", method = "DELETE", hasBody = true) + Observable> deleteRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) - Observable> deleteInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") + Observable> updateRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") - Observable> getSiteInstanceIdentifiers(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listInstanceIdentifiers(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") - Observable> getSiteInstanceIdentifiersSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments") + Observable> listInstanceDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") - Observable> getSiteHostNameBindings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") + Observable> getInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") - Observable> getSiteHostNameBindingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") + Observable> createInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") - Observable> getSiteHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) + Observable> deleteInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") - Observable> createOrUpdateSiteHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Body HostNameBindingInner hostNameBinding, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") + Observable> isCloneable(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", method = "DELETE", hasBody = true) - Observable> deleteSiteHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") + Observable> listMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") - Observable> getSiteHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics") + Observable> listMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") - Observable> createOrUpdateSiteHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body HostNameBindingInner hostNameBinding, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") + Observable> migrateStorage(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Body StorageMigrationOptionsInner options, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", method = "DELETE", hasBody = true) - Observable> deleteSiteHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") + Observable> beginMigrateStorage(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Body StorageMigrationOptionsInner options, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") - Observable> getSiteConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") + Observable> migrateMySql(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body MigrateMySqlRequestInner migrationRequestEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") - Observable> createOrUpdateSiteConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") + Observable> beginMigrateMySql(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body MigrateMySqlRequestInner migrationRequestEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") - Observable> updateSiteConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") + Observable> listNetworkFeatures(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") - Observable> getSiteConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") + Observable> startWebSiteNetworkTrace(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("durationInSeconds") Integer durationInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") - Observable> createOrUpdateSiteConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") + Observable> stopWebSiteNetworkTrace(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") - Observable> updateSiteConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") + Observable> generateNewSitePublishingPassword(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Observable> getSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/operationresults/{operationId}") + Observable> getOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Observable> createOrUpdateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") + Observable> listPerfMonCounters(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", method = "DELETE", hasBody = true) - Observable> deleteSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") + Observable> getSitePhpErrorLogFlag(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Observable> updateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") + Observable> listPremierAddOns(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") - Observable> getSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") + Observable> getPremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") - Observable> createOrUpdateSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") + Observable> addPremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnRequestInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", method = "DELETE", hasBody = true) - Observable> deleteSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", method = "DELETE", hasBody = true) + Observable> deletePremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") - Observable> updateSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") + @Streaming + Observable> listPublishingProfileXmlWithSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CsmPublishingProfileOptions options, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") - Observable> listSiteAppSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover") + Observable> recover(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") - Observable> listSiteAppSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover") + Observable> beginRecover(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") - Observable> updateSiteAppSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner appSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") + Observable> resetProductionSlotConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") - Observable> updateSiteAppSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner appSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") + Observable> restart(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("synchronous") Boolean synchronous, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") - Observable> listSiteConnectionStrings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") + Observable> listSlots(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") - Observable> listSiteConnectionStringsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") + Observable> getSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") - Observable> updateSiteConnectionStrings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body ConnectionStringDictionaryInner connectionStrings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") + Observable> createOrUpdateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("skipCustomDomainVerification") Boolean skipCustomDomainVerification, @Query("forceDnsRegistration") Boolean forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") - Observable> updateSiteConnectionStringsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body ConnectionStringDictionaryInner connectionStrings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") + Observable> beginCreateOrUpdateSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteInner siteEnvelope, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("skipCustomDomainVerification") Boolean skipCustomDomainVerification, @Query("forceDnsRegistration") Boolean forceDnsRegistration, @Query("ttlInSeconds") String ttlInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") - Observable> listSiteAuthSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", method = "DELETE", hasBody = true) + Observable> deleteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("deleteMetrics") Boolean deleteMetrics, @Query("deleteEmptyServerFarm") Boolean deleteEmptyServerFarm, @Query("skipDnsRegistration") Boolean skipDnsRegistration, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") - Observable> listSiteAuthSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") + Observable> analyzeCustomHostnameSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("hostName") String hostName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") - Observable> updateSiteAuthSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteAuthSettingsInner siteAuthSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") + Observable> applySlotConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") - Observable> updateSiteAuthSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteAuthSettingsInner siteAuthSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") + Observable> backupSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") - Observable> listSitePublishingCredentials(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") + Observable> listBackupsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") - Observable> beginListSitePublishingCredentials(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover") + Observable> discoverRestoreSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") - Observable> listSitePublishingCredentialsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") + Observable> getBackupStatusSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") - Observable> beginListSitePublishingCredentialsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", method = "DELETE", hasBody = true) + Observable> deleteBackupSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") - Observable> listSiteMetadata(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") + Observable> listBackupStatusSecretsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") - Observable> listSiteMetadataSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") + Observable> restoreSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") - Observable> updateSiteMetadata(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner metadata, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") + Observable> beginRestoreSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") - Observable> updateSiteMetadataSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner metadata, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") + Observable> updateApplicationSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner appSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") - Observable> getSiteLogsConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") + Observable> listApplicationSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") - Observable> updateSiteLogsConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteLogsConfigInner siteLogsConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") + Observable> updateAuthSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteAuthSettingsInner siteAuthSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") - Observable> getSiteLogsConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") + Observable> listAuthSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") - Observable> updateSiteLogsConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteLogsConfigInner siteLogsConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") + Observable> updateBackupConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") - Observable> listSitePremierAddOns(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", method = "DELETE", hasBody = true) + Observable> deleteBackupConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") - Observable> listSitePremierAddOnsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") + Observable> getBackupConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") - Observable> getSitePremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") + Observable> updateConnectionStringsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body ConnectionStringDictionaryInner connectionStrings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") - Observable> addSitePremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnRequestInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") + Observable> listConnectionStringsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", method = "DELETE", hasBody = true) - Observable> deleteSitePremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") + Observable> getDiagnosticLogsConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") - Observable> getSitePremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") + Observable> updateDiagnosticLogsConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteLogsConfigInner siteLogsConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") - Observable> addSitePremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnRequestInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") + Observable> updateMetadataSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body StringDictionaryInner metadata, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", method = "DELETE", hasBody = true) - Observable> deleteSitePremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") + Observable> listMetadataSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") - Observable> getSiteBackupConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") + Observable> listPublishingCredentialsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") - Observable> getSiteBackupConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") + Observable> beginListPublishingCredentialsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") - Observable> updateSiteBackupConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") + Observable> updateSitePushSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PushSettingsInner pushSettings, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") - Observable> updateSiteBackupConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") + Observable> listSitePushSettingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") - Observable> backupSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") + Observable> getConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") - Observable> backupSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") + Observable> createOrUpdateConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover") - Observable> discoverSiteRestore(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") + Observable> updateConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteConfigInner siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover") - Observable> discoverSiteRestoreSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") + Observable> listDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") - Observable> listSiteBackups(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") + Observable> getDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") - Observable> listSiteBackupsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") + Observable> createDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") - Observable> getSiteBackupStatus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", method = "DELETE", hasBody = true) + Observable> deleteDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", method = "DELETE", hasBody = true) - Observable> deleteBackup(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") + Observable> listHostNameBindingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") - Observable> getSiteBackupStatusSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") + Observable> getHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", method = "DELETE", hasBody = true) - Observable> deleteBackupSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") + Observable> createOrUpdateHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body HostNameBindingInner hostNameBinding, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") - Observable> getSiteBackupStatusSecretsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", method = "DELETE", hasBody = true) + Observable> deleteHostNameBindingSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") - Observable> getSiteBackupStatusSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body BackupRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> getHybridConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") - Observable> restoreSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> createOrUpdateHybridConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") - Observable> beginRestoreSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", method = "DELETE", hasBody = true) + Observable> deleteHybridConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") - Observable> restoreSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + Observable> updateHybridConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") - Observable> beginRestoreSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") + Observable> listHybridConnectionKeysSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("namespaceName") String namespaceName, @Path("relayName") String relayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") - Observable> getSiteUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") + Observable> listHybridConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") - Observable> getSiteUsagesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") + Observable> listRelayServiceConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics") - Observable> getSiteMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") + Observable> getRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") - Observable> getSiteMetricsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") + Observable> createOrUpdateRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", method = "DELETE", hasBody = true) + Observable> deleteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") + Observable> updateRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") + Observable> listInstanceIdentifiersSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments") + Observable> listInstanceDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") + Observable> getInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") + Observable> createInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body DeploymentInner deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) + Observable> deleteInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") + Observable> isCloneableSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions") - Observable> getSiteMetricDefinitionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricDefinitionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") - Observable> getSiteMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") + Observable> listMetricsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") - @Streaming - Observable> listSitePublishingProfileXml(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CsmPublishingProfileOptions options, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") + Observable> listNetworkFeaturesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") + Observable> startWebSiteNetworkTraceSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("durationInSeconds") Integer durationInSeconds, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") + Observable> stopWebSiteNetworkTraceSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") + Observable> generateNewSitePublishingPasswordSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/operationresults/{operationId}") + Observable> getOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") + Observable> listPerfMonCountersSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") + Observable> getSitePhpErrorLogFlagSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") + Observable> listPremierAddOnsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") + Observable> getPremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") + Observable> addPremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnRequestInner premierAddOn, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", method = "DELETE", hasBody = true) + Observable> deletePremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") @Streaming - Observable> listSitePublishingProfileXmlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CsmPublishingProfileOptions options, @Header("User-Agent") String userAgent); + Observable> listPublishingProfileXmlWithSecretsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CsmPublishingProfileOptions options, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") - Observable> restartSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("synchronous") Boolean synchronous, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") + Observable> recoverSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") - Observable> restartSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("synchronous") Boolean synchronous, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") + Observable> beginRecoverSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntityInner recoveryEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") - Observable> startSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") + Observable> resetSlotConfigurationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") - Observable> startSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") + Observable> restartSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("softRestart") Boolean softRestart, @Query("synchronous") Boolean synchronous, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") - Observable> stopSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") + Observable> getSlotsDifferencesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") - Observable> stopSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") + Observable> swapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") - Observable> syncSiteRepository(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") + Observable> beginSwapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") - Observable> syncSiteRepositorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") + Observable> listSnapshotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") - Observable> generateNewSitePublishingPasswordSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") + Observable> getSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") - Observable> generateNewSitePublishingPassword(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") + Observable> createOrUpdateSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") - Observable> getSiteRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", method = "DELETE", hasBody = true) + Observable> deleteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") - Observable> createOrUpdateSiteRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") + Observable> updateSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", method = "DELETE", hasBody = true) - Observable> deleteSiteRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") + Observable> startSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") - Observable> updateSiteRelayServiceConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") + Observable> stopSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") - Observable> getSiteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") + Observable> syncRepositorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") - Observable> createOrUpdateSiteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") + Observable> listUsagesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", method = "DELETE", hasBody = true) - Observable> deleteSiteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") + Observable> listVnetConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") - Observable> updateSiteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntityInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") + Observable> getVnetConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") - Observable> listSiteRelayServiceConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") + Observable> createOrUpdateVnetConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") - Observable> listSiteRelayServiceConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) + Observable> deleteVnetConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") + Observable> updateVnetConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> getSiteVnetGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getVnetConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> createOrUpdateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdateVnetConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> updateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateVnetConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") + Observable> getSlotsDifferencesFromProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") + Observable> swapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") + Observable> beginSwapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntityInner slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") + Observable> listSnapshots(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Observable> getSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Observable> createOrUpdateSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", method = "DELETE", hasBody = true) + Observable> deleteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Observable> updateSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControlInner siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") + Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") + Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") + Observable> syncRepository(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") + Observable> listUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") + Observable> listVnetConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Observable> getVnetConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Observable> createOrUpdateVnetConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) + Observable> deleteVnetConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Observable> updateVnetConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfoInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> getSiteVnetGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getVnetConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> createOrUpdateSiteVNETConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdateVnetConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Observable> updateSiteVNETConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateVnetConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGatewayInner connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") - Observable> getSiteVNETConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") - Observable> getSiteVNETConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listDeletedNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> getSlotsDifferencesFromProductionNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @POST("{nextLink}") - Observable> getSlotsDifferencesSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listBackupsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteSlotsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listDeploymentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listHostNameBindingsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getDeletedSitesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listInstanceIdentifiersNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getDeploymentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listInstanceDeploymentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getDeploymentsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getInstanceDeploymentsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getInstanceDeploymentsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listPerfMonCountersNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteInstanceIdentifiersNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listSlotsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteInstanceIdentifiersSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listBackupsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteHostNameBindingsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listDeploymentsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteHostNameBindingsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listHostNameBindingsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> listSiteBackupsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listInstanceIdentifiersSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> listSiteBackupsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listInstanceDeploymentsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricDefinitionsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteUsagesSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listMetricsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listPerfMonCountersSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("{nextLink}") + Observable> getSlotsDifferencesSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteMetricsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listSnapshotsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteMetricsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listUsagesSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("{nextLink}") + Observable> getSlotsDifferencesFromProductionNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteMetricDefinitionsSlotNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listSnapshotsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") @GET("{nextLink}") - Observable> getSiteMetricDefinitionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listUsagesNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the VnetInfoInner object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public VnetInfoInner getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { - return getSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + public ServiceCall> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the observable to the VnetInfoInner object + * @return the observable to the PagedList<SiteInner> object */ - public Observable getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { - return getSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).map(new Func1, VnetInfoInner>() { - @Override - public VnetInfoInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the observable to the VnetInfoInner object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getSiteVNETConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getSiteVNETConnectionSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -925,101 +1086,111 @@ public Observable> call(Response re }); } - private ServiceResponse getSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the VnetInfoInner object if successful. + * @param resourceGroupName Name of resource group + * @return the PagedList<DeletedSiteInner> object if successful. */ - public VnetInfoInner createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).toBlocking().single().getBody(); + public PagedList listDeleted(final String resourceGroupName) { + ServiceResponse> response = listDeletedSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection + * @param resourceGroupName Name of resource group * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + public ServiceCall> listDeletedAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeletedSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listDeletedAsync(final String resourceGroupName) { + return listDeletedWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<DeletedSiteInner> object */ - public Observable createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).map(new Func1, VnetInfoInner>() { - @Override - public VnetInfoInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listDeletedWithServiceResponseAsync(final String resourceGroupName) { + return listDeletedSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeletedNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> createOrUpdateSiteVNETConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + public Observable>> listDeletedSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String propertiesToInclude = null; + return service.listDeleted(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteVNETConnectionSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDeletedDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1027,93 +1198,108 @@ public Observable> call(Response re }); } - private ServiceResponse createOrUpdateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Removes the specified Virtual Network Connection association from this web app. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @return the PagedList<DeletedSiteInner> object if successful. */ - public Object deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { - return deleteSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); + public PagedList listDeleted(final String resourceGroupName, final String propertiesToInclude) { + ServiceResponse> response = listDeletedSinglePageAsync(resourceGroupName, propertiesToInclude).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Removes the specified Virtual Network Connection association from this web app. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + public ServiceCall> listDeletedAsync(final String resourceGroupName, final String propertiesToInclude, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeletedSinglePageAsync(resourceGroupName, propertiesToInclude), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the PagedList<DeletedSiteInner> object */ - public Observable deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { - return deleteSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listDeletedAsync(final String resourceGroupName, final String propertiesToInclude) { + return listDeletedWithServiceResponseAsync(resourceGroupName, propertiesToInclude) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listDeletedWithServiceResponseAsync(final String resourceGroupName, final String propertiesToInclude) { + return listDeletedSinglePageAsync(resourceGroupName, propertiesToInclude) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeletedNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param propertiesToInclude Additional web app properties included in the response + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> deleteSiteVNETConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot) { + public Observable>> listDeletedSinglePageAsync(final String resourceGroupName, final String propertiesToInclude) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listDeleted(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteVNETConnectionSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDeletedDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1121,101 +1307,112 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDeletedDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the VnetInfoInner object if successful. + * @param resourceGroupName Name of resource group + * @return the PagedList<SiteInner> object if successful. */ - public VnetInfoInner updateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { - return updateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).toBlocking().single().getBody(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection + * @param resourceGroupName Name of resource group * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<SiteInner> object */ - public Observable updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { - return updateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).map(new Func1, VnetInfoInner>() { - @Override - public VnetInfoInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + * @param resourceGroupName Name of resource group + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> updateSiteVNETConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.updateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String propertiesToInclude = null; + final Boolean includeSlots = null; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSlots, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = updateSiteVNETConnectionSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1223,86 +1420,113 @@ public Observable> call(Response re }); } - private ServiceResponse updateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the VnetInfoInner object if successful. + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @param includeSlots Whether or not to include deployments slots in results + * @return the PagedList<SiteInner> object if successful. */ - public VnetInfoInner getSiteVNETConnection(String resourceGroupName, String name, String vnetName) { - return getSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + public PagedList listByResourceGroup(final String resourceGroupName, final String propertiesToInclude, final Boolean includeSlots) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, propertiesToInclude, includeSlots).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @param includeSlots Whether or not to include deployments slots in results * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + public ServiceCall> listByResourceGroupAsync(final String resourceGroupName, final String propertiesToInclude, final Boolean includeSlots, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupSinglePageAsync(resourceGroupName, propertiesToInclude, includeSlots), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @param includeSlots Whether or not to include deployments slots in results + * @return the observable to the PagedList<SiteInner> object */ - public Observable getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName) { - return getSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, VnetInfoInner>() { - @Override - public VnetInfoInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String propertiesToInclude, final Boolean includeSlots) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, propertiesToInclude, includeSlots) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @param propertiesToInclude Additional web app properties included in the response + * @param includeSlots Whether or not to include deployments slots in results + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String propertiesToInclude, final Boolean includeSlots) { + return listByResourceGroupSinglePageAsync(resourceGroupName, propertiesToInclude, includeSlots) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param propertiesToInclude Additional web app properties included in the response + ServiceResponse> * @param includeSlots Whether or not to include deployments slots in results + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> getSiteVNETConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String propertiesToInclude, final Boolean includeSlots) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteVNETConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSlots, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getSiteVNETConnectionDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -1310,93 +1534,81 @@ public Observable> call(Response re }); } - private ServiceResponse getSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the VnetInfoInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the SiteInner object if successful. */ - public VnetInfoInner createOrUpdateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().getBody(); + public SiteInner get(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + public ServiceCall getAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteInner object */ - public Observable createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).map(new Func1, VnetInfoInner>() { + public Observable getAsync(String resourceGroupName, String name) { + return getWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteInner>() { @Override - public VnetInfoInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteInner object */ - public Observable> createOrUpdateSiteVNETConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String propertiesToInclude = null; + return service.get(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteVNETConnectionDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1405,85 +1617,77 @@ public Observable> call(Response re }); } - private ServiceResponse createOrUpdateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Removes the specified Virtual Network Connection association from this web app. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param propertiesToInclude Additional web app properties included in the response + * @return the SiteInner object if successful. */ - public Object deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) { - return deleteSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + public SiteInner get(String resourceGroupName, String name, String propertiesToInclude) { + return getWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single().getBody(); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param propertiesToInclude Additional web app properties included in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + public ServiceCall getAsync(String resourceGroupName, String name, String propertiesToInclude, final ServiceCallback serviceCallback) { + return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude), serviceCallback); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the SiteInner object */ - public Observable deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName) { - return deleteSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, Object>() { + public Observable getAsync(String resourceGroupName, String name, String propertiesToInclude) { + return getWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude).map(new Func1, SiteInner>() { @Override - public Object call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Get details of a web app. + * Get details of a web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the SiteInner object */ - public Observable> deleteSiteVNETConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String name, String propertiesToInclude) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteSiteVNETConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.get(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteVNETConnectionDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1492,275 +1696,261 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the VnetInfoInner object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the SiteInner object if successful. */ - public VnetInfoInner updateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { - return updateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().getBody(); + public SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().last().getBody(); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the observable for the request */ - public Observable updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { - return updateSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).map(new Func1, VnetInfoInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { @Override - public VnetInfoInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection - * @return the observable to the VnetInfoInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the observable for the request */ - public Observable> updateSiteVNETConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - Validator.validate(connectionEnvelope); - return service.updateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateSiteVNETConnectionDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + final Boolean skipDnsRegistration = null; + final Boolean skipCustomDomainVerification = null; + final Boolean forceDnsRegistration = null; + final String ttlInSeconds = null; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @param slot The name of the slot for this web app. - * @return the NetworkFeaturesInner object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the SiteInner object if successful. */ - public NetworkFeaturesInner getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) { - return getSiteNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).toBlocking().single().getBody(); + public SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @param slot The name of the slot for this web app. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot), serviceCallback); + public ServiceCall createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @param slot The name of the slot for this web app. - * @return the observable to the NetworkFeaturesInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable for the request */ - public Observable getSiteNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot) { - return getSiteNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).map(new Func1, NetworkFeaturesInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { @Override - public NetworkFeaturesInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @param slot The name of the slot for this web app. - * @return the observable to the NetworkFeaturesInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable for the request */ - public Observable> getSiteNetworkFeaturesSlotWithServiceResponseAsync(String resourceGroupName, String name, String view, String slot) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (view == null) { - throw new IllegalArgumentException("Parameter view is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - return service.getSiteNetworkFeaturesSlot(resourceGroupName, name, view, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSiteNetworkFeaturesSlotDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSiteNetworkFeaturesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @return the NetworkFeaturesInner object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the SiteInner object if successful. */ - public NetworkFeaturesInner getSiteNetworkFeatures(String resourceGroupName, String name, String view) { - return getSiteNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).toBlocking().single().getBody(); + public SiteInner beginCreateOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().single().getBody(); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view), serviceCallback); + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @return the observable to the NetworkFeaturesInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the observable to the SiteInner object */ - public Observable getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view) { - return getSiteNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).map(new Func1, NetworkFeaturesInner>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { @Override - public NetworkFeaturesInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves a view of all network features in use on this web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param view The type of view. This can either be "summary" or "detailed". - * @return the observable to the NetworkFeaturesInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @return the observable to the SiteInner object */ - public Observable> getSiteNetworkFeaturesWithServiceResponseAsync(String resourceGroupName, String name, String view) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (view == null) { - throw new IllegalArgumentException("Parameter view is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - return service.getSiteNetworkFeatures(resourceGroupName, name, view, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + final Boolean skipDnsRegistration = null; + final Boolean skipCustomDomainVerification = null; + final Boolean forceDnsRegistration = null; + final String ttlInSeconds = null; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteNetworkFeaturesDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1769,93 +1959,101 @@ public Observable> call(Response getSiteNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets the operation for a web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param operationId Id of an operation - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the SiteInner object if successful. */ - public Object getSiteOperationSlot(String resourceGroupName, String name, String operationId, String slot) { - return getSiteOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().getBody(); + public SiteInner beginCreateOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); } /** - * Gets the operation for a web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param operationId Id of an operation - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); + public ServiceCall beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); } /** - * Gets the operation for a web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param operationId Id of an operation - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable to the SiteInner object */ - public Observable getSiteOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot) { - return getSiteOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1, Object>() { + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { @Override - public Object call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the operation for a web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param operationId Id of an operation - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable to the SiteInner object */ - public Observable> getSiteOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - return service.getSiteOperationSlot(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteOperationSlotDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1864,48 +2062,49 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteOperationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the operation for a web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param operationId Id of an operation * @return the Object object if successful. */ - public Object getSiteOperation(String resourceGroupName, String name, String operationId) { - return getSiteOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); + public Object delete(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets the operation for a web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param operationId Id of an operation * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets the operation for a web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param operationId Id of an operation * @return the observable to the Object object */ - public Observable getSiteOperationAsync(String resourceGroupName, String name, String operationId) { - return getSiteOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String name) { + return deleteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -1914,35 +2113,33 @@ public Object call(ServiceResponse response) { } /** - * Gets the operation for a web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param operationId Id of an operation * @return the observable to the Object object */ - public Observable> getSiteOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (operationId == null) { - throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + final Boolean skipDnsRegistration = null; + return service.delete(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteOperationDelegate(response); + ServiceResponse clientResponse = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1951,48 +2148,50 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Swaps web app slots. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped * @return the Object object if successful. */ - public Object swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().last().getBody(); + public Object delete(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + return deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).toBlocking().single().getBody(); } /** - * Swaps web app slots. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + public ServiceCall deleteAsync(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration), serviceCallback); } /** - * Swaps web app slots. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable for the request + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped + * @return the observable to the Object object */ - public Observable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { + public Observable deleteAsync(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + return deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -2001,14 +2200,17 @@ public Object call(ServiceResponse response) { } /** - * Swaps web app slots. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable for the request + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped + * @return the observable to the Object object */ - public Observable> swapSlotWithProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2018,68 +2220,79 @@ public Observable> swapSlotWithProductionWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(slotSwapEntity); - Observable> observable = service.swapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.delete(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the Object object if successful. + * @return the CustomHostnameAnalysisResultInner object if successful. */ - public Object beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); + public CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + public ServiceCall analyzeCustomHostnameAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the Object object + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { + public Observable analyzeCustomHostnameAsync(String resourceGroupName, String name) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CustomHostnameAnalysisResultInner>() { @Override - public Object call(ServiceResponse response) { + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the Object object + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable> beginSwapSlotWithProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + public Observable> analyzeCustomHostnameWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2089,19 +2302,14 @@ public Observable> beginSwapSlotWithProductionWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(slotSwapEntity); - return service.beginSwapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String hostName = null; + return service.analyzeCustomHostname(resourceGroupName, name, this.client.subscriptionId(), hostName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginSwapSlotWithProductionDelegate(response); + ServiceResponse clientResponse = analyzeCustomHostnameDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2110,130 +2318,130 @@ public Observable> call(Response response) }); } - private ServiceResponse beginSwapSlotWithProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name - * @return the Object object if successful. + * @param hostName Custom hostname + * @return the CustomHostnameAnalysisResultInner object if successful. */ - public Object swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().last().getBody(); + public CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name, String hostName) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name + * @param hostName Custom hostname * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + public ServiceCall analyzeCustomHostnameAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable for the request + * @param hostName Custom hostname + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { + public Observable analyzeCustomHostnameAsync(String resourceGroupName, String name, String hostName) { + return analyzeCustomHostnameWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, CustomHostnameAnalysisResultInner>() { @Override - public Object call(ServiceResponse response) { + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Swaps web app slots. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable for the request + * @param hostName Custom hostname + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable> swapSlotsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + public Observable> analyzeCustomHostnameWithServiceResponseAsync(String resourceGroupName, String name, String hostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(slotSwapEntity); - Observable> observable = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.analyzeCustomHostname(resourceGroupName, name, this.client.subscriptionId(), hostName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = analyzeCustomHostnameDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse analyzeCustomHostnameDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Swaps web app slots. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @return the Object object if successful. */ - public Object beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().getBody(); + public Object applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); } /** - * Swaps web app slots. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + public ServiceCall applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); } /** - * Swaps web app slots. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @return the observable to the Object object */ - public Observable beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { + public Observable applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -2242,40 +2450,35 @@ public Object call(ServiceResponse response) { } /** - * Swaps web app slots. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of source slot for the swap - * @param slotSwapEntity Request body that contains the target slot name + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @return the observable to the Object object */ - public Observable> beginSwapSlotsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + public Observable> applySlotConfigToProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (slotSwapEntity == null) { throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(slotSwapEntity); - return service.beginSwapSlotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.applySlotConfigToProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginSwapSlotsSlotDelegate(response); + ServiceResponse clientResponse = applySlotConfigToProductionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2284,102 +2487,68 @@ public Observable> call(Response response) }); } - private ServiceResponse beginSwapSlotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse applySlotConfigToProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the difference in configuration settings between two web app slots. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the PagedList<SlotDifferenceInner> object if successful. + * @param request Information on backup request + * @return the BackupItemInner object if successful. */ - public PagedList getSlotsDifferencesFromProduction(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { - ServiceResponse> response = getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public BackupItemInner backup(String resourceGroupName, String name, BackupRequestInner request) { + return backupWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); } /** - * Get the difference in configuration settings between two web app slots. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSlotsDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall backupAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(backupWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); } /** - * Get the difference in configuration settings between two web app slots. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the PagedList<SlotDifferenceInner> object + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable> getSlotsDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { - return getSlotsDifferencesFromProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable backupAsync(String resourceGroupName, String name, BackupRequestInner request) { + return backupWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, BackupItemInner>() { + @Override + public BackupItemInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get the difference in configuration settings between two web app slots. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the PagedList<SlotDifferenceInner> object - */ - public Observable>> getSlotsDifferencesFromProductionWithServiceResponseAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { - return getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the difference in configuration settings between two web app slots. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slotSwapEntity Request body that contains the target slot name - * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable>> getSlotsDifferencesFromProductionSinglePageAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + public Observable> backupWithServiceResponseAsync(String resourceGroupName, String name, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2389,20 +2558,18 @@ public Observable>> getSlotsDifference if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(slotSwapEntity); - return service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.backup(resourceGroupName, name, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSlotsDifferencesFromProductionDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = backupDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2410,132 +2577,118 @@ public Observable>> call(Response> getSlotsDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse backupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the difference in configuration settings between two web app slots. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot - * @param slotSwapEntity Request body that contains the target slot name - * @return the PagedList<SlotDifferenceInner> object if successful. + * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList getSlotsDifferencesSlot(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { - ServiceResponse> response = getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listBackups(final String resourceGroupName, final String name) { + ServiceResponse> response = listBackupsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get the difference in configuration settings between two web app slots. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot - * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSlotsDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { + public ServiceCall> listBackupsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity), - new Func1>>>() { + listBackupsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get the difference in configuration settings between two web app slots. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<BackupItemInner> object */ - public Observable> getSlotsDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { - return getSlotsDifferencesSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity) - .map(new Func1>, Page>() { + public Observable> listBackupsAsync(final String resourceGroupName, final String name) { + return listBackupsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot - * @param slotSwapEntity Request body that contains the target slot name - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<BackupItemInner> object */ - public Observable>> getSlotsDifferencesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { - return getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listBackupsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listBackupsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listBackupsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Lists all available backups for web app. + * Lists all available backups for web app. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of the source slot - ServiceResponse> * @param slotSwapEntity Request body that contains the target slot name - * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSlotsDifferencesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + public Observable>> listBackupsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(slotSwapEntity); - return service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listBackups(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSlotsDifferencesSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listBackupsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -2543,64 +2696,68 @@ public Observable>> call(Response> getSlotsDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the Object object if successful. + * @param request Information on restore request + * @return the RestoreRequestInner object if successful. */ - public Object applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); + public RestoreRequestInner discoverRestore(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + public ServiceCall discoverRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the observable to the Object object + * @param request Information on restore request + * @return the observable to the RestoreRequestInner object */ - public Observable applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { - return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { + public Observable discoverRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverRestoreWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, RestoreRequestInner>() { @Override - public Object call(ServiceResponse response) { + public RestoreRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the observable to the Object object + * @param request Information on restore request + * @return the observable to the RestoreRequestInner object */ - public Observable> applySlotConfigToProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + public Observable> discoverRestoreWithServiceResponseAsync(String resourceGroupName, String name, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2610,19 +2767,17 @@ public Observable> applySlotConfigToProductionWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(slotSwapEntity); - return service.applySlotConfigToProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.discoverRestore(resourceGroupName, name, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = applySlotConfigToProductionDelegate(response); + ServiceResponse clientResponse = discoverRestoreDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2631,93 +2786,87 @@ public Observable> call(Response response) }); } - private ServiceResponse applySlotConfigToProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse discoverRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the Object object if successful. + * @param backupId Id of backup + * @return the BackupItemInner object if successful. */ - public Object applySlotConfigSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return applySlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().getBody(); + public BackupItemInner getBackupStatus(String resourceGroupName, String name, String backupId) { + return getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().getBody(); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @param backupId Id of backup * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(applySlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + public ServiceCall getBackupStatusAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the observable to the Object object + * @param backupId Id of backup + * @return the observable to the BackupItemInner object */ - public Observable applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { - return applySlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { + public Observable getBackupStatusAsync(String resourceGroupName, String name, String backupId) { + return getBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, BackupItemInner>() { @Override - public Object call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @return the observable to the Object object + * @param backupId Id of backup + * @return the observable to the BackupItemInner object */ - public Observable> applySlotConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + public Observable> getBackupStatusWithServiceResponseAsync(String resourceGroupName, String name, String backupId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotSwapEntity == null) { - throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(slotSwapEntity); - return service.applySlotConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getBackupStatus(resourceGroupName, name, backupId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = applySlotConfigSlotDelegate(response); + ServiceResponse clientResponse = getBackupStatusDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2726,78 +2875,87 @@ public Observable> call(Response response) }); } - private ServiceResponse applySlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getBackupStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the Object object if successful. + * @param backupId Id of backup + * @return the BackupItemInner object if successful. */ - public Object resetProductionSlotConfig(String resourceGroupName, String name) { - return resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public BackupItemInner deleteBackup(String resourceGroupName, String name, String backupId) { + return deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().getBody(); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall resetProductionSlotConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall deleteBackupAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object + * @param backupId Id of backup + * @return the observable to the BackupItemInner object */ - public Observable resetProductionSlotConfigAsync(String resourceGroupName, String name) { - return resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable deleteBackupAsync(String resourceGroupName, String name, String backupId) { + return deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, BackupItemInner>() { @Override - public Object call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object + * @param backupId Id of backup + * @return the observable to the BackupItemInner object */ - public Observable> resetProductionSlotConfigWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> deleteBackupWithServiceResponseAsync(String resourceGroupName, String name, String backupId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.resetProductionSlotConfig(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteBackup(resourceGroupName, name, backupId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = resetProductionSlotConfigDelegate(response); + ServiceResponse clientResponse = deleteBackupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2806,85 +2964,95 @@ public Observable> call(Response response) }); } - private ServiceResponse resetProductionSlotConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteBackupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param backupId Id of backup + * @param request Information on backup request + * @return the BackupItemInner object if successful. */ - public Object resetSlotConfigSlot(String resourceGroupName, String name, String slot) { - return resetSlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public BackupItemInner listBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param backupId Id of backup + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(resetSlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param backupId Id of backup + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot) { - return resetSlotConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, BackupItemInner>() { @Override - public Object call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param backupId Id of backup + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable> resetSlotConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> listBackupStatusSecretsWithServiceResponseAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - return service.resetSlotConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.listBackupStatusSecrets(resourceGroupName, name, backupId, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = resetSlotConfigSlotDelegate(response); + ServiceResponse clientResponse = listBackupStatusSecretsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2893,166 +3061,175 @@ public Observable> call(Response response) }); } - private ServiceResponse resetSlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the SlotConfigNamesResourceInner object if successful. + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the RestoreResponseInner object if successful. */ - public SlotConfigNamesResourceInner getSlotConfigNames(String resourceGroupName, String name) { - return getSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public RestoreResponseInner restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().last().getBody(); } /** - * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSlotConfigNamesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); } /** - * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SlotConfigNamesResourceInner object + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the observable for the request */ - public Observable getSlotConfigNamesAsync(String resourceGroupName, String name) { - return getSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SlotConfigNamesResourceInner>() { + public Observable restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { @Override - public SlotConfigNamesResourceInner call(ServiceResponse response) { + public RestoreResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SlotConfigNamesResourceInner object + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the observable for the request */ - public Observable> getSlotConfigNamesWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> restoreWithServiceResponseAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - return service.getSlotConfigNames(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSlotConfigNamesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(request); + final String apiVersion = "2016-08-01"; + Observable> observable = service.restore(resourceGroupName, name, backupId, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotConfigNames Request body containing the names of application settings and connection strings - * @return the SlotConfigNamesResourceInner object if successful. + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the RestoreResponseInner object if successful. */ - public SlotConfigNamesResourceInner updateSlotConfigNames(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { - return updateSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).toBlocking().single().getBody(); + public RestoreResponseInner beginRestore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotConfigNames Request body containing the names of application settings and connection strings + * @param backupId Id of backup to restore + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSlotConfigNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames), serviceCallback); + public ServiceCall beginRestoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotConfigNames Request body containing the names of application settings and connection strings - * @return the observable to the SlotConfigNamesResourceInner object + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the observable to the RestoreResponseInner object */ - public Observable updateSlotConfigNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { - return updateSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).map(new Func1, SlotConfigNamesResourceInner>() { + public Observable beginRestoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { @Override - public SlotConfigNamesResourceInner call(ServiceResponse response) { + public RestoreResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slotConfigNames Request body containing the names of application settings and connection strings - * @return the observable to the SlotConfigNamesResourceInner object + * @param backupId Id of backup to restore + * @param request Information on restore request + * @return the observable to the RestoreResponseInner object */ - public Observable> updateSlotConfigNamesWithServiceResponseAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + public Observable> beginRestoreWithServiceResponseAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (slotConfigNames == null) { - throw new IllegalArgumentException("Parameter slotConfigNames 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(slotConfigNames); - return service.updateSlotConfigNames(resourceGroupName, name, this.client.subscriptionId(), slotConfigNames, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.beginRestore(resourceGroupName, name, backupId, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSlotConfigNamesDelegate(response); + ServiceResponse clientResponse = beginRestoreDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3061,96 +3238,68 @@ public Observable> call(Response updateSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all the slots for a web apps. + * Updates the application settings of web app. + * Updates the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the PagedList<SiteInner> object if successful. + * @param appSettings Application settings of web app + * @return the StringDictionaryInner object if successful. */ - public PagedList getSiteSlots(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteSlotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public StringDictionaryInner updateApplicationSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) { + return updateApplicationSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).toBlocking().single().getBody(); } /** - * Gets all the slots for a web apps. + * Updates the application settings of web app. + * Updates the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param appSettings Application settings of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteSlotsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteSlotsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the slots for a web apps. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<SiteInner> object - */ - public Observable> getSiteSlotsAsync(final String resourceGroupName, final String name) { - return getSiteSlotsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall updateApplicationSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateApplicationSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings), serviceCallback); } /** - * Gets all the slots for a web apps. + * Updates the application settings of web app. + * Updates the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<SiteInner> object + * @param appSettings Application settings of web app + * @return the observable to the StringDictionaryInner object */ - public Observable>> getSiteSlotsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteSlotsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteSlotsNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable updateApplicationSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { + return updateApplicationSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets all the slots for a web apps. + * Updates the application settings of web app. + * Updates the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param appSettings Application settings of web app + * @return the observable to the StringDictionaryInner object */ - public Observable>> getSiteSlotsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> updateApplicationSettingsWithServiceResponseAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3160,17 +3309,18 @@ public Observable>> getSiteSlotsSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (appSettings == null) { + throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); } - final String propertiesToInclude = null; - return service.getSiteSlots(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(appSettings); + final String apiVersion = "2016-08-01"; + return service.updateApplicationSettings(resourceGroupName, name, this.client.subscriptionId(), appSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteSlotsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = updateApplicationSettingsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3178,94 +3328,64 @@ public Observable>> call(Response }); } + private ServiceResponse updateApplicationSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Gets all the slots for a web apps. + * Gets the application settings of web app. + * Gets the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude List of app properties to include in the response - * @return the PagedList<SiteInner> object if successful. + * @return the StringDictionaryInner object if successful. */ - public PagedList getSiteSlots(final String resourceGroupName, final String name, final String propertiesToInclude) { - ServiceResponse> response = getSiteSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public StringDictionaryInner listApplicationSettings(String resourceGroupName, String name) { + return listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets all the slots for a web apps. + * Gets the application settings of web app. + * Gets the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude List of app properties to include in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteSlotsAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listApplicationSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets all the slots for a web apps. + * Gets the application settings of web app. + * Gets the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude List of app properties to include in the response - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the StringDictionaryInner object */ - public Observable> getSiteSlotsAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getSiteSlotsWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listApplicationSettingsAsync(String resourceGroupName, String name) { + return listApplicationSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets all the slots for a web apps. + * Gets the application settings of web app. + * Gets the application settings of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude List of app properties to include in the response - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getSiteSlotsWithServiceResponseAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { - return getSiteSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteSlotsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the slots for a web apps. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param propertiesToInclude List of app properties to include in the response - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the StringDictionaryInner object */ - public Observable>> getSiteSlotsSinglePageAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + public Observable> listApplicationSettingsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3275,16 +3395,14 @@ public Observable>> getSiteSlotsSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteSlots(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listApplicationSettings(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteSlotsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listApplicationSettingsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3292,110 +3410,89 @@ public Observable>> call(Response }); } - private ServiceResponse> getSiteSlotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listApplicationSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web apps for a subscription in the specified resource group. + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @return the PagedList<SiteInner> object if successful. + * @param name Name of web app + * @param siteAuthSettings Auth settings associated with web app + * @return the SiteAuthSettingsInner object if successful. */ - public PagedList getSites(final String resourceGroupName) { - ServiceResponse> response = getSitesSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public SiteAuthSettingsInner updateAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).toBlocking().single().getBody(); } /** - * Gets the web apps for a subscription in the specified resource group. + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteAuthSettings Auth settings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSitesAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSitesSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall updateAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings), serviceCallback); } /** - * Gets the web apps for a subscription in the specified resource group. + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<SiteInner> object + * @param name Name of web app + * @param siteAuthSettings Auth settings associated with web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable> getSitesAsync(final String resourceGroupName) { - return getSitesWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets the web apps for a subscription in the specified resource group. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getSitesWithServiceResponseAsync(final String resourceGroupName) { - return getSitesSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable updateAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).map(new Func1, SiteAuthSettingsInner>() { + @Override + public SiteAuthSettingsInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the web apps for a subscription in the specified resource group. + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of web app + * @param siteAuthSettings Auth settings associated with web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable>> getSitesSinglePageAsync(final String resourceGroupName) { + public Observable> updateAuthSettingsWithServiceResponseAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteAuthSettings == null) { + throw new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null."); } - final String propertiesToInclude = null; - final String includeSiteTypes = null; - final Boolean includeSlots = null; - return service.getSites(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSiteTypes, includeSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(siteAuthSettings); + final String apiVersion = "2016-08-01"; + return service.updateAuthSettings(resourceGroupName, name, this.client.subscriptionId(), siteAuthSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = updateAuthSettingsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3403,115 +3500,81 @@ public Observable>> call(Response }); } + private ServiceResponse updateAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Gets the web apps for a subscription in the specified resource group. + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @param includeSlots Whether or not to include deployments slots in results - * @return the PagedList<SiteInner> object if successful. + * @param name Name of web app + * @return the SiteAuthSettingsInner object if successful. */ - public PagedList getSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) { - ServiceResponse> response = getSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes, includeSlots).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public SiteAuthSettingsInner listAuthSettings(String resourceGroupName, String name) { + return listAuthSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @param includeSlots Whether or not to include deployments slots in results + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSitesAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes, includeSlots), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listAuthSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listAuthSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @param includeSlots Whether or not to include deployments slots in results - * @return the observable to the PagedList<SiteInner> object + * @param name Name of web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable> getSitesAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) { - return getSitesWithServiceResponseAsync(resourceGroupName, propertiesToInclude, includeSiteTypes, includeSlots) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listAuthSettingsAsync(String resourceGroupName, String name) { + return listAuthSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteAuthSettingsInner>() { + @Override + public SiteAuthSettingsInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @param includeSlots Whether or not to include deployments slots in results - * @return the observable to the PagedList<SiteInner> object - */ - public Observable>> getSitesWithServiceResponseAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) { - return getSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes, includeSlots) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the web apps for a subscription in the specified resource group. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param propertiesToInclude Additional web app properties included in the response - ServiceResponse> * @param includeSiteTypes Types of apps included in the response - ServiceResponse> * @param includeSlots Whether or not to include deployments slots in results - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable>> getSitesSinglePageAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) { + public Observable> listAuthSettingsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSites(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSiteTypes, includeSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listAuthSettings(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listAuthSettingsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -3519,60 +3582,68 @@ public Observable>> call(Response }); } - private ServiceResponse> getSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get details of a web app. + * Updates backup configuration of web app. + * Updates backup configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the SiteInner object if successful. + * @param request Information on backup request + * @return the BackupRequestInner object if successful. */ - public SiteInner getSite(String resourceGroupName, String name) { - return getSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public BackupRequestInner updateBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); } /** - * Get details of a web app. + * Updates backup configuration of web app. + * Updates backup configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); } /** - * Get details of a web app. + * Updates backup configuration of web app. + * Updates backup configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SiteInner object + * @param request Information on backup request + * @return the observable to the BackupRequestInner object */ - public Observable getSiteAsync(String resourceGroupName, String name) { - return getSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteInner>() { + public Observable updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, BackupRequestInner>() { @Override - public SiteInner call(ServiceResponse response) { + public BackupRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get details of a web app. + * Updates backup configuration of web app. + * Updates backup configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SiteInner object + * @param request Information on backup request + * @return the observable to the BackupRequestInner object */ - public Observable> getSiteWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> updateBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3582,16 +3653,17 @@ public Observable> getSiteWithServiceResponseAsync(St if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - final String propertiesToInclude = null; - return service.getSite(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.updateBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteDelegate(response); + ServiceResponse clientResponse = updateBackupConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3600,57 +3672,64 @@ public Observable> call(Response respon }); } + private ServiceResponse updateBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get details of a web app. + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude Additional web app properties included in the response - * @return the SiteInner object if successful. + * @return the Object object if successful. */ - public SiteInner getSite(String resourceGroupName, String name, String propertiesToInclude) { - return getSiteWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single().getBody(); + public Object deleteBackupConfiguration(String resourceGroupName, String name) { + return deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get details of a web app. + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude Additional web app properties included in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteAsync(String resourceGroupName, String name, String propertiesToInclude, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude), serviceCallback); + public ServiceCall deleteBackupConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get details of a web app. + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude Additional web app properties included in the response - * @return the observable to the SiteInner object + * @return the observable to the Object object */ - public Observable getSiteAsync(String resourceGroupName, String name, String propertiesToInclude) { - return getSiteWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude).map(new Func1, SiteInner>() { + public Observable deleteBackupConfigurationAsync(String resourceGroupName, String name) { + return deleteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override - public SiteInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get details of a web app. + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param propertiesToInclude Additional web app properties included in the response - * @return the observable to the SiteInner object + * @return the observable to the Object object */ - public Observable> getSiteWithServiceResponseAsync(String resourceGroupName, String name, String propertiesToInclude) { + public Observable> deleteBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3660,15 +3739,13 @@ public Observable> getSiteWithServiceResponseAsync(St if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSite(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteDelegate(response); + ServiceResponse clientResponse = deleteBackupConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3677,64 +3754,64 @@ public Observable> call(Response respon }); } - private ServiceResponse getSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new web app or modifies an existing web app. + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the BackupRequestInner object if successful. */ - public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) { - return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().last().getBody(); + public BackupRequestInner getBackupConfiguration(String resourceGroupName, String name) { + return getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); + public ServiceCall getBackupConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the BackupRequestInner object */ - public Observable createOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { - return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { + public Observable getBackupConfigurationAsync(String resourceGroupName, String name) { + return getBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, BackupRequestInner>() { @Override - public SiteInner call(ServiceResponse response) { + public BackupRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the BackupRequestInner object */ - public Observable> createOrUpdateSiteWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + public Observable> getBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3744,91 +3821,83 @@ public Observable> createOrUpdateSiteWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteEnvelope); - final String skipDnsRegistration = null; - final String skipCustomDomainVerification = null; - final String forceDnsRegistration = null; - final String ttlInSeconds = null; - Observable> observable = service.createOrUpdateSite(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Creates a new web app or modifies an existing web app. - * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the SiteInner object if successful. + final String apiVersion = "2016-08-01"; + return service.getBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param connectionStrings Connection strings associated with web app + * @return the ConnectionStringDictionaryInner object if successful. */ - public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); + public ConnectionStringDictionaryInner updateConnectionStrings(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param connectionStrings Connection strings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + public ServiceCall updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param connectionStrings Connection strings associated with web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable createOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + public Observable updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { @Override - public SiteInner call(ServiceResponse response) { + public ConnectionStringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param connectionStrings Connection strings associated with web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable> createOrUpdateSiteWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { + public Observable> updateConnectionStringsWithServiceResponseAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3838,68 +3907,83 @@ public Observable> createOrUpdateSiteWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope 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 (connectionStrings == null) { + throw new IllegalArgumentException("Parameter connectionStrings is required and cannot be null."); } - Validator.validate(siteEnvelope); - Observable> observable = service.createOrUpdateSite(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + Validator.validate(connectionStrings); + final String apiVersion = "2016-08-01"; + return service.updateConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), connectionStrings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateConnectionStringsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Creates a new web app or modifies an existing web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the ConnectionStringDictionaryInner object if successful. */ - public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) { - return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().single().getBody(); + public ConnectionStringDictionaryInner listConnectionStrings(String resourceGroupName, String name) { + return listConnectionStringsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginCreateOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope), serviceCallback); + public ServiceCall listConnectionStringsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listConnectionStringsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable beginCreateOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { - return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).map(new Func1, SiteInner>() { + public Observable listConnectionStringsAsync(String resourceGroupName, String name) { + return listConnectionStringsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ConnectionStringDictionaryInner>() { @Override - public SiteInner call(ServiceResponse response) { + public ConnectionStringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable> beginCreateOrUpdateSiteWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + public Observable> listConnectionStringsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3909,23 +3993,13 @@ public Observable> beginCreateOrUpdateSiteWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteEnvelope); - final String skipDnsRegistration = null; - final String skipCustomDomainVerification = null; - final String forceDnsRegistration = null; - final String ttlInSeconds = null; - return service.beginCreateOrUpdateSite(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateSiteDelegate(response); + ServiceResponse clientResponse = listConnectionStringsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3934,77 +4008,64 @@ public Observable> call(Response respon }); } + private ServiceResponse listConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Creates a new web app or modifies an existing web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the SiteLogsConfigInner object if successful. */ - public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); + public SiteLogsConfigInner getDiagnosticLogsConfiguration(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginCreateOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + public ServiceCall getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteLogsConfigInner object */ - public Observable beginCreateOrUpdateSiteAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + public Observable getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteLogsConfigInner>() { @Override - public SiteInner call(ServiceResponse response) { + public SiteLogsConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteLogsConfigInner object */ - public Observable> beginCreateOrUpdateSiteWithServiceResponseAsync(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { + public Observable> getDiagnosticLogsConfigurationWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4014,19 +4075,13 @@ public Observable> beginCreateOrUpdateSiteWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteEnvelope); - return service.beginCreateOrUpdateSite(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getDiagnosticLogsConfiguration(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateSiteDelegate(response); + ServiceResponse clientResponse = getDiagnosticLogsConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4035,61 +4090,68 @@ public Observable> call(Response respon }); } - private ServiceResponse beginCreateOrUpdateSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse getDiagnosticLogsConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the Object object if successful. + * @param siteLogsConfig Site logs configuration + * @return the SiteLogsConfigInner object if successful. */ - public Object deleteSite(String resourceGroupName, String name) { - return deleteSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public SiteLogsConfigInner updateDiagnosticLogsConfig(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).toBlocking().single().getBody(); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param siteLogsConfig Site logs configuration * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig), serviceCallback); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object + * @param siteLogsConfig Site logs configuration + * @return the observable to the SiteLogsConfigInner object */ - public Observable deleteSiteAsync(String resourceGroupName, String name) { - return deleteSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { @Override - public Object call(ServiceResponse response) { + public SiteLogsConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object - */ - public Observable> deleteSiteWithServiceResponseAsync(String resourceGroupName, String name) { + * @param siteLogsConfig Site logs configuration + * @return the observable to the SiteLogsConfigInner object + */ + public Observable> updateDiagnosticLogsConfigWithServiceResponseAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4099,19 +4161,17 @@ public Observable> deleteSiteWithServiceResponseAsync(St if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteLogsConfig == null) { + throw new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null."); } - final String deleteMetrics = null; - final String deleteEmptyServerFarm = null; - final String skipDnsRegistration = null; - final String deleteAllSlots = null; - return service.deleteSite(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteLogsConfig); + final String apiVersion = "2016-08-01"; + return service.updateDiagnosticLogsConfig(resourceGroupName, name, this.client.subscriptionId(), siteLogsConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteDelegate(response); + ServiceResponse clientResponse = updateDiagnosticLogsConfigDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4120,69 +4180,68 @@ public Observable> call(Response response) }); } + private ServiceResponse updateDiagnosticLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the Object object if successful. + * @param metadata Meta data of web app + * @return the StringDictionaryInner object if successful. */ - public Object deleteSite(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { - return deleteSiteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).toBlocking().single().getBody(); + public StringDictionaryInner updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).toBlocking().single().getBody(); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted + * @param metadata Meta data of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteAsync(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots), serviceCallback); + public ServiceCall updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata), serviceCallback); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the observable to the Object object + * @param metadata Meta data of web app + * @return the observable to the StringDictionaryInner object */ - public Observable deleteSiteAsync(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { - return deleteSiteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).map(new Func1, Object>() { + public Observable updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).map(new Func1, StringDictionaryInner>() { @Override - public Object call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the observable to the Object object + * @param metadata Meta data of web app + * @return the observable to the StringDictionaryInner object */ - public Observable> deleteSiteWithServiceResponseAsync(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { + public Observable> updateMetadataWithServiceResponseAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4192,15 +4251,17 @@ public Observable> deleteSiteWithServiceResponseAsync(St if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (metadata == null) { + throw new IllegalArgumentException("Parameter metadata is required and cannot be null."); } - return service.deleteSite(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(metadata); + final String apiVersion = "2016-08-01"; + return service.updateMetadata(resourceGroupName, name, this.client.subscriptionId(), metadata, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteDelegate(response); + ServiceResponse clientResponse = updateMetadataDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4209,86 +4270,80 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get details of a web app. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteInner object if successful. + * @return the StringDictionaryInner object if successful. */ - public SiteInner getSiteSlot(String resourceGroupName, String name, String slot) { - return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public StringDictionaryInner listMetadata(String resourceGroupName, String name) { + return listMetadataWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get details of a web app. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall listMetadataAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMetadataWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get details of a web app. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteInner object + * @return the observable to the StringDictionaryInner object */ - public Observable getSiteSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteInner>() { + public Observable listMetadataAsync(String resourceGroupName, String name) { + return listMetadataWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { @Override - public SiteInner call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get details of a web app. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteInner object + * @return the observable to the StringDictionaryInner object */ - public Observable> getSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> listMetadataWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String propertiesToInclude = null; - return service.getSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listMetadata(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSlotDelegate(response); + ServiceResponse clientResponse = listMetadataDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4297,82 +4352,145 @@ public Observable> call(Response respon }); } + private ServiceResponse listMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get details of a web app. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param propertiesToInclude Additional web app properties included in the response - * @return the SiteInner object if successful. + * @return the UserInner object if successful. */ - public SiteInner getSiteSlot(String resourceGroupName, String name, String slot, String propertiesToInclude) { - return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude).toBlocking().single().getBody(); + public UserInner listPublishingCredentials(String resourceGroupName, String name) { + return listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } /** - * Get details of a web app. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param propertiesToInclude Additional web app properties included in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSlotAsync(String resourceGroupName, String name, String slot, String propertiesToInclude, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude), serviceCallback); + public ServiceCall listPublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get details of a web app. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param propertiesToInclude Additional web app properties included in the response - * @return the observable to the SiteInner object + * @return the observable for the request */ - public Observable getSiteSlotAsync(String resourceGroupName, String name, String slot, String propertiesToInclude) { - return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude).map(new Func1, SiteInner>() { + public Observable listPublishingCredentialsAsync(String resourceGroupName, String name) { + return listPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, UserInner>() { @Override - public SiteInner call(ServiceResponse response) { + public UserInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get details of a web app. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param propertiesToInclude Additional web app properties included in the response - * @return the observable to the SiteInner object + * @return the observable for the request */ - public Observable> getSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String propertiesToInclude) { + public Observable> listPublishingCredentialsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + final String apiVersion = "2016-08-01"; + Observable> observable = service.listPublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the UserInner object if successful. + */ + public UserInner beginListPublishingCredentials(String resourceGroupName, String name) { + return beginListPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginListPublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginListPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the UserInner object + */ + public Observable beginListPublishingCredentialsAsync(String resourceGroupName, String name) { + return beginListPublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the UserInner object + */ + public Observable> beginListPublishingCredentialsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - return service.getSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.beginListPublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSlotDelegate(response); + ServiceResponse clientResponse = beginListPublishingCredentialsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4381,276 +4499,252 @@ public Observable> call(Response respon }); } - private ServiceResponse getSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginListPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new web app or modifies an existing web app. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param pushSettings Push settings associated with web app + * @return the PushSettingsInner object if successful. */ - public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().last().getBody(); + public PushSettingsInner updateSitePushSettings(String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param pushSettings Push settings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); + public ServiceCall updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param pushSettings Push settings associated with web app + * @return the observable to the PushSettingsInner object */ - public Observable createOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { + public Observable updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsWithServiceResponseAsync(resourceGroupName, name, pushSettings).map(new Func1, PushSettingsInner>() { @Override - public SiteInner call(ServiceResponse response) { + public PushSettingsInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param pushSettings Push settings associated with web app + * @return the observable to the PushSettingsInner object */ - public Observable> createOrUpdateSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + public Observable> updateSitePushSettingsWithServiceResponseAsync(String resourceGroupName, String name, PushSettingsInner pushSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope 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 (pushSettings == null) { + throw new IllegalArgumentException("Parameter pushSettings is required and cannot be null."); } - Validator.validate(siteEnvelope); - final String skipDnsRegistration = null; - final String skipCustomDomainVerification = null; - final String forceDnsRegistration = null; - final String ttlInSeconds = null; - Observable> observable = service.createOrUpdateSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + Validator.validate(pushSettings); + final String apiVersion = "2016-08-01"; + return service.updateSitePushSettings(resourceGroupName, name, this.client.subscriptionId(), pushSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSitePushSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSitePushSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } + /** - * Creates a new web app or modifies an existing web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PushSettingsInner object if successful. */ - public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); + public PushSettingsInner listSitePushSettings(String resourceGroupName, String name) { + return listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + public ServiceCall listSitePushSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PushSettingsInner object */ - public Observable createOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + public Observable listSitePushSettingsAsync(String resourceGroupName, String name) { + return listSitePushSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, PushSettingsInner>() { @Override - public SiteInner call(ServiceResponse response) { + public PushSettingsInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable for the request + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PushSettingsInner object */ - public Observable> createOrUpdateSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { + public Observable> listSitePushSettingsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteEnvelope); - Observable> observable = service.createOrUpdateSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.listSitePushSettings(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSitePushSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSitePushSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Creates a new web app or modifies an existing web app. + * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the SlotConfigNamesResourceInner object if successful. */ - public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().single().getBody(); + public SlotConfigNamesResourceInner listSlotConfigurationNames(String resourceGroupName, String name) { + return listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginCreateOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); + public ServiceCall listSlotConfigurationNamesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SlotConfigNamesResourceInner object */ - public Observable beginCreateOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { - return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { + public Observable listSlotConfigurationNamesAsync(String resourceGroupName, String name) { + return listSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SlotConfigNamesResourceInner>() { @Override - public SiteInner call(ServiceResponse response) { + public SlotConfigNamesResourceInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SlotConfigNamesResourceInner object */ - public Observable> beginCreateOrUpdateSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + public Observable> listSlotConfigurationNamesWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteEnvelope); - final String skipDnsRegistration = null; - final String skipCustomDomainVerification = null; - final String forceDnsRegistration = null; - final String ttlInSeconds = null; - return service.beginCreateOrUpdateSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listSlotConfigurationNames(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateSiteSlotDelegate(response); + ServiceResponse clientResponse = listSlotConfigurationNamesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4659,106 +4753,88 @@ public Observable> call(Response respon }); } + private ServiceResponse listSlotConfigurationNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Creates a new web app or modifies an existing web app. + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Updates the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the SiteInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotConfigNames Request body containing the names of application settings and connection strings + * @return the SlotConfigNamesResourceInner object if successful. */ - public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); + public SlotConfigNamesResourceInner updateSlotConfigurationNames(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Updates the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotConfigNames Request body containing the names of application settings and connection strings * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginCreateOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); + public ServiceCall updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Updates the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotConfigNames Request body containing the names of application settings and connection strings + * @return the observable to the SlotConfigNamesResourceInner object */ - public Observable beginCreateOrUpdateSiteSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { - return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { + public Observable updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).map(new Func1, SlotConfigNamesResourceInner>() { @Override - public SiteInner call(ServiceResponse response) { + public SlotConfigNamesResourceInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Updates the names of application settings and connection string that remain with the slot during swap operation. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteEnvelope Details of web app if it exists already - * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation - * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. - * @param forceDnsRegistration If true, web app hostname is force registered with DNS - * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @return the observable to the SiteInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotConfigNames Request body containing the names of application settings and connection strings + * @return the observable to the SlotConfigNamesResourceInner object */ - public Observable> beginCreateOrUpdateSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { + public Observable> updateSlotConfigurationNamesWithServiceResponseAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteEnvelope == null) { - throw new IllegalArgumentException("Parameter siteEnvelope 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 (slotConfigNames == null) { + throw new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null."); } - Validator.validate(siteEnvelope); - return service.beginCreateOrUpdateSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(slotConfigNames); + final String apiVersion = "2016-08-01"; + return service.updateSlotConfigurationNames(resourceGroupName, name, this.client.subscriptionId(), slotConfigNames, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateOrUpdateSiteSlotDelegate(response); + ServiceResponse clientResponse = updateSlotConfigurationNamesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4767,90 +4843,80 @@ public Observable> call(Response respon }); } - private ServiceResponse beginCreateOrUpdateSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) + private ServiceResponse updateSlotConfigurationNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Deletes a web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @return the SiteConfigInner object if successful. */ - public Object deleteSiteSlot(String resourceGroupName, String name, String slot) { - return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public SiteConfigInner getConfiguration(String resourceGroupName, String name) { + return getConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Deletes a web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall getConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Deletes a web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @return the observable to the SiteConfigInner object */ - public Observable deleteSiteSlotAsync(String resourceGroupName, String name, String slot) { - return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable getConfigurationAsync(String resourceGroupName, String name) { + return getConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteConfigInner>() { @Override - public Object call(ServiceResponse response) { + public SiteConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @return the observable to the SiteConfigInner object */ - public Observable> deleteSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> getConfigurationWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String deleteMetrics = null; - final String deleteEmptyServerFarm = null; - final String skipDnsRegistration = null; - final String deleteAllSlots = null; - return service.deleteSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getConfiguration(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteSlotDelegate(response); + ServiceResponse clientResponse = getConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4859,94 +4925,88 @@ public Observable> call(Response response) }); } + private ServiceResponse getConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Deletes a web app. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the Object object if successful. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the SiteConfigInner object if successful. */ - public Object deleteSiteSlot(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { - return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).toBlocking().single().getBody(); + public SiteConfigInner createOrUpdateConfiguration(String resourceGroupName, String name, SiteConfigInner siteConfig) { + return createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().getBody(); } /** - * Deletes a web app. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted + * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteSlotAsync(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots), serviceCallback); + public ServiceCall createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); } /** - * Deletes a web app. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the observable to the Object object + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable deleteSiteSlotAsync(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { - return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).map(new Func1, Object>() { + public Observable createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { + return createOrUpdateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigInner>() { @Override - public Object call(ServiceResponse response) { + public SiteConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a web app. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deleteMetrics If true, web app metrics are also deleted - * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted - * @param skipDnsRegistration If true, DNS registration is skipped - * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @return the observable to the Object object + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable> deleteSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { + public Observable> createOrUpdateConfigurationWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); } - return service.deleteSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteConfig); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateConfiguration(resourceGroupName, name, this.client.subscriptionId(), siteConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteSlotDelegate(response); + ServiceResponse clientResponse = createOrUpdateConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -4955,60 +5015,68 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new web app or modifies an existing web app. + * Update the configuration of web app. + * Update the configuration of web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @return the SiteCloneabilityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the SiteConfigInner object if successful. */ - public SiteCloneabilityInner isSiteCloneable(String resourceGroupName, String name) { - return isSiteCloneableWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public SiteConfigInner updateConfiguration(String resourceGroupName, String name, SiteConfigInner siteConfig) { + return updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().getBody(); } /** - * Creates a new web app or modifies an existing web app. + * Update the configuration of web app. + * Update the configuration of web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall isSiteCloneableAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(isSiteCloneableWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall updateConfigurationAsync(String resourceGroupName, String name, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); } /** - * Creates a new web app or modifies an existing web app. + * Update the configuration of web app. + * Update the configuration of web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @return the observable to the SiteCloneabilityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable isSiteCloneableAsync(String resourceGroupName, String name) { - return isSiteCloneableWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteCloneabilityInner>() { + public Observable updateConfigurationAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { + return updateConfigurationWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigInner>() { @Override - public SiteCloneabilityInner call(ServiceResponse response) { + public SiteConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new web app or modifies an existing web app. + * Update the configuration of web app. + * Update the configuration of web app. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @return the observable to the SiteCloneabilityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable> isSiteCloneableWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> updateConfigurationWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -5018,15 +5086,17 @@ public Observable> isSiteCloneableWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); } - return service.isSiteCloneable(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteConfig); + final String apiVersion = "2016-08-01"; + return service.updateConfiguration(resourceGroupName, name, this.client.subscriptionId(), siteConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = isSiteCloneableDelegate(response); + ServiceResponse clientResponse = updateConfigurationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -5035,86 +5105,118 @@ public Observable> call(Response isSiteCloneableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new web app or modifies an existing web app. + * List deployments. + * List deployments. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteCloneabilityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PagedList<DeploymentInner> object if successful. */ - public SiteCloneabilityInner isSiteCloneableSlot(String resourceGroupName, String name, String slot) { - return isSiteCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public PagedList listDeployments(final String resourceGroupName, final String name) { + ServiceResponse> response = listDeploymentsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Creates a new web app or modifies an existing web app. + * List deployments. + * List deployments. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName Name of resource group + * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall isSiteCloneableSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(isSiteCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall> listDeploymentsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeploymentsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List deployments. + * List deployments. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable> listDeploymentsAsync(final String resourceGroupName, final String name) { + return listDeploymentsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Creates a new web app or modifies an existing web app. + * List deployments. + * List deployments. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteCloneabilityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable isSiteCloneableSlotAsync(String resourceGroupName, String name, String slot) { - return isSiteCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteCloneabilityInner>() { - @Override - public SiteCloneabilityInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listDeploymentsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Creates a new web app or modifies an existing web app. + * List deployments. + * List deployments. * - * @param resourceGroupName Name of the resource group - * @param name Name of the web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteCloneabilityInner object + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> isSiteCloneableSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable>> listDeploymentsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.isSiteCloneableSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listDeployments(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = isSiteCloneableSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5122,157 +5224,184 @@ public Observable> call(Response isSiteCloneableSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Recovers a deleted web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the SiteInner object if successful. + * @param id Id of the deployment + * @return the DeploymentInner object if successful. */ - public SiteInner recoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { - return recoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().last().getBody(); + public DeploymentInner getDeployment(String resourceGroupName, String name, String id) { + return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().getBody(); } /** - * Recovers a deleted web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @param id Id of the deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall recoverSiteAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(recoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); + public ServiceCall getDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { + return ServiceCall.create(getDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); } /** - * Recovers a deleted web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable for the request + * @param id Id of the deployment + * @return the observable to the DeploymentInner object */ - public Observable recoverSiteAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { - return recoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, SiteInner>() { + public Observable getDeploymentAsync(String resourceGroupName, String name, String id) { + return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, DeploymentInner>() { @Override - public SiteInner call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Recovers a deleted web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable for the request + * @param id Id of the deployment + * @return the observable to the DeploymentInner object */ - public Observable> recoverSiteWithServiceResponseAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + public Observable> getDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (recoveryEntity == null) { - throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(recoveryEntity); - Observable> observable = service.recoverSite(resourceGroupName, name, this.client.subscriptionId(), recoveryEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.getDeployment(resourceGroupName, name, id, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDeploymentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } - /** - * Recovers a deleted web app. - * - * @param resourceGroupName Name of resource group + private ServiceResponse getDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Create a deployment. + * Create a deployment. + * + * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the SiteInner object if successful. + * @param id Id of the deployment + * @param deployment Details of deployment + * @return the DeploymentInner object if successful. */ - public SiteInner beginRecoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { - return beginRecoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().single().getBody(); + public DeploymentInner createDeployment(String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).toBlocking().single().getBody(); } /** - * Recovers a deleted web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @param id Id of the deployment + * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginRecoverSiteAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginRecoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); + public ServiceCall createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceCall.create(createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment), serviceCallback); } /** - * Recovers a deleted web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable to the SiteInner object + * @param id Id of the deployment + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable beginRecoverSiteAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { - return beginRecoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, SiteInner>() { + public Observable createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).map(new Func1, DeploymentInner>() { @Override - public SiteInner call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Recovers a deleted web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable to the SiteInner object + * @param id Id of the deployment + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable> beginRecoverSiteWithServiceResponseAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + public Observable> createDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, DeploymentInner deployment) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (recoveryEntity == null) { - throw new IllegalArgumentException("Parameter recoveryEntity 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 (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); } - Validator.validate(recoveryEntity); - return service.beginRecoverSite(resourceGroupName, name, this.client.subscriptionId(), recoveryEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(deployment); + final String apiVersion = "2016-08-01"; + return service.createDeployment(resourceGroupName, name, id, this.client.subscriptionId(), deployment, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRecoverSiteDelegate(response); + ServiceResponse clientResponse = createDeploymentDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -5281,173 +5410,207 @@ public Observable> call(Response respon }); } - private ServiceResponse beginRecoverSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) + private ServiceResponse createDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Recovers a deleted web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the SiteInner object if successful. + * @param id Id of the deployment + * @return the Object object if successful. */ - public SiteInner recoverSiteSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { - return recoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().last().getBody(); + public Object deleteDeployment(String resourceGroupName, String name, String id) { + return deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().getBody(); } /** - * Recovers a deleted web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @param id Id of the deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall recoverSiteSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(recoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); + public ServiceCall deleteDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); } /** - * Recovers a deleted web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable for the request + * @param id Id of the deployment + * @return the observable to the Object object */ - public Observable recoverSiteSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { - return recoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, SiteInner>() { + public Observable deleteDeploymentAsync(String resourceGroupName, String name, String id) { + return deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, Object>() { @Override - public SiteInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Recovers a deleted web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable for the request + * @param id Id of the deployment + * @return the observable to the Object object */ - public Observable> recoverSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + public Observable> deleteDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (recoveryEntity == null) { - throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(recoveryEntity); - Observable> observable = service.recoverSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), recoveryEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.deleteDeployment(resourceGroupName, name, id, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDeploymentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Recovers a deleted web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the SiteInner object if successful. + * @return the PagedList<HostNameBindingInner> object if successful. */ - public SiteInner beginRecoverSiteSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { - return beginRecoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().single().getBody(); + public PagedList listHostNameBindings(final String resourceGroupName, final String name) { + ServiceResponse> response = listHostNameBindingsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Recovers a deleted web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginRecoverSiteSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginRecoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); + public ServiceCall> listHostNameBindingsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listHostNameBindingsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Recovers a deleted web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable to the SiteInner object + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable beginRecoverSiteSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { - return beginRecoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, SiteInner>() { - @Override - public SiteInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listHostNameBindingsAsync(final String resourceGroupName, final String name) { + return listHostNameBindingsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Recovers a deleted web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @return the observable to the SiteInner object + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable>> listHostNameBindingsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listHostNameBindingsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get web app hostname bindings. + * Get web app hostname bindings. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginRecoverSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + public Observable>> listHostNameBindingsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (recoveryEntity == null) { - throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(recoveryEntity); - return service.beginRecoverSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), recoveryEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listHostNameBindings(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginRecoverSiteSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listHostNameBindingsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -5455,79 +5618,87 @@ public Observable> call(Response respon }); } - private ServiceResponse beginRecoverSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) + private ServiceResponse> listHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Returns all Snapshots to the user. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * - * @param resourceGroupName Webspace - * @param name Website Name - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @return the HostNameBindingInner object if successful. */ - public Object getSiteSnapshots(String resourceGroupName, String name) { - return getSiteSnapshotsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public HostNameBindingInner getHostNameBinding(String resourceGroupName, String name, String hostName) { + return getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); } /** - * Returns all Snapshots to the user. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * - * @param resourceGroupName Webspace - * @param name Website Name + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSnapshotsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSnapshotsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); } /** - * Returns all Snapshots to the user. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * - * @param resourceGroupName Webspace - * @param name Website Name - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @return the observable to the HostNameBindingInner object */ - public Observable getSiteSnapshotsAsync(String resourceGroupName, String name) { - return getSiteSnapshotsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable getHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + return getHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, HostNameBindingInner>() { @Override - public Object call(ServiceResponse response) { + public HostNameBindingInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Returns all Snapshots to the user. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * - * @param resourceGroupName Webspace - * @param name Website Name - * @return the observable to the Object object - */ - public Observable> getSiteSnapshotsWithServiceResponseAsync(String resourceGroupName, String name) { - if (resourceGroupName == null) { + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @return the observable to the HostNameBindingInner object + */ + public Observable> getHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName) { + if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteSnapshots(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSnapshotsDelegate(response); + ServiceResponse clientResponse = getHostNameBindingDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -5536,85 +5707,95 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteSnapshotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Returns all Snapshots to the user. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * - * @param resourceGroupName Webspace - * @param name Website Name - * @param slot Website Slot - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @param hostNameBinding Host name binding information + * @return the HostNameBindingInner object if successful. */ - public Object getSiteSnapshotsSlot(String resourceGroupName, String name, String slot) { - return getSiteSnapshotsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public HostNameBindingInner createOrUpdateHostNameBinding(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).toBlocking().single().getBody(); } /** - * Returns all Snapshots to the user. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * - * @param resourceGroupName Webspace - * @param name Website Name - * @param slot Website Slot + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @param hostNameBinding Host name binding information * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSnapshotsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSnapshotsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall createOrUpdateHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding), serviceCallback); } /** - * Returns all Snapshots to the user. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * - * @param resourceGroupName Webspace - * @param name Website Name - * @param slot Website Slot - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @param hostNameBinding Host name binding information + * @return the observable to the HostNameBindingInner object */ - public Observable getSiteSnapshotsSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteSnapshotsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable createOrUpdateHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).map(new Func1, HostNameBindingInner>() { @Override - public Object call(ServiceResponse response) { + public HostNameBindingInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Returns all Snapshots to the user. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * - * @param resourceGroupName Webspace - * @param name Website Name - * @param slot Website Slot - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host + * @param hostNameBinding Host name binding information + * @return the observable to the HostNameBindingInner object */ - public Observable> getSiteSnapshotsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> createOrUpdateHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (hostNameBinding == null) { + throw new IllegalArgumentException("Parameter hostNameBinding is required and cannot be null."); } - return service.getSiteSnapshotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(hostNameBinding); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), hostNameBinding, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSnapshotsSlotDelegate(response); + ServiceResponse clientResponse = createOrUpdateHostNameBindingDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -5623,109 +5804,88 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteSnapshotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets deleted web apps in subscription. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group - * @return the PagedList<DeletedSiteInner> object if successful. + * @param name Name of web app + * @param hostName Name of host + * @return the Object object if successful. */ - public PagedList getDeletedSites(final String resourceGroupName) { - ServiceResponse> response = getDeletedSitesSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object deleteHostNameBinding(String resourceGroupName, String name, String hostName) { + return deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); } /** - * Gets deleted web apps in subscription. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param hostName Name of host * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeletedSitesAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getDeletedSitesSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets deleted web apps in subscription. - * - * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<DeletedSiteInner> object - */ - public Observable> getDeletedSitesAsync(final String resourceGroupName) { - return getDeletedSitesWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); } /** - * Gets deleted web apps in subscription. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group - * @return the observable to the PagedList<DeletedSiteInner> object + * @param name Name of web app + * @param hostName Name of host + * @return the observable to the Object object */ - public Observable>> getDeletedSitesWithServiceResponseAsync(final String resourceGroupName) { - return getDeletedSitesSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getDeletedSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + return deleteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets deleted web apps in subscription. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group - * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param name Name of web app + * @param hostName Name of host + * @return the observable to the Object object */ - public Observable>> getDeletedSitesSinglePageAsync(final String resourceGroupName) { + public Observable> deleteHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String propertiesToInclude = null; - final String includeSiteTypes = null; - return service.getDeletedSites(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSiteTypes, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.deleteHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getDeletedSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = deleteHostNameBindingDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -5733,110 +5893,95 @@ public Observable>> call(Response getDeletedSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) { - ServiceResponse> response = getDeletedSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + private ServiceResponse deleteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Gets deleted web apps in subscription. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the HybridConnectionInner object if successful. */ - public ServiceCall> getDeletedSitesAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getDeletedSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public HybridConnectionInner getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); } /** - * Gets deleted web apps in subscription. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @return the observable to the PagedList<DeletedSiteInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public Observable> getDeletedSitesAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) { - return getDeletedSitesWithServiceResponseAsync(resourceGroupName, propertiesToInclude, includeSiteTypes) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); } /** - * Gets deleted web apps in subscription. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param propertiesToInclude Additional web app properties included in the response - * @param includeSiteTypes Types of apps included in the response - * @return the observable to the PagedList<DeletedSiteInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getDeletedSitesWithServiceResponseAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) { - return getDeletedSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getDeletedSitesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets deleted web apps in subscription. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param propertiesToInclude Additional web app properties included in the response - ServiceResponse> * @param includeSiteTypes Types of apps included in the response - * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getDeletedSitesSinglePageAsync(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) { + public Observable> getHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getDeletedSites(resourceGroupName, this.client.subscriptionId(), propertiesToInclude, includeSiteTypes, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.getHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getDeletedSitesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = getHybridConnectionDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -5844,115 +5989,103 @@ public Observable>> call(Response> getDeletedSitesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<DeploymentInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the HybridConnectionInner object if successful. */ - public PagedList getDeployments(final String resourceGroupName, final String name) { - ServiceResponse> response = getDeploymentsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public HybridConnectionInner createOrUpdateHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).toBlocking().single().getBody(); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeploymentsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getDeploymentsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getDeploymentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List deployments. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<DeploymentInner> object - */ - public Observable> getDeploymentsAsync(final String resourceGroupName, final String name) { - return getDeploymentsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall createOrUpdateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope), serviceCallback); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<DeploymentInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getDeploymentsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getDeploymentsNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable createOrUpdateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getDeploymentsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> createOrUpdateHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getDeployments(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getDeploymentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = createOrUpdateHybridConnectionDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -5960,123 +6093,95 @@ public Observable>> call(Response> getDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse createOrUpdateHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<DeploymentInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the Object object if successful. */ - public PagedList getDeploymentsSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); } /** - * List deployments. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getDeploymentsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List deployments. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<DeploymentInner> object - */ - public Observable> getDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getDeploymentsSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); } /** - * List deployments. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<DeploymentInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the Object object */ - public Observable>> getDeploymentsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * List deployments. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the Object object */ - public Observable>> getDeploymentsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> deleteHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getDeploymentsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getDeploymentsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = deleteHybridConnectionDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -6084,123 +6189,103 @@ public Observable>> call(Response> getDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse deleteHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param instanceId Id of web app instance - * @return the PagedList<DeploymentInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the HybridConnectionInner object if successful. */ - public PagedList getInstanceDeployments(final String resourceGroupName, final String name, final String instanceId) { - ServiceResponse> response = getInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public HybridConnectionInner updateHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).toBlocking().single().getBody(); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param instanceId Id of web app instance + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getInstanceDeploymentsAsync(final String resourceGroupName, final String name, final String instanceId, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getInstanceDeploymentsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List deployments. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param instanceId Id of web app instance - * @return the observable to the PagedList<DeploymentInner> object - */ - public Observable> getInstanceDeploymentsAsync(final String resourceGroupName, final String name, final String instanceId) { - return getInstanceDeploymentsWithServiceResponseAsync(resourceGroupName, name, instanceId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall updateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope), serviceCallback); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param instanceId Id of web app instance - * @return the observable to the PagedList<DeploymentInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getInstanceDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instanceId) { - return getInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable updateHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * List deployments. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param instanceId Id of web app instance - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getInstanceDeploymentsSinglePageAsync(final String resourceGroupName, final String name, final String instanceId) { + public Observable> updateHybridConnectionWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, HybridConnectionInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getInstanceDeployments(resourceGroupName, name, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getInstanceDeploymentsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = updateHybridConnectionDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -6208,131 +6293,95 @@ public Observable>> call(Response> getInstanceDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse updateHybridConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the PagedList<DeploymentInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the Object object if successful. */ - public PagedList getInstanceDeploymentsSlot(final String resourceGroupName, final String name, final String slot, final String instanceId) { - ServiceResponse> response = getInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object listHybridConnectionKeys(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).toBlocking().single().getBody(); } /** - * List deployments. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getInstanceDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName), serviceCallback); } /** - * List deployments. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the observable to the PagedList<DeploymentInner> object - */ - public Observable> getInstanceDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { - return getInstanceDeploymentsSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * List deployments. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the observable to the PagedList<DeploymentInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the Object object */ - public Observable>> getInstanceDeploymentsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { - return getInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getInstanceDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * List deployments. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - ServiceResponse> * @param instanceId Id of web app instance - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @return the observable to the Object object */ - public Observable>> getInstanceDeploymentsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + public Observable> listHybridConnectionKeysWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getInstanceDeploymentsSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getInstanceDeploymentsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listHybridConnectionKeysDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -6340,92 +6389,80 @@ public Observable>> call(Response> getInstanceDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listHybridConnectionKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the deployment. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the DeploymentInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the HybridConnectionInner object if successful. */ - public DeploymentInner getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { - return getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); + public HybridConnectionInner listHybridConnections(String resourceGroupName, String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get the deployment. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param resourceGroupName The resource group name + * @param name The name of the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId), serviceCallback); + public ServiceCall listHybridConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get the deployment. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the HybridConnectionInner object */ - public Observable getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId) { - return getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).map(new Func1, DeploymentInner>() { + public Observable listHybridConnectionsAsync(String resourceGroupName, String name) { + return listHybridConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, HybridConnectionInner>() { @Override - public DeploymentInner call(ServiceResponse response) { + public HybridConnectionInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get the deployment. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the HybridConnectionInner object */ - public Observable> getInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId) { + public Observable> listHybridConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listHybridConnections(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getInstanceDeploymentDelegate(response); + ServiceResponse clientResponse = listHybridConnectionsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6434,100 +6471,80 @@ public Observable> call(Response }); } - private ServiceResponse getInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listHybridConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Create a deployment. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the DeploymentInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the RelayServiceConnectionEntityInner object if successful. */ - public DeploymentInner createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { - return createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment).toBlocking().single().getBody(); + public RelayServiceConnectionEntityInner listRelayServiceConnections(String resourceGroupName, String name) { + return listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Create a deployment. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @param deployment Details of deployment + * @param resourceGroupName The resource group name + * @param name The name of the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment, final ServiceCallback serviceCallback) { - return ServiceCall.create(createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment), serviceCallback); + public ServiceCall listRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Create a deployment. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { - return createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment).map(new Func1, DeploymentInner>() { + public Observable listRelayServiceConnectionsAsync(String resourceGroupName, String name) { + return listRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RelayServiceConnectionEntityInner>() { @Override - public DeploymentInner call(ServiceResponse response) { + public RelayServiceConnectionEntityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create a deployment. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable> createInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { + public Observable> listRelayServiceConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (deployment == null) { - throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(deployment); - return service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listRelayServiceConnections(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createInstanceDeploymentDelegate(response); + ServiceResponse clientResponse = listRelayServiceConnectionsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6536,92 +6553,87 @@ public Observable> call(Response }); } - private ServiceResponse createInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete the deployment. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the RelayServiceConnectionEntityInner object if successful. */ - public Object deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { - return deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); + public RelayServiceConnectionEntityInner getRelayServiceConnection(String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); } /** - * Delete the deployment. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId), serviceCallback); + public ServiceCall getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); } /** - * Delete the deployment. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId) { - return deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).map(new Func1, Object>() { + public Observable getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, RelayServiceConnectionEntityInner>() { @Override - public Object call(ServiceResponse response) { + public RelayServiceConnectionEntityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete the deployment. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param instanceId Id of web app instance - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable> deleteInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId) { + public Observable> getRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteInstanceDeploymentDelegate(response); + ServiceResponse clientResponse = getRelayServiceConnectionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6630,85 +6642,95 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the DeploymentInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the RelayServiceConnectionEntityInner object if successful. */ - public DeploymentInner getDeployment(String resourceGroupName, String name, String id) { - return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().getBody(); + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); } /** - * Get the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { - return ServiceCall.create(getDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); + public ServiceCall createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); } /** - * Get the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable getDeploymentAsync(String resourceGroupName, String name, String id) { - return getDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, DeploymentInner>() { + public Observable createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { @Override - public DeploymentInner call(ServiceResponse response) { + public RelayServiceConnectionEntityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable> getDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id) { + public Observable> createOrUpdateRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getDeployment(resourceGroupName, name, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getDeploymentDelegate(response); + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6717,93 +6739,87 @@ public Observable> call(Response }); } - private ServiceResponse getDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Create a deployment. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param deployment Details of deployment - * @return the DeploymentInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the Object object if successful. */ - public DeploymentInner createDeployment(String resourceGroupName, String name, String id, DeploymentInner deployment) { - return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).toBlocking().single().getBody(); + public Object deleteRelayServiceConnection(String resourceGroupName, String name, String entityName) { + return deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); } /** - * Create a deployment. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param deployment Details of deployment + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment, final ServiceCallback serviceCallback) { - return ServiceCall.create(createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment), serviceCallback); + public ServiceCall deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); } /** - * Create a deployment. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the observable to the Object object */ - public Observable createDeploymentAsync(String resourceGroupName, String name, String id, DeploymentInner deployment) { - return createDeploymentWithServiceResponseAsync(resourceGroupName, name, id, deployment).map(new Func1, DeploymentInner>() { + public Observable deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + return deleteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, Object>() { @Override - public DeploymentInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create a deployment. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @return the observable to the Object object */ - public Observable> createDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, DeploymentInner deployment) { + public Observable> deleteRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (deployment == null) { - throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(deployment); - return service.createDeployment(resourceGroupName, name, id, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createDeploymentDelegate(response); + ServiceResponse clientResponse = deleteRelayServiceConnectionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6812,85 +6828,95 @@ public Observable> call(Response }); } - private ServiceResponse createDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the RelayServiceConnectionEntityInner object if successful. */ - public Object deleteDeployment(String resourceGroupName, String name, String id) { - return deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).toBlocking().single().getBody(); + public RelayServiceConnectionEntityInner updateRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); } /** - * Delete the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteDeploymentAsync(String resourceGroupName, String name, String id, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id), serviceCallback); + public ServiceCall updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); } /** - * Delete the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable deleteDeploymentAsync(String resourceGroupName, String name, String id) { - return deleteDeploymentWithServiceResponseAsync(resourceGroupName, name, id).map(new Func1, Object>() { + public Observable updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { @Override - public Object call(ServiceResponse response) { + public RelayServiceConnectionEntityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete the deployment. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable> deleteDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id) { + public Observable> updateRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.deleteDeployment(resourceGroupName, name, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDeploymentDelegate(response); + ServiceResponse clientResponse = updateRelayServiceConnectionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -6899,93 +6925,118 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the deployment. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the DeploymentInner object if successful. + * @return the PagedList<SiteInstanceInner> object if successful. */ - public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { - return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().getBody(); + public PagedList listInstanceIdentifiers(final String resourceGroupName, final String name) { + ServiceResponse> response = listInstanceIdentifiersSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Get the deployment. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); + public ServiceCall> listInstanceIdentifiersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listInstanceIdentifiersSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get the deployment. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the DeploymentInner object + * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { - return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, DeploymentInner>() { - @Override - public DeploymentInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listInstanceIdentifiersAsync(final String resourceGroupName, final String name) { + return listInstanceIdentifiersWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Get the deployment. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the DeploymentInner object + * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable> getDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot) { + public Observable>> listInstanceIdentifiersWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listInstanceIdentifiersSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all instance of a web app. + * Gets all instance of a web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceIdentifiersSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listInstanceIdentifiers(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getDeploymentSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listInstanceIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -6993,101 +7044,126 @@ public Observable> call(Response }); } - private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listInstanceIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Create a deployment. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deployment Details of deployment - * @return the DeploymentInner object if successful. + * @param instanceId Id of web app instance + * @return the PagedList<DeploymentInner> object if successful. */ - public DeploymentInner createDeploymentSlot(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { - return createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment).toBlocking().single().getBody(); + public PagedList listInstanceDeployments(final String resourceGroupName, final String name, final String instanceId) { + ServiceResponse> response = listInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Create a deployment. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deployment Details of deployment + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, final ServiceCallback serviceCallback) { - return ServiceCall.create(createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment), serviceCallback); + public ServiceCall> listInstanceDeploymentsAsync(final String resourceGroupName, final String name, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Create a deployment. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param instanceId Id of web app instance + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { - return createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment).map(new Func1, DeploymentInner>() { - @Override - public DeploymentInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listInstanceDeploymentsAsync(final String resourceGroupName, final String name, final String instanceId) { + return listInstanceDeploymentsWithServiceResponseAsync(resourceGroupName, name, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Create a deployment. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @param instanceId Id of web app instance + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> createDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + public Observable>> listInstanceDeploymentsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instanceId) { + return listInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments. + * List deployments. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param instanceId Id of web app instance + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceDeploymentsSinglePageAsync(final String resourceGroupName, final String name, final String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (deployment == null) { - throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(deployment); - return service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listInstanceDeployments(resourceGroupName, name, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createDeploymentSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listInstanceDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7095,68 +7171,72 @@ public Observable> call(Response }); } - private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listInstanceDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete the deployment. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param instanceId Id of web app instance + * @return the DeploymentInner object if successful. */ - public Object deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) { - return deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().getBody(); + public DeploymentInner getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { + return getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); } /** - * Delete the deployment. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); + public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId), serviceCallback); } /** - * Delete the deployment. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param instanceId Id of web app instance + * @return the observable to the DeploymentInner object */ - public Observable deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { - return deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, Object>() { + public Observable getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId) { + return getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).map(new Func1, DeploymentInner>() { @Override - public Object call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete the deployment. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param instanceId Id of web app instance + * @return the observable to the DeploymentInner object */ - public Observable> deleteDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot) { + public Observable> getInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -7166,21 +7246,19 @@ public Observable> deleteDeploymentSlotWithServiceRespon if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteDeploymentSlotDelegate(response); + ServiceResponse clientResponse = getInstanceDeploymentDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -7189,54 +7267,57 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the deployment. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance + * @param deployment Details of deployment * @return the DeploymentInner object if successful. */ - public DeploymentInner getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) { - return getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).toBlocking().single().getBody(); + public DeploymentInner createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { + return createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment).toBlocking().single().getBody(); } /** - * Get the deployment. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance + * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId), serviceCallback); + public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceCall.create(createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment), serviceCallback); } /** - * Get the deployment. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance + * @param deployment Details of deployment * @return the observable to the DeploymentInner object */ - public Observable getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { - return getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).map(new Func1, DeploymentInner>() { + public Observable createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { + return createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment).map(new Func1, DeploymentInner>() { @Override public DeploymentInner call(ServiceResponse response) { return response.getBody(); @@ -7245,16 +7326,17 @@ public DeploymentInner call(ServiceResponse response) { } /** - * Get the deployment. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance + * @param deployment Details of deployment * @return the observable to the DeploymentInner object */ - public Observable> getInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { + public Observable> createInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -7264,24 +7346,23 @@ public Observable> getInstanceDeploymentSlotWit if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (instanceId == null) { throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); } - return service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(deployment); + final String apiVersion = "2016-08-01"; + return service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), deployment, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getInstanceDeploymentSlotDelegate(response); + ServiceResponse clientResponse = createInstanceDeploymentDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -7290,7 +7371,7 @@ public Observable> call(Response }); } - private ServiceResponse getInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -7298,68 +7379,64 @@ private ServiceResponse getInstanceDeploymentSlotDelegate(Respo } /** - * Create a deployment. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the DeploymentInner object if successful. + * @return the Object object if successful. */ - public DeploymentInner createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { - return createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment).toBlocking().single().getBody(); + public Object deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { + return deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); } /** - * Create a deployment. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment, final ServiceCallback serviceCallback) { - return ServiceCall.create(createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment), serviceCallback); + public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId), serviceCallback); } /** - * Create a deployment. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @return the observable to the Object object */ - public Observable createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { - return createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment).map(new Func1, DeploymentInner>() { + public Observable deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId) { + return deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).map(new Func1, Object>() { @Override - public DeploymentInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Create a deployment. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @param deployment Details of deployment - * @return the observable to the DeploymentInner object + * @return the observable to the Object object */ - public Observable> createInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { + public Observable> deleteInstanceDeploymentWithServiceResponseAsync(String resourceGroupName, String name, String id, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -7369,28 +7446,19 @@ public Observable> createInstanceDeploymentSlot if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (instanceId == null) { throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (deployment == null) { - throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(deployment); - return service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createInstanceDeploymentSlotDelegate(response); + ServiceResponse clientResponse = deleteInstanceDeploymentDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -7399,99 +7467,80 @@ public Observable> call(Response }); } - private ServiceResponse createInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete the deployment. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the Object object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @return the SiteCloneabilityInner object if successful. */ - public Object deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) { - return deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).toBlocking().single().getBody(); + public SiteCloneabilityInner isCloneable(String resourceGroupName, String name) { + return isCloneableWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Delete the deployment. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId), serviceCallback); + public ServiceCall isCloneableAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(isCloneableWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Delete the deployment. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @return the observable to the SiteCloneabilityInner object */ - public Observable deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { - return deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).map(new Func1, Object>() { + public Observable isCloneableAsync(String resourceGroupName, String name) { + return isCloneableWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteCloneabilityInner>() { @Override - public Object call(ServiceResponse response) { + public SiteCloneabilityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete the deployment. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param id Id of the deployment - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param instanceId Id of web app instance - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @return the observable to the SiteCloneabilityInner object */ - public Observable> deleteInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { + public Observable> isCloneableWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (id == null) { - throw new IllegalArgumentException("Parameter id is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.isCloneable(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteInstanceDeploymentSlotDelegate(response); + ServiceResponse clientResponse = isCloneableDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -7500,96 +7549,101 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse isCloneableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all instance of a web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the PagedList<SiteInstanceInner> object if successful. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteInstanceIdentifiers(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteInstanceIdentifiersSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricDefinitions(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets all instance of a web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteInstanceIdentifiersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteInstanceIdentifiersSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listMetricDefinitionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all instance of a web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> getSiteInstanceIdentifiersAsync(final String resourceGroupName, final String name) { - return getSiteInstanceIdentifiersWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listMetricDefinitionsAsync(final String resourceGroupName, final String name) { + return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets all instance of a web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> getSiteInstanceIdentifiersWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteInstanceIdentifiersSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricDefinitionsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all instance of a web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteInstanceIdentifiersSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -7599,16 +7653,14 @@ public Observable>> getSiteInstanceIdent if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteInstanceIdentifiers(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteInstanceIdentifiersDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7616,123 +7668,120 @@ public Observable>> call(Response> getSiteInstanceIdentifiersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all instance of a web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<SiteInstanceInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getSiteInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetrics(final String resourceGroupName, final String name) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets all instance of a web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { + listMetricsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all instance of a web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getSiteInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteInstanceIdentifiersSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { + public Observable> listMetricsAsync(final String resourceGroupName, final String name) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets all instance of a web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getSiteInstanceIdentifiersSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listMetricsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all instance of a web app. + * Gets metrics for web app. + * Gets metrics for web app. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteInstanceIdentifiersSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteInstanceIdentifiersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + final Boolean details = null; + final String filter = null; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteInstanceIdentifiersSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7740,96 +7789,104 @@ public Observable>> call(Response> getSiteInstanceIdentifiersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Get web app hostname bindings. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the PagedList<HostNameBindingInner> object if successful. + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteHostNameBindings(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteHostNameBindingsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { + ServiceResponse> response = listMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get web app hostname bindings. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteHostNameBindingsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteHostNameBindingsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { + listMetricsSinglePageAsync(resourceGroupName, name, details, filter), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get web app hostname bindings. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<HostNameBindingInner> object + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getSiteHostNameBindingsAsync(final String resourceGroupName, final String name) { - return getSiteHostNameBindingsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { + public Observable> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get web app hostname bindings. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<HostNameBindingInner> object + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getSiteHostNameBindingsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteHostNameBindingsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + return listMetricsSinglePageAsync(resourceGroupName, name, details, filter) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get web app hostname bindings. + * Gets metrics for web app. + * Gets metrics for web app. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param details If true, metric details are included in response + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteHostNameBindingsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable>> listMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -7839,16 +7896,14 @@ public Observable>> getSiteHostNameBi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteHostNameBindings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteHostNameBindingsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -7856,209 +7911,175 @@ public Observable>> call(Response> getSiteHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get web app hostname bindings. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<HostNameBindingInner> object if successful. + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the StorageMigrationResponseInner object if successful. */ - public PagedList getSiteHostNameBindingsSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getSiteHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public StorageMigrationResponseInner migrateStorage(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options).toBlocking().last().getBody(); } /** - * Get web app hostname bindings. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param subscriptionName Azure subscription + * @param options Migration options * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options, final ServiceCallback serviceCallback) { + return ServiceCall.create(migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options), serviceCallback); } /** - * Get web app hostname bindings. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<HostNameBindingInner> object + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the observable for the request */ - public Observable> getSiteHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteHostNameBindingsSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options).map(new Func1, StorageMigrationResponseInner>() { + @Override + public StorageMigrationResponseInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Get web app hostname bindings. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<HostNameBindingInner> object - */ - public Observable>> getSiteHostNameBindingsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get web app hostname bindings. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the observable for the request */ - public Observable>> getSiteHostNameBindingsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> migrateStorageWithServiceResponseAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (subscriptionName == null) { + throw new IllegalArgumentException("Parameter subscriptionName is required and cannot be null."); } - return service.getSiteHostNameBindingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = getSiteHostNameBindingsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> getSiteHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); + if (options == null) { + throw new IllegalArgumentException("Parameter options is required and cannot be null."); + } + Validator.validate(options); + final String apiVersion = "2016-08-01"; + Observable> observable = service.migrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, options, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Get web app binding for a hostname. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the HostNameBindingInner object if successful. + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the StorageMigrationResponseInner object if successful. */ - public HostNameBindingInner getSiteHostNameBinding(String resourceGroupName, String name, String hostName) { - return getSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); + public StorageMigrationResponseInner beginMigrateStorage(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options).toBlocking().single().getBody(); } /** - * Get web app binding for a hostname. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host + * @param subscriptionName Azure subscription + * @param options Migration options * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); + public ServiceCall beginMigrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options), serviceCallback); } /** - * Get web app binding for a hostname. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the observable to the HostNameBindingInner object + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the observable to the StorageMigrationResponseInner object */ - public Observable getSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName) { - return getSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, HostNameBindingInner>() { + public Observable beginMigrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, options).map(new Func1, StorageMigrationResponseInner>() { @Override - public HostNameBindingInner call(ServiceResponse response) { + public StorageMigrationResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get web app binding for a hostname. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the observable to the HostNameBindingInner object + * @param subscriptionName Azure subscription + * @param options Migration options + * @return the observable to the StorageMigrationResponseInner object */ - public Observable> getSiteHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName) { + public Observable> beginMigrateStorageWithServiceResponseAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptionsInner options) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (subscriptionName == null) { + throw new IllegalArgumentException("Parameter subscriptionName is required and cannot be null."); } - return service.getSiteHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + if (options == null) { + throw new IllegalArgumentException("Parameter options is required and cannot be null."); + } + Validator.validate(options); + final String apiVersion = "2016-08-01"; + return service.beginMigrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, options, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteHostNameBindingDelegate(response); + ServiceResponse clientResponse = beginMigrateStorageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8067,180 +8088,161 @@ public Observable> call(Response getSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginMigrateStorageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a web app hostname binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @param hostNameBinding Host name binding information - * @return the HostNameBindingInner object if successful. + * @param migrationRequestEnvelope MySql migration options + * @return the OperationInner object if successful. */ - public HostNameBindingInner createOrUpdateSiteHostNameBinding(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { - return createOrUpdateSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).toBlocking().single().getBody(); + public OperationInner migrateMySql(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().last().getBody(); } /** - * Creates a web app hostname binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @param hostNameBinding Host name binding information + * @param migrationRequestEnvelope MySql migration options * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding), serviceCallback); + public ServiceCall migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); } /** - * Creates a web app hostname binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @param hostNameBinding Host name binding information - * @return the observable to the HostNameBindingInner object + * @param migrationRequestEnvelope MySql migration options + * @return the observable for the request */ - public Observable createOrUpdateSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { - return createOrUpdateSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).map(new Func1, HostNameBindingInner>() { + public Observable migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).map(new Func1, OperationInner>() { @Override - public HostNameBindingInner call(ServiceResponse response) { + public OperationInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a web app hostname binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @param hostNameBinding Host name binding information - * @return the observable to the HostNameBindingInner object + * @param migrationRequestEnvelope MySql migration options + * @return the observable for the request */ - public Observable> createOrUpdateSiteHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { + public Observable> migrateMySqlWithServiceResponseAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (hostNameBinding == null) { - throw new IllegalArgumentException("Parameter hostNameBinding 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 (migrationRequestEnvelope == null) { + throw new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null."); } - Validator.validate(hostNameBinding); - return service.createOrUpdateSiteHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), hostNameBinding, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateSiteHostNameBindingDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(migrationRequestEnvelope); + final String apiVersion = "2016-08-01"; + Observable> observable = service.migrateMySql(resourceGroupName, name, this.client.subscriptionId(), migrationRequestEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Deletes a host name binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the Object object if successful. + * @param migrationRequestEnvelope MySql migration options + * @return the OperationInner object if successful. */ - public Object deleteSiteHostNameBinding(String resourceGroupName, String name, String hostName) { - return deleteSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); + public OperationInner beginMigrateMySql(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().single().getBody(); } /** - * Deletes a host name binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host + * @param migrationRequestEnvelope MySql migration options * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName), serviceCallback); + public ServiceCall beginMigrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); } /** - * Deletes a host name binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the observable to the Object object + * @param migrationRequestEnvelope MySql migration options + * @return the observable to the OperationInner object */ - public Observable deleteSiteHostNameBindingAsync(String resourceGroupName, String name, String hostName) { - return deleteSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).map(new Func1, Object>() { + public Observable beginMigrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { + return beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).map(new Func1, OperationInner>() { @Override - public Object call(ServiceResponse response) { + public OperationInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a host name binding. + * Migrates a local (in-app) MySql database to a remote MySql database. + * Migrates a local (in-app) MySql database to a remote MySql database. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param hostName Name of host - * @return the observable to the Object object + * @param migrationRequestEnvelope MySql migration options + * @return the observable to the OperationInner object */ - public Observable> deleteSiteHostNameBindingWithServiceResponseAsync(String resourceGroupName, String name, String hostName) { + public Observable> beginMigrateMySqlWithServiceResponseAsync(String resourceGroupName, String name, MigrateMySqlRequestInner migrationRequestEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (migrationRequestEnvelope == null) { + throw new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null."); } - return service.deleteSiteHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(migrationRequestEnvelope); + final String apiVersion = "2016-08-01"; + return service.beginMigrateMySql(resourceGroupName, name, this.client.subscriptionId(), migrationRequestEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteHostNameBindingDelegate(response); + ServiceResponse clientResponse = beginMigrateMySqlDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8249,92 +8251,87 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteHostNameBindingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginMigrateMySqlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get web app binding for a hostname. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the HostNameBindingInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @return the NetworkFeaturesInner object if successful. */ - public HostNameBindingInner getSiteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { - return getSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); + public NetworkFeaturesInner listNetworkFeatures(String resourceGroupName, String name, String view) { + return listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).toBlocking().single().getBody(); } /** - * Get web app binding for a hostname. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); + public ServiceCall listNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) { + return ServiceCall.create(listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view), serviceCallback); } /** - * Get web app binding for a hostname. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the observable to the HostNameBindingInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @return the observable to the NetworkFeaturesInner object */ - public Observable getSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { - return getSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, HostNameBindingInner>() { + public Observable listNetworkFeaturesAsync(String resourceGroupName, String name, String view) { + return listNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).map(new Func1, NetworkFeaturesInner>() { @Override - public HostNameBindingInner call(ServiceResponse response) { + public NetworkFeaturesInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get web app binding for a hostname. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the observable to the HostNameBindingInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @return the observable to the NetworkFeaturesInner object */ - public Observable> getSiteHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String hostName) { + public Observable> listNetworkFeaturesWithServiceResponseAsync(String resourceGroupName, String name, String view) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); + if (view == null) { + throw new IllegalArgumentException("Parameter view is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listNetworkFeatures(resourceGroupName, name, view, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteHostNameBindingSlotDelegate(response); + ServiceResponse clientResponse = listNetworkFeaturesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8343,100 +8340,82 @@ public Observable> call(Response getSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a web app hostname binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param hostName Name of host - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostNameBinding Host name binding information - * @return the HostNameBindingInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the String object if successful. */ - public HostNameBindingInner createOrUpdateSiteHostNameBindingSlot(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { - return createOrUpdateSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).toBlocking().single().getBody(); + public String startWebSiteNetworkTrace(String resourceGroupName, String name) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Creates a web app hostname binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param hostName Name of host - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostNameBinding Host name binding information + * @param resourceGroupName The resource group name + * @param name The name of the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding), serviceCallback); + public ServiceCall startWebSiteNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Creates a web app hostname binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param hostName Name of host - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostNameBinding Host name binding information - * @return the observable to the HostNameBindingInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the String object */ - public Observable createOrUpdateSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { - return createOrUpdateSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).map(new Func1, HostNameBindingInner>() { + public Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, String>() { @Override - public HostNameBindingInner call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a web app hostname binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param hostName Name of host - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostNameBinding Host name binding information - * @return the observable to the HostNameBindingInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the String object */ - public Observable> createOrUpdateSiteHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { + public Observable> startWebSiteNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (hostNameBinding == null) { - throw new IllegalArgumentException("Parameter hostNameBinding is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(hostNameBinding); - return service.createOrUpdateSiteHostNameBindingSlot(resourceGroupName, name, hostName, slot, this.client.subscriptionId(), hostNameBinding, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Integer durationInSeconds = null; + return service.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteHostNameBindingSlotDelegate(response); + ServiceResponse clientResponse = startWebSiteNetworkTraceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8445,92 +8424,77 @@ public Observable> call(Response createOrUpdateSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Deletes a host name binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param durationInSeconds The duration to keep capturing in seconds + * @return the String object if successful. */ - public Object deleteSiteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { - return deleteSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); + public String startWebSiteNetworkTrace(String resourceGroupName, String name, Integer durationInSeconds) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds).toBlocking().single().getBody(); } /** - * Deletes a host name binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param durationInSeconds The duration to keep capturing in seconds * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); + public ServiceCall startWebSiteNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds), serviceCallback); } /** - * Deletes a host name binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param durationInSeconds The duration to keep capturing in seconds + * @return the observable to the String object */ - public Observable deleteSiteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { - return deleteSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, Object>() { + public Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds) { + return startWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds).map(new Func1, String>() { @Override - public Object call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a host name binding. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param hostName Name of host - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param durationInSeconds The duration to keep capturing in seconds + * @return the observable to the String object */ - public Observable> deleteSiteHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String hostName) { + public Observable> startWebSiteNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name, Integer durationInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (hostName == null) { - throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteSiteHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteHostNameBindingSlotDelegate(response); + ServiceResponse clientResponse = startWebSiteNetworkTraceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8539,60 +8503,64 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse startWebSiteNetworkTraceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the configuration of the web app. + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the SiteConfigInner object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the String object if successful. */ - public SiteConfigInner getSiteConfig(String resourceGroupName, String name) { - return getSiteConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public String stopWebSiteNetworkTrace(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets the configuration of the web app. + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteConfigWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall stopWebSiteNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets the configuration of the web app. + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteConfigInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the String object */ - public Observable getSiteConfigAsync(String resourceGroupName, String name) { - return getSiteConfigWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteConfigInner>() { + public Observable stopWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, String>() { @Override - public SiteConfigInner call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the configuration of the web app. + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteConfigInner object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the String object */ - public Observable> getSiteConfigWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> stopWebSiteNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -8602,15 +8570,13 @@ public Observable> getSiteConfigWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteConfig(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.stopWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteConfigDelegate(response); + ServiceResponse clientResponse = stopWebSiteNetworkTraceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8619,64 +8585,64 @@ public Observable> call(Response }); } - private ServiceResponse getSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse stopWebSiteNetworkTraceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Update the configuration of web app. + * Generates new random app publishing password. + * Generates new random app publishing password. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the SiteConfigInner object if successful. + * @return the Object object if successful. */ - public SiteConfigInner createOrUpdateSiteConfig(String resourceGroupName, String name, SiteConfigInner siteConfig) { - return createOrUpdateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().getBody(); + public Object generateNewSitePublishingPassword(String resourceGroupName, String name) { + return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Update the configuration of web app. + * Generates new random app publishing password. + * Generates new random app publishing password. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteConfigAsync(String resourceGroupName, String name, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); + public ServiceCall generateNewSitePublishingPasswordAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Update the configuration of web app. + * Generates new random app publishing password. + * Generates new random app publishing password. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @return the observable to the Object object */ - public Observable createOrUpdateSiteConfigAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { - return createOrUpdateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigInner>() { + public Observable generateNewSitePublishingPasswordAsync(String resourceGroupName, String name) { + return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override - public SiteConfigInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the configuration of web app. + * Generates new random app publishing password. + * Generates new random app publishing password. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @return the observable to the Object object */ - public Observable> createOrUpdateSiteConfigWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { + public Observable> generateNewSitePublishingPasswordWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -8686,19 +8652,13 @@ public Observable> createOrUpdateSiteConfigWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteConfig == null) { - throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteConfig); - return service.createOrUpdateSiteConfig(resourceGroupName, name, this.client.subscriptionId(), siteConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.generateNewSitePublishingPassword(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteConfigDelegate(response); + ServiceResponse clientResponse = generateNewSitePublishingPasswordDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8707,86 +8667,87 @@ public Observable> call(Response }); } - private ServiceResponse createOrUpdateSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse generateNewSitePublishingPasswordDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Update the configuration of web app. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the SiteConfigInner object if successful. + * @param operationId Id of an operation + * @return the Object object if successful. */ - public SiteConfigInner updateSiteConfig(String resourceGroupName, String name, SiteConfigInner siteConfig) { - return updateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().getBody(); + public Object getOperation(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); } /** - * Update the configuration of web app. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app + * @param operationId Id of an operation * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteConfigAsync(String resourceGroupName, String name, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig), serviceCallback); + public ServiceCall getOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); } /** - * Update the configuration of web app. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @param operationId Id of an operation + * @return the observable to the Object object */ - public Observable updateSiteConfigAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { - return updateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig).map(new Func1, SiteConfigInner>() { + public Observable getOperationAsync(String resourceGroupName, String name, String operationId) { + return getOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1, Object>() { @Override - public SiteConfigInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the configuration of web app. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @param operationId Id of an operation + * @return the observable to the Object object */ - public Observable> updateSiteConfigWithServiceResponseAsync(String resourceGroupName, String name, SiteConfigInner siteConfig) { + public Observable> getOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteConfig == null) { - throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteConfig); - return service.updateSiteConfig(resourceGroupName, name, this.client.subscriptionId(), siteConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteConfigDelegate(response); + ServiceResponse clientResponse = getOperationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -8795,86 +8756,119 @@ public Observable> call(Response }); } - private ServiceResponse updateSiteConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the configuration of the web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteConfigInner object if successful. + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public SiteConfigInner getSiteConfigSlot(String resourceGroupName, String name, String slot) { - return getSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public PagedList listPerfMonCounters(final String resourceGroupName, final String name) { + ServiceResponse> response = listPerfMonCountersSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets the configuration of the web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall> listPerfMonCountersAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listPerfMonCountersSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable> listPerfMonCountersAsync(final String resourceGroupName, final String name) { + return listPerfMonCountersWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the configuration of the web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteConfigInner object + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable getSiteConfigSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteConfigInner>() { - @Override - public SiteConfigInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listPerfMonCountersWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listPerfMonCountersSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Gets the configuration of the web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteConfigInner object + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> getSiteConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable>> listPerfMonCountersSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String filter = null; + return service.listPerfMonCounters(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getSiteConfigSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -8882,94 +8876,116 @@ public Observable> call(Response }); } - private ServiceResponse getSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Update the configuration of web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the SiteConfigInner object if successful. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public SiteConfigInner createOrUpdateSiteConfigSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { - return createOrUpdateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().getBody(); + public PagedList listPerfMonCounters(final String resourceGroupName, final String name, final String filter) { + ServiceResponse> response = listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Update the configuration of web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteConfigSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); + public ServiceCall> listPerfMonCountersAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Update the configuration of web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable createOrUpdateSiteConfigSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { - return createOrUpdateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigInner>() { - @Override - public SiteConfigInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listPerfMonCountersAsync(final String resourceGroupName, final String name, final String filter) { + return listPerfMonCountersWithServiceResponseAsync(resourceGroupName, name, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Update the configuration of web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable>> listPerfMonCountersWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { + return listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> createOrUpdateSiteConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + public Observable>> listPerfMonCountersSinglePageAsync(final String resourceGroupName, final String name, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteConfig == null) { - throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteConfig); - return service.createOrUpdateSiteConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listPerfMonCounters(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteConfigSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -8977,93 +8993,80 @@ public Observable> call(Response }); } - private ServiceResponse createOrUpdateSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listPerfMonCountersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Update the configuration of web app. + * Gets sites's event logs. + * Gets sites's event logs. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the SiteConfigInner object if successful. + * @return the List<Object> object if successful. */ - public SiteConfigInner updateSiteConfigSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { - return updateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().getBody(); + public List getSitePhpErrorLogFlag(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Update the configuration of web app. + * Gets sites's event logs. + * Gets sites's event logs. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteConfigSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); + public ServiceCall> getSitePhpErrorLogFlagAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceCall.create(getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Update the configuration of web app. + * Gets sites's event logs. + * Gets sites's event logs. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @return the observable to the List<Object> object */ - public Observable updateSiteConfigSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { - return updateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigInner>() { + public Observable> getSitePhpErrorLogFlagAsync(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { @Override - public SiteConfigInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Update the configuration of web app. + * Gets sites's event logs. + * Gets sites's event logs. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteConfig Request body that contains the configuraiton setting for the web app - * @return the observable to the SiteConfigInner object + * @return the observable to the List<Object> object */ - public Observable> updateSiteConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + public Observable>> getSitePhpErrorLogFlagWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteConfig == null) { - throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteConfig); - return service.updateSiteConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getSitePhpErrorLogFlag(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = updateSiteConfigSlotDelegate(response); + ServiceResponse> clientResponse = getSitePhpErrorLogFlagDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9072,60 +9075,64 @@ public Observable> call(Response }); } - private ServiceResponse updateSiteConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getSitePhpErrorLogFlagDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the source control configuration of web app. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the SiteSourceControlInner object if successful. + * @param resourceGroupName Resource group + * @param name web app name + * @return the Object object if successful. */ - public SiteSourceControlInner getSiteSourceControl(String resourceGroupName, String name) { - return getSiteSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object listPremierAddOns(String resourceGroupName, String name) { + return listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get the source control configuration of web app. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Resource group + * @param name web app name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall listPremierAddOnsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get the source control configuration of web app. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @return the observable to the Object object */ - public Observable getSiteSourceControlAsync(String resourceGroupName, String name) { - return getSiteSourceControlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteSourceControlInner>() { + public Observable listPremierAddOnsAsync(String resourceGroupName, String name) { + return listPremierAddOnsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get the source control configuration of web app. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @return the observable to the Object object */ - public Observable> getSiteSourceControlWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listPremierAddOnsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -9135,15 +9142,13 @@ public Observable> getSiteSourceControlW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteSourceControl(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listPremierAddOns(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSourceControlDelegate(response); + ServiceResponse clientResponse = listPremierAddOnsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9152,86 +9157,87 @@ public Observable> call(Response getSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listPremierAddOnsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Update the source control configuration of web app. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters - * @return the SiteSourceControlInner object if successful. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @return the Object object if successful. */ - public SiteSourceControlInner createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - return createOrUpdateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().getBody(); + public Object getPremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).toBlocking().single().getBody(); } /** - * Update the source control configuration of web app. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + public ServiceCall getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); } /** - * Update the source control configuration of web app. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @return the observable to the Object object */ - public Observable createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - return createOrUpdateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + public Observable getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, Object>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the source control configuration of web app. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @return the observable to the Object object */ - public Observable> createOrUpdateSiteSourceControlWithServiceResponseAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + public Observable> getPremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteSourceControl == null) { - throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteSourceControl); - return service.createOrUpdateSiteSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getPremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteSourceControlDelegate(response); + ServiceResponse clientResponse = getPremierAddOnDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9240,45 +9246,54 @@ public Observable> call(Response createOrUpdateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getPremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete source control configuration of web app. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param premierAddOn Premier add on request * @return the Object object if successful. */ - public Object deleteSiteSourceControl(String resourceGroupName, String name) { - return deleteSiteSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object addPremierAddOn(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { + return addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).toBlocking().single().getBody(); } /** - * Delete source control configuration of web app. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param premierAddOn Premier add on request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall addPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn, final ServiceCallback serviceCallback) { + return ServiceCall.create(addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn), serviceCallback); } /** - * Delete source control configuration of web app. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param premierAddOn Premier add on request * @return the observable to the Object object */ - public Observable deleteSiteSourceControlAsync(String resourceGroupName, String name) { - return deleteSiteSourceControlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable addPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { + return addPremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -9287,31 +9302,39 @@ public Object call(ServiceResponse response) { } /** - * Delete source control configuration of web app. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param premierAddOn Premier add on request * @return the observable to the Object object */ - public Observable> deleteSiteSourceControlWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> addPremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (premierAddOn == null) { + throw new IllegalArgumentException("Parameter premierAddOn is required and cannot be null."); } - return service.deleteSiteSourceControl(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(premierAddOn); + final String apiVersion = "2016-08-01"; + return service.addPremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), premierAddOn, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteSourceControlDelegate(response); + ServiceResponse clientResponse = addPremierAddOnDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9320,7 +9343,7 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse addPremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -9328,78 +9351,79 @@ private ServiceResponse deleteSiteSourceControlDelegate(Response updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + public ServiceCall deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deletePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); } /** - * Update the source control configuration of web app. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @return the observable to the Object object */ - public Observable updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { - return updateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + public Observable deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + return deletePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, Object>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the source control configuration of web app. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @return the observable to the Object object */ - public Observable> updateSiteSourceControlWithServiceResponseAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + public Observable> deletePremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteSourceControl == null) { - throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteSourceControl); - return service.updateSiteSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deletePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteSourceControlDelegate(response); + ServiceResponse clientResponse = deletePremierAddOnDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9408,85 +9432,83 @@ public Observable> call(Response updateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deletePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteSourceControlInner object if successful. + * @return the InputStream object if successful. */ - public SiteSourceControlInner getSiteSourceControlSlot(String resourceGroupName, String name, String slot) { - return getSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public InputStream listPublishingProfileXmlWithSecrets(String resourceGroupName, String name) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Get the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Get the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteSourceControlInner object + * @return the observable to the InputStream object */ - public Observable getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteSourceControlInner>() { + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, InputStream>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public InputStream call(ServiceResponse response) { return response.getBody(); } }); } /** - * Get the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteSourceControlInner object + * @return the observable to the InputStream object */ - public Observable> getSiteSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String format = null; + CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); + options.withFormat(null); + return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), options, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteSourceControlSlotDelegate(response); + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9495,93 +9517,91 @@ public Observable> call(Response getSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Update the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the SiteSourceControlInner object if successful. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the InputStream object if successful. */ - public SiteSourceControlInner createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return createOrUpdateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().getBody(); + public InputStream listPublishingProfileXmlWithSecrets(String resourceGroupName, String name, String format) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format).toBlocking().single().getBody(); } /** - * Update the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + public ServiceCall listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, String format, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format), serviceCallback); } /** - * Update the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the observable to the InputStream object */ - public Observable createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return createOrUpdateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, String format) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, format).map(new Func1, InputStream>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public InputStream call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the source control configuration of web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the observable to the InputStream object */ - public Observable> createOrUpdateSiteSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + public Observable> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name, String format) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteSourceControl == null) { - throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteSourceControl); - return service.createOrUpdateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); + options.withFormat(format); + return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), options, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteSourceControlSlotDelegate(response); + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9590,180 +9610,161 @@ public Observable> call(Response createOrUpdateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listPublishingProfileXmlWithSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Delete source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the RecoverResponseInner object if successful. */ - public Object deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) { - return deleteSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public RecoverResponseInner recover(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + return recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().last().getBody(); } /** - * Delete source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall recoverAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); } /** - * Delete source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable for the request */ - public Observable deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { - return deleteSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable recoverAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + return recoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, RecoverResponseInner>() { @Override - public Object call(ServiceResponse response) { + public RecoverResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Delete source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable for the request */ - public Observable> deleteSiteSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> recoverWithServiceResponseAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); } - return service.deleteSiteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = deleteSiteSourceControlSlotDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse deleteSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(recoveryEntity); + final String apiVersion = "2016-08-01"; + Observable> observable = service.recover(resourceGroupName, name, this.client.subscriptionId(), recoveryEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Update the source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the SiteSourceControlInner object if successful. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the RecoverResponseInner object if successful. */ - public SiteSourceControlInner updateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return updateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().getBody(); + public RecoverResponseInner beginRecover(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + return beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().single().getBody(); } /** - * Update the source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + public ServiceCall beginRecoverAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity), serviceCallback); } /** - * Update the source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable to the RecoverResponseInner object */ - public Observable updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { - return updateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + public Observable beginRecoverAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { + return beginRecoverWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).map(new Func1, RecoverResponseInner>() { @Override - public SiteSourceControlInner call(ServiceResponse response) { + public RecoverResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Update the source control configuration of web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteSourceControl Request body that contains the source control parameters - * @return the observable to the SiteSourceControlInner object + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable to the RecoverResponseInner object */ - public Observable> updateSiteSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + public Observable> beginRecoverWithServiceResponseAsync(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteSourceControl == null) { - throw new IllegalArgumentException("Parameter siteSourceControl 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 (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); } - Validator.validate(siteSourceControl); - return service.updateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(recoveryEntity); + final String apiVersion = "2016-08-01"; + return service.beginRecover(resourceGroupName, name, this.client.subscriptionId(), recoveryEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteSourceControlSlotDelegate(response); + ServiceResponse clientResponse = beginRecoverDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9772,85 +9773,80 @@ public Observable> call(Response updateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRecoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the application settings of web app. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the StringDictionaryInner object if successful. + * @return the Object object if successful. */ - public StringDictionaryInner listSiteAppSettingsSlot(String resourceGroupName, String name, String slot) { - return listSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public Object resetProductionSlotConfig(String resourceGroupName, String name) { + return resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets the application settings of web app. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteAppSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall resetProductionSlotConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets the application settings of web app. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the StringDictionaryInner object + * @return the observable to the Object object */ - public Observable listSiteAppSettingsSlotAsync(String resourceGroupName, String name, String slot) { - return listSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { + public Observable resetProductionSlotConfigAsync(String resourceGroupName, String name) { + return resetProductionSlotConfigWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the application settings of web app. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the StringDictionaryInner object + * @return the observable to the Object object */ - public Observable> listSiteAppSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> resetProductionSlotConfigWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteAppSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.resetProductionSlotConfig(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteAppSettingsSlotDelegate(response); + ServiceResponse clientResponse = resetProductionSlotConfigDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9859,60 +9855,64 @@ public Observable> call(Response listSiteAppSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse resetProductionSlotConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the StringDictionaryInner object if successful. + * @return the Object object if successful. */ - public StringDictionaryInner listSiteAppSettings(String resourceGroupName, String name) { - return listSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object restart(String resourceGroupName, String name) { + return restartWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } /** - * Gets the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteAppSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall restartAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } /** - * Gets the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the Object object */ - public Observable listSiteAppSettingsAsync(String resourceGroupName, String name) { - return listSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + public Observable restartAsync(String resourceGroupName, String name) { + return restartWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the Object object */ - public Observable> listSiteAppSettingsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -9922,15 +9922,15 @@ public Observable> listSiteAppSettingsWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteAppSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Boolean softRestart = null; + final Boolean synchronous = null; + return service.restart(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteAppSettingsDelegate(response); + ServiceResponse clientResponse = restartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -9939,64 +9939,65 @@ public Observable> call(Response listSiteAppSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Updates the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param appSettings Application settings of web app - * @return the StringDictionaryInner object if successful. + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted + * @return the Object object if successful. */ - public StringDictionaryInner updateSiteAppSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) { - return updateSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).toBlocking().single().getBody(); + public Object restart(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + return restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).toBlocking().single().getBody(); } /** - * Updates the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param appSettings Application settings of web app + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings), serviceCallback); + public ServiceCall restartAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous), serviceCallback); } /** - * Updates the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param appSettings Application settings of web app - * @return the observable to the StringDictionaryInner object + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted + * @return the observable to the Object object */ - public Observable updateSiteAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { - return updateSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).map(new Func1, StringDictionaryInner>() { + public Observable restartAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + return restartWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).map(new Func1, Object>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the application settings of web app. + * Restarts web app. + * Restarts web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param appSettings Application settings of web app - * @return the observable to the StringDictionaryInner object + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted + * @return the observable to the Object object */ - public Observable> updateSiteAppSettingsWithServiceResponseAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { + public Observable> restartWithServiceResponseAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10006,19 +10007,13 @@ public Observable> updateSiteAppSettingsW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (appSettings == null) { - throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(appSettings); - return service.updateSiteAppSettings(resourceGroupName, name, this.client.subscriptionId(), appSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.restart(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteAppSettingsDelegate(response); + ServiceResponse clientResponse = restartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10027,94 +10022,119 @@ public Observable> call(Response updateSiteAppSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse restartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the application settings of web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param appSettings Application settings of web app - * @return the StringDictionaryInner object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public StringDictionaryInner updateSiteAppSettingsSlot(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { - return updateSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).toBlocking().single().getBody(); + public PagedList listSlots(final String resourceGroupName, final String name) { + ServiceResponse> response = listSlotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Updates the application settings of web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param appSettings Application settings of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteAppSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings), serviceCallback); + public ServiceCall> listSlotsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSlotsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates the application settings of web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param appSettings Application settings of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the PagedList<SiteInner> object */ - public Observable updateSiteAppSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { - return updateSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).map(new Func1, StringDictionaryInner>() { - @Override - public StringDictionaryInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listSlotsAsync(final String resourceGroupName, final String name) { + return listSlotsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Updates the application settings of web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param appSettings Application settings of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listSlotsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSlotsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> updateSiteAppSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + public Observable>> listSlotsSinglePageAsync(final String resourceGroupName, final String name) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (appSettings == null) { - throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(appSettings); - return service.updateSiteAppSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), appSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String propertiesToInclude = null; + return service.listSlots(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = updateSiteAppSettingsSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listSlotsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -10122,60 +10142,99 @@ public Observable> call(Response updateSiteAppSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets the connection strings associated with web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the ConnectionStringDictionaryInner object if successful. + * @param propertiesToInclude List of app properties to include in the response + * @return the PagedList<SiteInner> object if successful. */ - public ConnectionStringDictionaryInner listSiteConnectionStrings(String resourceGroupName, String name) { - return listSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public PagedList listSlots(final String resourceGroupName, final String name, final String propertiesToInclude) { + ServiceResponse> response = listSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets the connection strings associated with web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param propertiesToInclude List of app properties to include in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteConnectionStringsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listSlotsAsync(final String resourceGroupName, final String name, final String propertiesToInclude, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets the connection strings associated with web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param propertiesToInclude List of app properties to include in the response + * @return the observable to the PagedList<SiteInner> object */ - public Observable listSiteConnectionStringsAsync(String resourceGroupName, String name) { - return listSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ConnectionStringDictionaryInner>() { - @Override - public ConnectionStringDictionaryInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listSlotsAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + return listSlotsWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the connection strings associated with web app. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param propertiesToInclude List of app properties to include in the response + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listSlotsWithServiceResponseAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { + return listSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSlotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param propertiesToInclude List of app properties to include in the response + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listSiteConnectionStringsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable>> listSlotsSinglePageAsync(final String resourceGroupName, final String name, final String propertiesToInclude) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10185,16 +10244,14 @@ public Observable> listSiteConn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listSlots(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listSiteConnectionStringsDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listSlotsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -10202,27 +10259,29 @@ public Observable> call(Respons }); } - private ServiceResponse listSiteConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listSlotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the ConnectionStringDictionaryInner object if successful. + * @return the SiteInner object if successful. */ - public ConnectionStringDictionaryInner listSiteConnectionStringsSlot(String resourceGroupName, String name, String slot) { - return listSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public SiteInner getSlot(String resourceGroupName, String name, String slot) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app @@ -10230,36 +10289,38 @@ public ConnectionStringDictionaryInner listSiteConnectionStringsSlot(String reso * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall getSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the ConnectionStringDictionaryInner object + * @return the observable to the SiteInner object */ - public Observable listSiteConnectionStringsSlotAsync(String resourceGroupName, String name, String slot) { - return listSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, ConnectionStringDictionaryInner>() { + public Observable getSlotAsync(String resourceGroupName, String name, String slot) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteInner>() { @Override - public ConnectionStringDictionaryInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the ConnectionStringDictionaryInner object + * @return the observable to the SiteInner object */ - public Observable> listSiteConnectionStringsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> getSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10272,15 +10333,14 @@ public Observable> listSiteConn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String propertiesToInclude = null; + return service.getSlot(resourceGroupName, name, slot, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteConnectionStringsSlotDelegate(response); + ServiceResponse clientResponse = getSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10289,86 +10349,84 @@ public Observable> call(Respons }); } - private ServiceResponse listSiteConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Updates the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param connectionStrings Connection strings associated with web app - * @return the ConnectionStringDictionaryInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param propertiesToInclude Additional web app properties included in the response + * @return the SiteInner object if successful. */ - public ConnectionStringDictionaryInner updateSiteConnectionStrings(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { - return updateSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).toBlocking().single().getBody(); + public SiteInner getSlot(String resourceGroupName, String name, String slot, String propertiesToInclude) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude).toBlocking().single().getBody(); } /** - * Updates the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param connectionStrings Connection strings associated with web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param propertiesToInclude Additional web app properties included in the response * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings), serviceCallback); + public ServiceCall getSlotAsync(String resourceGroupName, String name, String slot, String propertiesToInclude, final ServiceCallback serviceCallback) { + return ServiceCall.create(getSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude), serviceCallback); } /** - * Updates the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param connectionStrings Connection strings associated with web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the SiteInner object */ - public Observable updateSiteConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { - return updateSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { + public Observable getSlotAsync(String resourceGroupName, String name, String slot, String propertiesToInclude) { + return getSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude).map(new Func1, SiteInner>() { @Override - public ConnectionStringDictionaryInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the connection strings associated with web app. + * Get details of a web app. + * Get details of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param connectionStrings Connection strings associated with web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param propertiesToInclude Additional web app properties included in the response + * @return the observable to the SiteInner object */ - public Observable> updateSiteConnectionStringsWithServiceResponseAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + public Observable> getSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String propertiesToInclude) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionStrings == null) { - throw new IllegalArgumentException("Parameter connectionStrings is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionStrings); - return service.updateSiteConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), connectionStrings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getSlot(resourceGroupName, name, slot, this.client.subscriptionId(), propertiesToInclude, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteConnectionStringsDelegate(response); + ServiceResponse clientResponse = getSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10377,68 +10435,72 @@ public Observable> call(Respons }); } - private ServiceResponse updateSiteConnectionStringsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the connection strings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param connectionStrings Connection strings associated with web app - * @return the ConnectionStringDictionaryInner object if successful. + * @param siteEnvelope Details of web app if it exists already + * @return the SiteInner object if successful. */ - public ConnectionStringDictionaryInner updateSiteConnectionStringsSlot(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { - return updateSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).toBlocking().single().getBody(); + public SiteInner createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().last().getBody(); } /** - * Updates the connection strings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param connectionStrings Connection strings associated with web app + * @param siteEnvelope Details of web app if it exists already * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings), serviceCallback); + public ServiceCall createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); } /** - * Updates the connection strings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param connectionStrings Connection strings associated with web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param siteEnvelope Details of web app if it exists already + * @return the observable for the request */ - public Observable updateSiteConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { - return updateSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { + public Observable createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { @Override - public ConnectionStringDictionaryInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the connection strings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param connectionStrings Connection strings associated with web app - * @return the observable to the ConnectionStringDictionaryInner object + * @param siteEnvelope Details of web app if it exists already + * @return the observable for the request */ - public Observable> updateSiteConnectionStringsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + public Observable> createOrUpdateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10451,165 +10513,177 @@ public Observable> updateSiteCo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionStrings == null) { - throw new IllegalArgumentException("Parameter connectionStrings 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - Validator.validate(connectionStrings); - return service.updateSiteConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), connectionStrings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateSiteConnectionStringsSlotDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateSiteConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + final Boolean skipDnsRegistration = null; + final Boolean skipCustomDomainVerification = null; + final Boolean forceDnsRegistration = null; + final String ttlInSeconds = null; + Observable> observable = service.createOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the SiteAuthSettingsInner object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the SiteInner object if successful. */ - public SiteAuthSettingsInner listSiteAuthSettings(String resourceGroupName, String name) { - return listSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public SiteInner createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteAuthSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteAuthSettingsInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable for the request */ - public Observable listSiteAuthSettingsAsync(String resourceGroupName, String name) { - return listSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteAuthSettingsInner>() { + public Observable createOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return createOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { @Override - public SiteAuthSettingsInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the SiteAuthSettingsInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable for the request */ - public Observable> listSiteAuthSettingsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> createOrUpdateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - return service.listSiteAuthSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSiteAuthSettingsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listSiteAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + Observable> observable = service.createOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteAuthSettingsInner object if successful. + * @param siteEnvelope Details of web app if it exists already + * @return the SiteInner object if successful. */ - public SiteAuthSettingsInner listSiteAuthSettingsSlot(String resourceGroupName, String name, String slot) { - return listSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public SiteInner beginCreateOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().single().getBody(); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope), serviceCallback); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteAuthSettingsInner object + * @param siteEnvelope Details of web app if it exists already + * @return the observable to the SiteInner object */ - public Observable listSiteAuthSettingsSlotAsync(String resourceGroupName, String name, String slot) { - return listSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteAuthSettingsInner>() { + public Observable beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).map(new Func1, SiteInner>() { @Override - public SiteAuthSettingsInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteAuthSettingsInner object + * @param siteEnvelope Details of web app if it exists already + * @return the observable to the SiteInner object */ - public Observable> listSiteAuthSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> beginCreateOrUpdateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10622,15 +10696,21 @@ public Observable> listSiteAuthSettingsSl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - return service.listSiteAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + final Boolean skipDnsRegistration = null; + final Boolean skipCustomDomainVerification = null; + final Boolean forceDnsRegistration = null; + final String ttlInSeconds = null; + return service.beginCreateOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteAuthSettingsSlotDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10639,86 +10719,108 @@ public Observable> call(Response listSiteAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Updates the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteAuthSettings Auth settings associated with web app - * @return the SiteAuthSettingsInner object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the SiteInner object if successful. */ - public SiteAuthSettingsInner updateSiteAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { - return updateSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).toBlocking().single().getBody(); + public SiteInner beginCreateOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteAuthSettings Auth settings associated with web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings), serviceCallback); + public ServiceCall beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds), serviceCallback); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteAuthSettings Auth settings associated with web app - * @return the observable to the SiteAuthSettingsInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable to the SiteInner object */ - public Observable updateSiteAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { - return updateSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).map(new Func1, SiteAuthSettingsInner>() { + public Observable beginCreateOrUpdateSlotAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { + return beginCreateOrUpdateSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).map(new Func1, SiteInner>() { @Override - public SiteAuthSettingsInner call(ServiceResponse response) { + public SiteInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param siteAuthSettings Auth settings associated with web app - * @return the observable to the SiteAuthSettingsInner object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteEnvelope Details of web app if it exists already + * @param skipDnsRegistration If true web app hostname is not registered with DNS on creation. This parameter is + only used for app creation + * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. + * @param forceDnsRegistration If true, web app hostname is force registered with DNS + * @param ttlInSeconds Time to live in seconds for web app's default domain name + * @return the observable to the SiteInner object */ - public Observable> updateSiteAuthSettingsWithServiceResponseAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + public Observable> beginCreateOrUpdateSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Boolean skipDnsRegistration, Boolean skipCustomDomainVerification, Boolean forceDnsRegistration, String ttlInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteAuthSettings == null) { - throw new IllegalArgumentException("Parameter siteAuthSettings 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 (siteEnvelope == null) { + throw new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null."); } - Validator.validate(siteAuthSettings); - return service.updateSiteAuthSettings(resourceGroupName, name, this.client.subscriptionId(), siteAuthSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteEnvelope); + final String apiVersion = "2016-08-01"; + return service.beginCreateOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteAuthSettingsDelegate(response); + ServiceResponse clientResponse = beginCreateOrUpdateSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10727,68 +10829,69 @@ public Observable> call(Response updateSiteAuthSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginCreateOrUpdateSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteAuthSettings Auth settings associated with web app - * @return the SiteAuthSettingsInner object if successful. + * @return the Object object if successful. */ - public SiteAuthSettingsInner updateSiteAuthSettingsSlot(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { - return updateSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).toBlocking().single().getBody(); + public Object deleteSlot(String resourceGroupName, String name, String slot) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteAuthSettings Auth settings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings), serviceCallback); + public ServiceCall deleteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteAuthSettings Auth settings associated with web app - * @return the observable to the SiteAuthSettingsInner object + * @return the observable to the Object object */ - public Observable updateSiteAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { - return updateSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).map(new Func1, SiteAuthSettingsInner>() { + public Observable deleteSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { @Override - public SiteAuthSettingsInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the Authentication / Authorization settings associated with web app. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteAuthSettings Auth settings associated with web app - * @return the observable to the SiteAuthSettingsInner object + * @return the observable to the Object object */ - public Observable> updateSiteAuthSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + public Observable> deleteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -10801,19 +10904,16 @@ public Observable> updateSiteAuthSettings if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteAuthSettings == null) { - throw new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(siteAuthSettings); - return service.updateSiteAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteAuthSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + final Boolean skipDnsRegistration = null; + return service.deleteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteAuthSettingsSlotDelegate(response); + ServiceResponse clientResponse = deleteSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10822,141 +10922,182 @@ public Observable> call(Response updateSiteAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets the web app publishing credentials. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the UserInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped + * @return the Object object if successful. */ - public UserInner listSitePublishingCredentials(String resourceGroupName, String name) { - return listSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); + public Object deleteSlot(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).toBlocking().single().getBody(); } /** - * Gets the web app publishing credentials. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall deleteSlotAsync(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration), serviceCallback); } /** - * Gets the web app publishing credentials. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable for the request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped + * @return the observable to the Object object */ - public Observable listSitePublishingCredentialsAsync(String resourceGroupName, String name) { - return listSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, UserInner>() { + public Observable deleteSlotAsync(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration).map(new Func1, Object>() { @Override - public UserInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app publishing credentials. + * Deletes a web app. + * Deletes a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable for the request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param deleteMetrics If true, web app metrics are also deleted + * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted + * @param skipDnsRegistration If true, DNS registration is skipped + * @return the observable to the Object object */ - public Observable> listSitePublishingCredentialsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> deleteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Boolean skipDnsRegistration) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listSitePublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.deleteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the UserInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the CustomHostnameAnalysisResultInner object if successful. */ - public UserInner beginListSitePublishingCredentials(String resourceGroupName, String name) { - return beginListSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginListSitePublishingCredentialsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginListSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the UserInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable beginListSitePublishingCredentialsAsync(String resourceGroupName, String name) { - return beginListSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, UserInner>() { + public Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, CustomHostnameAnalysisResultInner>() { @Override - public UserInner call(ServiceResponse response) { + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the UserInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable> beginListSitePublishingCredentialsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> analyzeCustomHostnameSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListSitePublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String hostName = null; + return service.analyzeCustomHostnameSlot(resourceGroupName, name, slot, this.client.subscriptionId(), hostName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginListSitePublishingCredentialsDelegate(response); + ServiceResponse clientResponse = analyzeCustomHostnameSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -10965,64 +11106,65 @@ public Observable> call(Response respon }); } - private ServiceResponse beginListSitePublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the UserInner object if successful. + * @param hostName Custom hostname + * @return the CustomHostnameAnalysisResultInner object if successful. */ - public UserInner listSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) { - return listSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().getBody(); + public CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot, String hostName) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostName Custom hostname * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable for the request + * @param hostName Custom hostname + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable listSitePublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { - return listSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { + public Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return analyzeCustomHostnameSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, CustomHostnameAnalysisResultInner>() { @Override - public UserInner call(ServiceResponse response) { + public CustomHostnameAnalysisResultInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app publishing credentials. + * Analyze a custom hostname. + * Analyze a custom hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable for the request + * @param hostName Custom hostname + * @return the observable to the CustomHostnameAnalysisResultInner object */ - public Observable> listSitePublishingCredentialsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> analyzeCustomHostnameSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String hostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -11035,64 +11177,87 @@ public Observable> listSitePublishingCredentialsSlotW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listSitePublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the web app publishing credentials. + final String apiVersion = "2016-08-01"; + return service.analyzeCustomHostnameSlot(resourceGroupName, name, slot, this.client.subscriptionId(), hostName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = analyzeCustomHostnameSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse analyzeCustomHostnameSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the UserInner object if successful. + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @return the Object object if successful. */ - public UserInner beginListSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) { - return beginListSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public Object applySlotConfigurationSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().getBody(); } /** - * Gets the web app publishing credentials. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginListSitePublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginListSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); } /** - * Gets the web app publishing credentials. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the UserInner object + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @return the observable to the Object object */ - public Observable beginListSitePublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { - return beginListSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { + public Observable applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { @Override - public UserInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app publishing credentials. + * Applies the configuration settings from the target slot onto the current slot. + * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the UserInner object + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @return the observable to the Object object */ - public Observable> beginListSitePublishingCredentialsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> applySlotConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -11105,15 +11270,17 @@ public Observable> beginListSitePublishingCredentials if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); } - return service.beginListSitePublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + return service.applySlotConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginListSitePublishingCredentialsSlotDelegate(response); + ServiceResponse clientResponse = applySlotConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11122,78 +11289,95 @@ public Observable> call(Response respon }); } - private ServiceResponse beginListSitePublishingCredentialsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse applySlotConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web app meta data. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the StringDictionaryInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the BackupItemInner object if successful. */ - public StringDictionaryInner listSiteMetadata(String resourceGroupName, String name) { - return listSiteMetadataWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public BackupItemInner backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); } /** - * Gets the web app meta data. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteMetadataAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteMetadataWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); } /** - * Gets the web app meta data. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the StringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable listSiteMetadataAsync(String resourceGroupName, String name) { - return listSiteMetadataWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + public Observable backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupItemInner>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app meta data. + * Creates web app backup. + * Creates web app backup. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the StringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable> listSiteMetadataWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> backupSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - return service.listSiteMetadata(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.backupSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteMetadataDelegate(response); + ServiceResponse clientResponse = backupSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11202,27 +11386,35 @@ public Observable> call(Response listSiteMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse backupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web app meta data. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the StringDictionaryInner object if successful. + * @return the PagedList<BackupItemInner> object if successful. */ - public StringDictionaryInner listSiteMetadataSlot(String resourceGroupName, String name, String slot) { - return listSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public PagedList listBackupsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listBackupsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets the web app meta data. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app @@ -11230,36 +11422,70 @@ public StringDictionaryInner listSiteMetadataSlot(String resourceGroupName, Stri * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteMetadataSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall> listBackupsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listBackupsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets the web app meta data. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the StringDictionaryInner object + * @return the observable to the PagedList<BackupItemInner> object */ - public Observable listSiteMetadataSlotAsync(String resourceGroupName, String name, String slot) { - return listSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { - @Override - public StringDictionaryInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listBackupsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listBackupsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the web app meta data. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the StringDictionaryInner object + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable>> listBackupsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listBackupsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listSiteMetadataSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable>> listBackupsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -11272,16 +11498,14 @@ public Observable> listSiteMetadataSlotWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listBackupsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listSiteMetadataSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listBackupsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -11289,86 +11513,95 @@ public Observable> call(Response listSiteMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the meta data for web app. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param metadata Meta data of web app - * @return the StringDictionaryInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on restore request + * @return the RestoreRequestInner object if successful. */ - public StringDictionaryInner updateSiteMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { - return updateSiteMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).toBlocking().single().getBody(); + public RestoreRequestInner discoverRestoreSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); } /** - * Updates the meta data for web app. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param metadata Meta data of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteMetadataWithServiceResponseAsync(resourceGroupName, name, metadata), serviceCallback); + public ServiceCall discoverRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); } /** - * Updates the meta data for web app. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param metadata Meta data of web app - * @return the observable to the StringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on restore request + * @return the observable to the RestoreRequestInner object */ - public Observable updateSiteMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { - return updateSiteMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).map(new Func1, StringDictionaryInner>() { + public Observable discoverRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, RestoreRequestInner>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public RestoreRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the meta data for web app. + * Discovers existing web app backups that can be restored. + * Discovers existing web app backups that can be restored. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param metadata Meta data of web app - * @return the observable to the StringDictionaryInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on restore request + * @return the observable to the RestoreRequestInner object */ - public Observable> updateSiteMetadataWithServiceResponseAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { + public Observable> discoverRestoreSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (metadata == null) { - throw new IllegalArgumentException("Parameter metadata 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(metadata); - return service.updateSiteMetadata(resourceGroupName, name, this.client.subscriptionId(), metadata, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.discoverRestoreSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteMetadataDelegate(response); + ServiceResponse clientResponse = discoverRestoreSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11377,93 +11610,94 @@ public Observable> call(Response updateSiteMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse discoverRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @param metadata Meta data of web app - * @return the StringDictionaryInner object if successful. + * @return the BackupItemInner object if successful. */ - public StringDictionaryInner updateSiteMetadataSlot(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { - return updateSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).toBlocking().single().getBody(); + public BackupItemInner getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().getBody(); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @param metadata Meta data of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata), serviceCallback); + public ServiceCall getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @param metadata Meta data of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the BackupItemInner object */ - public Observable updateSiteMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { - return updateSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).map(new Func1, StringDictionaryInner>() { + public Observable getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, BackupItemInner>() { @Override - public StringDictionaryInner call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress. + * Gets status of a web app backup that may be in progress. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @param metadata Meta data of web app - * @return the observable to the StringDictionaryInner object + * @return the observable to the BackupItemInner object */ - public Observable> updateSiteMetadataSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + public Observable> getBackupStatusSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (metadata == null) { - throw new IllegalArgumentException("Parameter metadata is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(metadata); - return service.updateSiteMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), metadata, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getBackupStatusSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteMetadataSlotDelegate(response); + ServiceResponse clientResponse = getBackupStatusSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11472,78 +11706,94 @@ public Observable> call(Response updateSiteMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getBackupStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web app logs configuration. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the SiteLogsConfigInner object if successful. + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the BackupItemInner object if successful. */ - public SiteLogsConfigInner getSiteLogsConfig(String resourceGroupName, String name) { - return getSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public BackupItemInner deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { + return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().getBody(); } /** - * Gets the web app logs configuration. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteLogsConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); } /** - * Gets the web app logs configuration. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SiteLogsConfigInner object + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the BackupItemInner object */ - public Observable getSiteLogsConfigAsync(String resourceGroupName, String name) { - return getSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteLogsConfigInner>() { + public Observable deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, BackupItemInner>() { @Override - public SiteLogsConfigInner call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app logs configuration. + * Deletes a backup from Azure Storage. + * Deletes a backup from Azure Storage. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the SiteLogsConfigInner object + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the BackupItemInner object */ - public Observable> getSiteLogsConfigWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> deleteBackupSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteLogsConfig(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteBackupSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteLogsConfigDelegate(response); + ServiceResponse clientResponse = deleteBackupSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11552,86 +11802,102 @@ public Observable> call(Response getSiteLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteBackupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteLogsConfig Site logs configuration - * @return the SiteLogsConfigInner object if successful. + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the BackupItemInner object if successful. */ - public SiteLogsConfigInner updateSiteLogsConfig(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { - return updateSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).toBlocking().single().getBody(); + public BackupItemInner listBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + return listBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().getBody(); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteLogsConfig Site logs configuration + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig), serviceCallback); + public ServiceCall listBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(listBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteLogsConfig Site logs configuration - * @return the observable to the SiteLogsConfigInner object + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable updateSiteLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { - return updateSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { + public Observable listBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + return listBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, BackupItemInner>() { @Override - public SiteLogsConfigInner call(ServiceResponse response) { + public BackupItemInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the meta data for web app. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param siteLogsConfig Site logs configuration - * @return the observable to the SiteLogsConfigInner object + * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupItemInner object */ - public Observable> updateSiteLogsConfigWithServiceResponseAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + public Observable> listBackupStatusSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteLogsConfig == null) { - throw new IllegalArgumentException("Parameter siteLogsConfig 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(siteLogsConfig); - return service.updateSiteLogsConfig(resourceGroupName, name, this.client.subscriptionId(), siteLogsConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.listBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteLogsConfigDelegate(response); + ServiceResponse clientResponse = listBackupStatusSecretsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11640,180 +11906,189 @@ public Observable> call(Response updateSiteLogsConfigDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web app logs configuration. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the SiteLogsConfigInner object if successful. + * @param request Information on restore request + * @return the RestoreResponseInner object if successful. */ - public SiteLogsConfigInner getSiteLogsConfigSlot(String resourceGroupName, String name, String slot) { - return getSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public RestoreResponseInner restoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().last().getBody(); } /** - * Gets the web app logs configuration. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteLogsConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall restoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); } /** - * Gets the web app logs configuration. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteLogsConfigInner object + * @param request Information on restore request + * @return the observable for the request */ - public Observable getSiteLogsConfigSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteLogsConfigInner>() { + public Observable restoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, RestoreResponseInner>() { @Override - public SiteLogsConfigInner call(ServiceResponse response) { + public RestoreResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the web app logs configuration. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the SiteLogsConfigInner object + * @param request Information on restore request + * @return the observable for the request */ - public Observable> getSiteLogsConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> restoreSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - return service.getSiteLogsConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getSiteLogsConfigSlotDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getSiteLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(request); + final String apiVersion = "2016-08-01"; + Observable> observable = service.restoreSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Updates the meta data for web app. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteLogsConfig Site logs configuration - * @return the SiteLogsConfigInner object if successful. + * @param request Information on restore request + * @return the RestoreResponseInner object if successful. */ - public SiteLogsConfigInner updateSiteLogsConfigSlot(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { - return updateSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).toBlocking().single().getBody(); + public RestoreResponseInner beginRestoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().getBody(); } /** - * Updates the meta data for web app. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteLogsConfig Site logs configuration + * @param request Information on restore request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig), serviceCallback); + public ServiceCall beginRestoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); } /** - * Updates the meta data for web app. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteLogsConfig Site logs configuration - * @return the observable to the SiteLogsConfigInner object + * @param request Information on restore request + * @return the observable to the RestoreResponseInner object */ - public Observable updateSiteLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { - return updateSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { + public Observable beginRestoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, RestoreResponseInner>() { @Override - public SiteLogsConfigInner call(ServiceResponse response) { + public RestoreResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the meta data for web app. + * Restores a web app. + * Restores a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param siteLogsConfig Site logs configuration - * @return the observable to the SiteLogsConfigInner object + * @param request Information on restore request + * @return the observable to the RestoreResponseInner object */ - public Observable> updateSiteLogsConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + public Observable> beginRestoreSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (backupId == null) { + throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (siteLogsConfig == null) { - throw new IllegalArgumentException("Parameter siteLogsConfig 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 (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - Validator.validate(siteLogsConfig); - return service.updateSiteLogsConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteLogsConfig, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.beginRestoreSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteLogsConfigSlotDelegate(response); + ServiceResponse clientResponse = beginRestoreSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11822,74 +12097,95 @@ public Observable> call(Response updateSiteLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Updates the application settings of web app. + * Updates the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param appSettings Application settings of web app + * @return the StringDictionaryInner object if successful. */ - public Object listSitePremierAddOns(String resourceGroupName, String name) { - return listSitePremierAddOnsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public StringDictionaryInner updateApplicationSettingsSlot(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).toBlocking().single().getBody(); } /** + * Updates the application settings of web app. + * Updates the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param appSettings Application settings of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePremierAddOnsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePremierAddOnsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings), serviceCallback); } /** + * Updates the application settings of web app. + * Updates the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param appSettings Application settings of web app + * @return the observable to the StringDictionaryInner object */ - public Observable listSitePremierAddOnsAsync(String resourceGroupName, String name) { - return listSitePremierAddOnsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).map(new Func1, StringDictionaryInner>() { @Override - public Object call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Updates the application settings of web app. + * Updates the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param appSettings Application settings of web app + * @return the observable to the StringDictionaryInner object */ - public Observable> listSitePremierAddOnsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> updateApplicationSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (appSettings == null) { + throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); } - return service.listSitePremierAddOns(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(appSettings); + final String apiVersion = "2016-08-01"; + return service.updateApplicationSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), appSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSitePremierAddOnsDelegate(response); + ServiceResponse clientResponse = updateApplicationSettingsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11898,60 +12194,68 @@ public Observable> call(Response response) }); } - private ServiceResponse listSitePremierAddOnsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateApplicationSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Gets the application settings of web app. + * Gets the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the StringDictionaryInner object if successful. */ - public Object listSitePremierAddOnsSlot(String resourceGroupName, String name, String slot) { - return listSitePremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public StringDictionaryInner listApplicationSettingsSlot(String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** + * Gets the application settings of web app. + * Gets the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePremierAddOnsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** + * Gets the application settings of web app. + * Gets the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the StringDictionaryInner object */ - public Observable listSitePremierAddOnsSlotAsync(String resourceGroupName, String name, String slot) { - return listSitePremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { @Override - public Object call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Gets the application settings of web app. + * Gets the application settings of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the StringDictionaryInner object */ - public Observable> listSitePremierAddOnsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> listApplicationSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -11964,15 +12268,13 @@ public Observable> listSitePremierAddOnsSlotWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSitePremierAddOnsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listApplicationSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSitePremierAddOnsSlotDelegate(response); + ServiceResponse clientResponse = listApplicationSettingsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -11981,81 +12283,95 @@ public Observable> call(Response response) }); } - private ServiceResponse listSitePremierAddOnsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listApplicationSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app + * @return the SiteAuthSettingsInner object if successful. */ - public Object getSitePremierAddOn(String resourceGroupName, String name, String premierAddOnName) { - return getSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).toBlocking().single().getBody(); + public SiteAuthSettingsInner updateAuthSettingsSlot(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).toBlocking().single().getBody(); } /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); + public ServiceCall updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings), serviceCallback); } /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable getSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { - return getSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, Object>() { + public Observable updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).map(new Func1, SiteAuthSettingsInner>() { @Override - public Object call(ServiceResponse response) { + public SiteAuthSettingsInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Updates the Authentication / Authorization settings associated with web app. + * Updates the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app + * @return the observable to the SiteAuthSettingsInner object */ - public Observable> getSitePremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName) { + public Observable> updateAuthSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteAuthSettings == null) { + throw new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null."); } - return service.getSitePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteAuthSettings); + final String apiVersion = "2016-08-01"; + return service.updateAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteAuthSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSitePremierAddOnDelegate(response); + ServiceResponse clientResponse = updateAuthSettingsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12064,89 +12380,87 @@ public Observable> call(Response response) }); } - private ServiceResponse getSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param premierAddOn the PremierAddOnRequestInner value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the SiteAuthSettingsInner object if successful. */ - public Object addSitePremierAddOn(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { - return addSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).toBlocking().single().getBody(); + public SiteAuthSettingsInner listAuthSettingsSlot(String resourceGroupName, String name, String slot) { + return listAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param premierAddOn the PremierAddOnRequestInner value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall addSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn, final ServiceCallback serviceCallback) { - return ServiceCall.create(addSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn), serviceCallback); + public ServiceCall listAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param premierAddOn the PremierAddOnRequestInner value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteAuthSettingsInner object */ - public Observable addSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { - return addSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).map(new Func1, Object>() { + public Observable listAuthSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteAuthSettingsInner>() { @Override - public Object call(ServiceResponse response) { + public SiteAuthSettingsInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Gets the Authentication / Authorization settings associated with web app. + * Gets the Authentication / Authorization settings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param premierAddOn the PremierAddOnRequestInner value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteAuthSettingsInner object */ - public Observable> addSitePremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnRequestInner premierAddOn) { + public Observable> listAuthSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (premierAddOn == null) { - throw new IllegalArgumentException("Parameter premierAddOn is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(premierAddOn); - return service.addSitePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), premierAddOn, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = addSitePremierAddOnDelegate(response); + ServiceResponse clientResponse = listAuthSettingsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12155,81 +12469,95 @@ public Observable> call(Response response) }); } - private ServiceResponse addSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listAuthSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Updates backup configuration of web app. + * Updates backup configuration of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the BackupRequestInner object if successful. */ - public Object deleteSitePremierAddOn(String resourceGroupName, String name, String premierAddOnName) { - return deleteSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).toBlocking().single().getBody(); + public BackupRequestInner updateBackupConfigurationSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); } /** + * Updates backup configuration of web app. + * Updates backup configuration of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName), serviceCallback); + public ServiceCall updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); } /** + * Updates backup configuration of web app. + * Updates backup configuration of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupRequestInner object */ - public Observable deleteSitePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { - return deleteSitePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName).map(new Func1, Object>() { + public Observable updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupRequestInner>() { @Override - public Object call(ServiceResponse response) { + public BackupRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Updates backup configuration of web app. + * Updates backup configuration of web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request + * @return the observable to the BackupRequestInner object */ - public Observable> deleteSitePremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName) { + public Observable> updateBackupConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); } - return service.deleteSitePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(request); + final String apiVersion = "2016-08-01"; + return service.updateBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSitePremierAddOnDelegate(response); + ServiceResponse clientResponse = updateBackupConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12238,48 +12566,51 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSitePremierAddOnDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the Object object if successful. */ - public Object getSitePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { - return getSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().getBody(); + public Object deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + return deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); + public ServiceCall deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the observable to the Object object */ - public Observable getSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { - return getSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, Object>() { + public Observable deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return deleteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -12288,38 +12619,34 @@ public Object call(ServiceResponse response) { } /** + * Removes the backup configuration for a web app. + * Removes the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the observable to the Object object */ - public Observable> getSitePremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + public Observable> deleteBackupConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSitePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.deleteBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSitePremierAddOnSlotDelegate(response); + ServiceResponse clientResponse = deleteBackupConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12328,7 +12655,7 @@ public Observable> call(Response response) }); } - private ServiceResponse getSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -12336,88 +12663,79 @@ private ServiceResponse getSitePremierAddOnSlotDelegate(Response addSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn, final ServiceCallback serviceCallback) { - return ServiceCall.create(addSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn), serviceCallback); + public ServiceCall getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @param premierAddOn the PremierAddOnRequestInner value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the BackupRequestInner object */ - public Observable addSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn) { - return addSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).map(new Func1, Object>() { + public Observable getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, BackupRequestInner>() { @Override - public Object call(ServiceResponse response) { + public BackupRequestInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Gets the backup configuration for a web app. + * Gets the backup configuration for a web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @param premierAddOn the PremierAddOnRequestInner value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the BackupRequestInner object */ - public Observable> addSitePremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn) { + public Observable> getBackupConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (premierAddOn == null) { - throw new IllegalArgumentException("Parameter premierAddOn is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(premierAddOn); - return service.addSitePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), premierAddOn, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = addSitePremierAddOnSlotDelegate(response); + ServiceResponse clientResponse = getBackupConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12426,88 +12744,95 @@ public Observable> call(Response response) }); } - private ServiceResponse addSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param connectionStrings Connection strings associated with web app + * @return the ConnectionStringDictionaryInner object if successful. */ - public Object deleteSitePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { - return deleteSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().getBody(); + public ConnectionStringDictionaryInner updateConnectionStringsSlot(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).toBlocking().single().getBody(); } /** + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param connectionStrings Connection strings associated with web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); + public ServiceCall updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings), serviceCallback); } /** + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param connectionStrings Connection strings associated with web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable deleteSitePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { - return deleteSitePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, Object>() { + public Observable updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).map(new Func1, ConnectionStringDictionaryInner>() { @Override - public Object call(ServiceResponse response) { + public ConnectionStringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** + * Updates the connection strings associated with web app. + * Updates the connection strings associated with web app. * - * @param resourceGroupName the String value - * @param name the String value - * @param premierAddOnName the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param connectionStrings Connection strings associated with web app + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable> deleteSitePremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + public Observable> updateConnectionStringsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (premierAddOnName == null) { - throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionStrings == null) { + throw new IllegalArgumentException("Parameter connectionStrings is required and cannot be null."); } - return service.deleteSitePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(connectionStrings); + final String apiVersion = "2016-08-01"; + return service.updateConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), connectionStrings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSitePremierAddOnSlotDelegate(response); + ServiceResponse clientResponse = updateConnectionStringsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12516,78 +12841,87 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSitePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the backup configuration for a web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the BackupRequestInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the ConnectionStringDictionaryInner object if successful. */ - public BackupRequestInner getSiteBackupConfiguration(String resourceGroupName, String name) { - return getSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public ConnectionStringDictionaryInner listConnectionStringsSlot(String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets the backup configuration for a web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupConfigurationAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets the backup configuration for a web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the BackupRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable getSiteBackupConfigurationAsync(String resourceGroupName, String name) { - return getSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name).map(new Func1, BackupRequestInner>() { + public Observable listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, ConnectionStringDictionaryInner>() { @Override - public BackupRequestInner call(ServiceResponse response) { + public ConnectionStringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the backup configuration for a web app. + * Gets the connection strings associated with web app. + * Gets the connection strings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the BackupRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the ConnectionStringDictionaryInner object */ - public Observable> getSiteBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listConnectionStringsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupConfigurationDelegate(response); + ServiceResponse clientResponse = listConnectionStringsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12596,27 +12930,29 @@ public Observable> call(Response getSiteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listConnectionStringsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the backup configuration for a web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the BackupRequestInner object if successful. + * @return the SiteLogsConfigInner object if successful. */ - public BackupRequestInner getSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { - return getSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public SiteLogsConfigInner getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets the backup configuration for a web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * * @param resourceGroupName Name of resource group * @param name Name of web app @@ -12624,36 +12960,38 @@ public BackupRequestInner getSiteBackupConfigurationSlot(String resourceGroupNam * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets the backup configuration for a web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupRequestInner object + * @return the observable to the SiteLogsConfigInner object */ - public Observable getSiteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, BackupRequestInner>() { + public Observable getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteLogsConfigInner>() { @Override - public BackupRequestInner call(ServiceResponse response) { + public SiteLogsConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the backup configuration for a web app. + * Gets the web app logs configuration. + * Gets the web app logs configuration. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupRequestInner object + * @return the observable to the SiteLogsConfigInner object */ - public Observable> getSiteBackupConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> getDiagnosticLogsConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -12666,15 +13004,13 @@ public Observable> getSiteBackupConfiguratio if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getDiagnosticLogsConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupConfigurationSlotDelegate(response); + ServiceResponse clientResponse = getDiagnosticLogsConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12683,86 +13019,95 @@ public Observable> call(Response getSiteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDiagnosticLogsConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the BackupRequestInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteLogsConfig Site logs configuration + * @return the SiteLogsConfigInner object if successful. */ - public BackupRequestInner updateSiteBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) { - return updateSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); + public SiteLogsConfigInner updateDiagnosticLogsConfigSlot(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).toBlocking().single().getBody(); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteLogsConfig Site logs configuration * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + public ServiceCall updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig), serviceCallback); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the observable to the BackupRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteLogsConfig Site logs configuration + * @return the observable to the SiteLogsConfigInner object */ - public Observable updateSiteBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request) { - return updateSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, BackupRequestInner>() { + public Observable updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).map(new Func1, SiteLogsConfigInner>() { @Override - public BackupRequestInner call(ServiceResponse response) { + public SiteLogsConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the observable to the BackupRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteLogsConfig Site logs configuration + * @return the observable to the SiteLogsConfigInner object */ - public Observable> updateSiteBackupConfigurationWithServiceResponseAsync(String resourceGroupName, String name, BackupRequestInner request) { + public Observable> updateDiagnosticLogsConfigSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request 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 (siteLogsConfig == null) { + throw new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null."); } - Validator.validate(request); - return service.updateSiteBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteLogsConfig); + final String apiVersion = "2016-08-01"; + return service.updateDiagnosticLogsConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteLogsConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteBackupConfigurationDelegate(response); + ServiceResponse clientResponse = updateDiagnosticLogsConfigSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12771,68 +13116,72 @@ public Observable> call(Response updateSiteBackupConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateDiagnosticLogsConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the BackupRequestInner object if successful. + * @param metadata Meta data of web app + * @return the StringDictionaryInner object if successful. */ - public BackupRequestInner updateSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { - return updateSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); + public StringDictionaryInner updateMetadataSlot(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).toBlocking().single().getBody(); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request + * @param metadata Meta data of web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + public ServiceCall updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata), serviceCallback); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupRequestInner object + * @param metadata Meta data of web app + * @return the observable to the StringDictionaryInner object */ - public Observable updateSiteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { - return updateSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupRequestInner>() { + public Observable updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).map(new Func1, StringDictionaryInner>() { @Override - public BackupRequestInner call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates backup configuration of web app. + * Updates the meta data for web app. + * Updates the meta data for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupRequestInner object + * @param metadata Meta data of web app + * @return the observable to the StringDictionaryInner object */ - public Observable> updateSiteBackupConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + public Observable> updateMetadataSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -12845,19 +13194,17 @@ public Observable> updateSiteBackupConfigura if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request 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 (metadata == null) { + throw new IllegalArgumentException("Parameter metadata is required and cannot be null."); } - Validator.validate(request); - return service.updateSiteBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(metadata); + final String apiVersion = "2016-08-01"; + return service.updateMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), metadata, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteBackupConfigurationSlotDelegate(response); + ServiceResponse clientResponse = updateMetadataSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12866,86 +13213,87 @@ public Observable> call(Response updateSiteBackupConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates web app backup. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the BackupItemInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the StringDictionaryInner object if successful. */ - public BackupItemInner backupSite(String resourceGroupName, String name, BackupRequestInner request) { - return backupSiteWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); + public StringDictionaryInner listMetadataSlot(String resourceGroupName, String name, String slot) { + return listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Creates web app backup. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall backupSiteAsync(String resourceGroupName, String name, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(backupSiteWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + public ServiceCall listMetadataSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Creates web app backup. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the StringDictionaryInner object */ - public Observable backupSiteAsync(String resourceGroupName, String name, BackupRequestInner request) { - return backupSiteWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, BackupItemInner>() { + public Observable listMetadataSlotAsync(String resourceGroupName, String name, String slot) { + return listMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, StringDictionaryInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public StringDictionaryInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates web app backup. + * Gets the web app meta data. + * Gets the web app meta data. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the StringDictionaryInner object */ - public Observable> backupSiteWithServiceResponseAsync(String resourceGroupName, String name, BackupRequestInner request) { + public Observable> listMetadataSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.backupSite(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = backupSiteDelegate(response); + ServiceResponse clientResponse = listMetadataSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -12954,68 +13302,68 @@ public Observable> call(Response }); } - private ServiceResponse backupSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listMetadataSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates web app backup. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the BackupItemInner object if successful. + * @return the UserInner object if successful. */ - public BackupItemInner backupSiteSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { - return backupSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); + public UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().getBody(); } /** - * Creates web app backup. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall backupSiteSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(backupSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + public ServiceCall listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Creates web app backup. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @return the observable for the request */ - public Observable backupSiteSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { - return backupSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, BackupItemInner>() { + public Observable listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public UserInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates web app backup. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @return the observable for the request */ - public Observable> backupSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + public Observable> listPublishingCredentialsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -13028,107 +13376,85 @@ public Observable> backupSiteSlotWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.backupSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = backupSiteSlotDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse backupSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + final String apiVersion = "2016-08-01"; + Observable> observable = service.listPublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Discovers existing web app backups that can be restored. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on restore request - * @return the RestoreRequestInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the UserInner object if successful. */ - public RestoreRequestInner discoverSiteRestore(String resourceGroupName, String name, RestoreRequestInner request) { - return discoverSiteRestoreWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); + public UserInner beginListPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Discovers existing web app backups that can be restored. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on restore request + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall discoverSiteRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(discoverSiteRestoreWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + public ServiceCall beginListPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Discovers existing web app backups that can be restored. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on restore request - * @return the observable to the RestoreRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the UserInner object */ - public Observable discoverSiteRestoreAsync(String resourceGroupName, String name, RestoreRequestInner request) { - return discoverSiteRestoreWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, RestoreRequestInner>() { + public Observable beginListPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, UserInner>() { @Override - public RestoreRequestInner call(ServiceResponse response) { + public UserInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Discovers existing web app backups that can be restored. + * Gets the web app publishing credentials. + * Gets the web app publishing credentials. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param request Information on restore request - * @return the observable to the RestoreRequestInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the UserInner object */ - public Observable> discoverSiteRestoreWithServiceResponseAsync(String resourceGroupName, String name, RestoreRequestInner request) { + public Observable> beginListPublishingCredentialsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.discoverSiteRestore(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.beginListPublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = discoverSiteRestoreDelegate(response); + ServiceResponse clientResponse = beginListPublishingCredentialsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13137,68 +13463,72 @@ public Observable> call(Response discoverSiteRestoreDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginListPublishingCredentialsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Discovers existing web app backups that can be restored. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the RestoreRequestInner object if successful. + * @param pushSettings Push settings associated with web app + * @return the PushSettingsInner object if successful. */ - public RestoreRequestInner discoverSiteRestoreSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { - return discoverSiteRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); + public PushSettingsInner updateSitePushSettingsSlot(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings).toBlocking().single().getBody(); } /** - * Discovers existing web app backups that can be restored. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request + * @param pushSettings Push settings associated with web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall discoverSiteRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(discoverSiteRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + public ServiceCall updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings), serviceCallback); } /** - * Discovers existing web app backups that can be restored. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable to the RestoreRequestInner object + * @param pushSettings Push settings associated with web app + * @return the observable to the PushSettingsInner object */ - public Observable discoverSiteRestoreSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { - return discoverSiteRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, RestoreRequestInner>() { + public Observable updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, pushSettings).map(new Func1, PushSettingsInner>() { @Override - public RestoreRequestInner call(ServiceResponse response) { + public PushSettingsInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Discovers existing web app backups that can be restored. + * Updates the Push settings associated with web app. + * Updates the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable to the RestoreRequestInner object + * @param pushSettings Push settings associated with web app + * @return the observable to the PushSettingsInner object */ - public Observable> discoverSiteRestoreSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + public Observable> updateSitePushSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -13211,19 +13541,17 @@ public Observable> discoverSiteRestoreSlotW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request 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 (pushSettings == null) { + throw new IllegalArgumentException("Parameter pushSettings is required and cannot be null."); } - Validator.validate(request); - return service.discoverSiteRestoreSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(pushSettings); + final String apiVersion = "2016-08-01"; + return service.updateSitePushSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), pushSettings, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = discoverSiteRestoreSlotDelegate(response); + ServiceResponse clientResponse = updateSitePushSettingsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13232,115 +13560,88 @@ public Observable> call(Response discoverSiteRestoreSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateSitePushSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Lists all available backups for web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the PagedList<BackupItemInner> object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PushSettingsInner object if successful. */ - public PagedList listSiteBackups(final String resourceGroupName, final String name) { - ServiceResponse> response = listSiteBackupsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Lists all available backups for web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listSiteBackupsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - listSiteBackupsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listSiteBackupsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Lists all available backups for web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<BackupItemInner> object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PushSettingsInner object */ - public Observable> listSiteBackupsAsync(final String resourceGroupName, final String name) { - return listSiteBackupsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, PushSettingsInner>() { + @Override + public PushSettingsInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Lists all available backups for web app. + * Gets the Push settings associated with web app. + * Gets the Push settings associated with web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the PagedList<BackupItemInner> object - */ - public Observable>> listSiteBackupsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return listSiteBackupsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listSiteBackupsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all available backups for web app. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PushSettingsInner object */ - public Observable>> listSiteBackupsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> listSitePushSettingsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteBackups(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listSitePushSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = listSiteBackupsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listSitePushSettingsSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -13348,33 +13649,29 @@ public Observable>> call(Response> listSiteBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listSitePushSettingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Lists all available backups for web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<BackupItemInner> object if successful. + * @return the SiteConfigInner object if successful. */ - public PagedList listSiteBackupsSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public SiteConfigInner getConfigurationSlot(String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Lists all available backups for web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app @@ -13382,67 +13679,38 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listSiteBackupsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall getConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Lists all available backups for web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<BackupItemInner> object + * @return the observable to the SiteConfigInner object */ - public Observable> listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot) { - return listSiteBackupsSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable getConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteConfigInner>() { + @Override + public SiteConfigInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Lists all available backups for web app. + * Gets the configuration of the web app. + * Gets the configuration of the web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<BackupItemInner> object - */ - public Observable>> listSiteBackupsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all available backups for web app. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the SiteConfigInner object */ - public Observable>> listSiteBackupsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> getConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -13455,16 +13723,14 @@ public Observable>> listSiteBackupsSlotSin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.getConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = listSiteBackupsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = getConfigurationSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -13472,85 +13738,95 @@ public Observable>> call(Response> listSiteBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets status of a web app backup that may be in progress. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the BackupItemInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the SiteConfigInner object if successful. */ - public BackupItemInner getSiteBackupStatus(String resourceGroupName, String name, String backupId) { - return getSiteBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().getBody(); + public SiteConfigInner createOrUpdateConfigurationSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + return createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().getBody(); } /** - * Gets status of a web app backup that may be in progress. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupStatusAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); + public ServiceCall createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); } /** - * Gets status of a web app backup that may be in progress. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the observable to the BackupItemInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable getSiteBackupStatusAsync(String resourceGroupName, String name, String backupId) { - return getSiteBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, BackupItemInner>() { + public Observable createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + return createOrUpdateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public SiteConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets status of a web app backup that may be in progress. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the observable to the BackupItemInner object - */ - public Observable> getSiteBackupStatusWithServiceResponseAsync(String resourceGroupName, String name, String backupId) { - if (resourceGroupName == null) { + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object + */ + public Observable> createOrUpdateConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); } - return service.getSiteBackupStatus(resourceGroupName, name, backupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteConfig); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupStatusDelegate(response); + ServiceResponse clientResponse = createOrUpdateConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13559,85 +13835,95 @@ public Observable> call(Response }); } - private ServiceResponse getSiteBackupStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createOrUpdateConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Deletes a backup from Azure Storage. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the BackupItemInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the SiteConfigInner object if successful. */ - public BackupItemInner deleteBackup(String resourceGroupName, String name, String backupId) { - return deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().getBody(); + public SiteConfigInner updateConfigurationSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + return updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().getBody(); } /** - * Deletes a backup from Azure Storage. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteBackupAsync(String resourceGroupName, String name, String backupId, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId), serviceCallback); + public ServiceCall updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig), serviceCallback); } /** - * Deletes a backup from Azure Storage. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the observable to the BackupItemInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable deleteBackupAsync(String resourceGroupName, String name, String backupId) { - return deleteBackupWithServiceResponseAsync(resourceGroupName, name, backupId).map(new Func1, BackupItemInner>() { + public Observable updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { + return updateConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).map(new Func1, SiteConfigInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public SiteConfigInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a backup from Azure Storage. + * Update the configuration of web app. + * Update the configuration of web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @return the observable to the BackupItemInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteConfig Request body that contains the configuraiton setting for the web app + * @return the observable to the SiteConfigInner object */ - public Observable> deleteBackupWithServiceResponseAsync(String resourceGroupName, String name, String backupId) { + public Observable> updateConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (siteConfig == null) { + throw new IllegalArgumentException("Parameter siteConfig is required and cannot be null."); } - return service.deleteBackup(resourceGroupName, name, backupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(siteConfig); + final String apiVersion = "2016-08-01"; + return service.updateConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteBackupDelegate(response); + ServiceResponse clientResponse = updateConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13646,93 +13932,126 @@ public Observable> call(Response }); } - private ServiceResponse deleteBackupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updateConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets status of a web app backup that may be in progress. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the BackupItemInner object if successful. + * @return the PagedList<DeploymentInner> object if successful. */ - public BackupItemInner getSiteBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot) { - return getSiteBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().getBody(); + public PagedList listDeploymentsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets status of a web app backup that may be in progress. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); + public ServiceCall> listDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets status of a web app backup that may be in progress. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupItemInner object + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable getSiteBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot) { - return getSiteBackupStatusSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, BackupItemInner>() { - @Override - public BackupItemInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listDeploymentsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets status of a web app backup that may be in progress. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupItemInner object + * @return the observable to the PagedList<DeploymentInner> object + */ + public Observable>> listDeploymentsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments. + * List deployments. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> getSiteBackupStatusSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot) { + public Observable>> listDeploymentsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteBackupStatusSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listDeploymentsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupStatusSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDeploymentsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -13740,76 +14059,80 @@ public Observable> call(Response }); } - private ServiceResponse getSiteBackupStatusSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Deletes a backup from Azure Storage. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the BackupItemInner object if successful. + * @return the DeploymentInner object if successful. */ - public BackupItemInner deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { - return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().getBody(); + public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().getBody(); } /** - * Deletes a backup from Azure Storage. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot), serviceCallback); + public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); } /** - * Deletes a backup from Azure Storage. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupItemInner object + * @return the observable to the DeploymentInner object */ - public Observable deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot) { - return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).map(new Func1, BackupItemInner>() { + public Observable getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, DeploymentInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Deletes a backup from Azure Storage. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the BackupItemInner object + * @return the observable to the DeploymentInner object */ - public Observable> deleteBackupSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot) { + public Observable> getDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -13817,15 +14140,13 @@ public Observable> deleteBackupSlotWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteBackupSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteBackupSlotDelegate(response); + ServiceResponse clientResponse = getDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13834,80 +14155,84 @@ public Observable> call(Response }); } - private ServiceResponse deleteBackupSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the BackupItemInner object if successful. + * @param deployment Details of deployment + * @return the DeploymentInner object if successful. */ - public BackupItemInner getSiteBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { - return getSiteBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().getBody(); + public DeploymentInner createDeploymentSlot(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + return createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment).toBlocking().single().getBody(); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request + * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); + public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceCall.create(createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment), serviceCallback); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { - return getSiteBackupStatusSecretsSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, BackupItemInner>() { + public Observable createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + return createDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, deployment).map(new Func1, DeploymentInner>() { @Override - public BackupItemInner call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable> getSiteBackupStatusSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + public Observable> createDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -13915,19 +14240,17 @@ public Observable> getSiteBackupStatusSecretsSl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request 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 (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); } - Validator.validate(request); - return service.getSiteBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(deployment); + final String apiVersion = "2016-08-01"; + return service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), deployment, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupStatusSecretsSlotDelegate(response); + ServiceResponse clientResponse = createDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -13936,93 +14259,94 @@ public Observable> call(Response }); } - private ServiceResponse getSiteBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @param request Information on backup request - * @return the BackupItemInner object if successful. + * @param id Id of the deployment + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. */ - public BackupItemInner getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequestInner request) { - return getSiteBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); + public Object deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + return deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().getBody(); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @param request Information on backup request + * @param id Id of the deployment + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); + public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot), serviceCallback); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param id Id of the deployment + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { - return getSiteBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, BackupItemInner>() { + public Observable deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + return deleteDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).map(new Func1, Object>() { @Override - public BackupItemInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup - * @param request Information on backup request - * @return the observable to the BackupItemInner object + * @param id Id of the deployment + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable> getSiteBackupStatusSecretsWithServiceResponseAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + public Observable> deleteDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.getSiteBackupStatusSecrets(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteBackupStatusSecretsDelegate(response); + ServiceResponse clientResponse = deleteDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -14031,171 +14355,221 @@ public Observable> call(Response }); } - private ServiceResponse getSiteBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Restores a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the RestoreResponseInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<HostNameBindingInner> object if successful. */ - public RestoreResponseInner restoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - return restoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().last().getBody(); + public PagedList listHostNameBindingsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Restores a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restoreSiteAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(restoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); + public ServiceCall> listHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Restores a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the observable for the request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable restoreSiteAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - return restoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { - @Override - public RestoreResponseInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listHostNameBindingsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Restores a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the observable for the request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<HostNameBindingInner> object + */ + public Observable>> listHostNameBindingsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get web app hostname bindings. + * Get web app hostname bindings. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> restoreSiteWithServiceResponseAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + public Observable>> listHostNameBindingsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - Observable> observable = service.restoreSite(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2016-08-01"; + return service.listHostNameBindingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostNameBindingsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Restores a web app. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the RestoreResponseInner object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostName Name of host + * @return the HostNameBindingInner object if successful. */ - public RestoreResponseInner beginRestoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - return beginRestoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); + public HostNameBindingInner getHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { + return getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); } /** - * Restores a web app. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostName Name of host * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginRestoreSiteAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginRestoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request), serviceCallback); + public ServiceCall getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); } /** - * Restores a web app. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the observable to the RestoreResponseInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostName Name of host + * @return the observable to the HostNameBindingInner object */ - public Observable beginRestoreSiteAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { - return beginRestoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, RestoreResponseInner>() { + public Observable getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return getHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, HostNameBindingInner>() { @Override - public RestoreResponseInner call(ServiceResponse response) { + public HostNameBindingInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Restores a web app. + * Get web app binding for a hostname. + * Get web app binding for a hostname. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore - * @param request Information on restore request - * @return the observable to the RestoreResponseInner object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostName Name of host + * @return the observable to the HostNameBindingInner object */ - public Observable> beginRestoreSiteWithServiceResponseAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + public Observable> getHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String hostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.beginRestoreSite(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestoreSiteDelegate(response); + ServiceResponse clientResponse = getHostNameBindingSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -14204,80 +14578,84 @@ public Observable> call(Response beginRestoreSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Restores a web app. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore + * @param hostName Name of host * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the RestoreResponseInner object if successful. + * @param hostNameBinding Host name binding information + * @return the HostNameBindingInner object if successful. */ - public RestoreResponseInner restoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - return restoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().last().getBody(); + public HostNameBindingInner createOrUpdateHostNameBindingSlot(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).toBlocking().single().getBody(); } /** - * Restores a web app. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore + * @param hostName Name of host * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request + * @param hostNameBinding Host name binding information * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restoreSiteSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(restoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); + public ServiceCall createOrUpdateHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding), serviceCallback); } /** - * Restores a web app. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore + * @param hostName Name of host * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable for the request + * @param hostNameBinding Host name binding information + * @return the observable to the HostNameBindingInner object */ - public Observable restoreSiteSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - return restoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, RestoreResponseInner>() { + public Observable createOrUpdateHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { + return createOrUpdateHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).map(new Func1, HostNameBindingInner>() { @Override - public RestoreResponseInner call(ServiceResponse response) { + public HostNameBindingInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Restores a web app. + * Creates a web app hostname binding. + * Creates a web app hostname binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore + * @param hostName Name of host * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable for the request + * @param hostNameBinding Host name binding information + * @return the observable to the HostNameBindingInner object */ - public Observable> restoreSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + public Observable> createOrUpdateHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -14285,104 +14663,113 @@ public Observable> restoreSiteSlotWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request 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 (hostNameBinding == null) { + throw new IllegalArgumentException("Parameter hostNameBinding is required and cannot be null."); } - Validator.validate(request); - Observable> observable = service.restoreSiteSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + Validator.validate(hostNameBinding); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateHostNameBindingSlot(resourceGroupName, name, hostName, slot, this.client.subscriptionId(), hostNameBinding, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Restores a web app. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the RestoreResponseInner object if successful. + * @param hostName Name of host + * @return the Object object if successful. */ - public RestoreResponseInner beginRestoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - return beginRestoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().getBody(); + public Object deleteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { + return deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); } /** - * Restores a web app. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request + * @param hostName Name of host * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall beginRestoreSiteSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { - return ServiceCall.create(beginRestoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request), serviceCallback); + public ServiceCall deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName), serviceCallback); } /** - * Restores a web app. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable to the RestoreResponseInner object + * @param hostName Name of host + * @return the observable to the Object object */ - public Observable beginRestoreSiteSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { - return beginRestoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, RestoreResponseInner>() { + public Observable deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + return deleteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).map(new Func1, Object>() { @Override - public RestoreResponseInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Restores a web app. + * Deletes a host name binding. + * Deletes a host name binding. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. - * @param request Information on restore request - * @return the observable to the RestoreResponseInner object + * @param hostName Name of host + * @return the observable to the Object object */ - public Observable> beginRestoreSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + public Observable> deleteHostNameBindingSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String hostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (backupId == null) { - throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (hostName == null) { + throw new IllegalArgumentException("Parameter hostName is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (request == null) { - throw new IllegalArgumentException("Parameter request is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(request); - return service.beginRestoreSiteSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.deleteHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginRestoreSiteSlotDelegate(response); + ServiceResponse clientResponse = deleteHostNameBindingSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -14391,116 +14778,102 @@ public Observable> call(Response beginRestoreSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteHostNameBindingSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the quota usage numbers for web app. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the HybridConnectionInner object if successful. */ - public PagedList getSiteUsages(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public HybridConnectionInner getHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return getHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().getBody(); } /** - * Gets the quota usage numbers for web app. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteUsagesSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the quota usage numbers for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<CsmUsageQuotaInner> object - */ - public Observable> getSiteUsagesAsync(final String resourceGroupName, final String name) { - return getSiteUsagesWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall getHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteUsagesSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteUsagesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return getHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the quota usage numbers for web app. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> getHybridConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.getSiteUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.getHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteUsagesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = getHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -14508,113 +14881,110 @@ public Observable>> call(Response getSiteUsages(final String resourceGroupName, final String name, final String filter) { - ServiceResponse> response = getSiteUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + private ServiceResponse getHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the HybridConnectionInner object if successful. */ - public ServiceCall> getSiteUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteUsagesSinglePageAsync(resourceGroupName, name, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public HybridConnectionInner createOrUpdateHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope).toBlocking().single().getBody(); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public Observable> getSiteUsagesAsync(final String resourceGroupName, final String name, final String filter) { - return getSiteUsagesWithServiceResponseAsync(resourceGroupName, name, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall createOrUpdateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope), serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { - return getSiteUsagesSinglePageAsync(resourceGroupName, name, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteUsagesNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable createOrUpdateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) { + public Observable> createOrUpdateHybridConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (this.client.subscriptionId() == null) { + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getSiteUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteUsagesDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = createOrUpdateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -14622,124 +14992,102 @@ public Observable>> call(Response> getSiteUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse createOrUpdateHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the quota usage numbers for web app. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the Object object if successful. */ - public PagedList getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object deleteHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().getBody(); } /** - * Gets the quota usage numbers for web app. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the quota usage numbers for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<CsmUsageQuotaInner> object - */ - public Observable> getSiteUsagesSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteUsagesSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable>> getSiteUsagesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteUsagesSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return deleteHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the quota usage numbers for web app. + * Removes a Hybrid Connection from this site. + * Removes a Hybrid Connection from this site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable>> getSiteUsagesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> deleteHybridConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.deleteHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteUsagesSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = deleteHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -14747,121 +15095,110 @@ public Observable>> call(Response getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot, final String filter) { - ServiceResponse> response = getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + private ServiceResponse deleteHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the HybridConnectionInner object if successful. */ - public ServiceCall> getSiteUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public HybridConnectionInner updateHybridConnectionSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope).toBlocking().single().getBody(); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public Observable> getSiteUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter) { - return getSiteUsagesSlotWithServiceResponseAsync(resourceGroupName, name, slot, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall updateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope), serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String filter) { - return getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteUsagesSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable updateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets the quota usage numbers for web app. + * Creates a new Hybrid Connection using a Service Bus relay. + * Creates a new Hybrid Connection using a Service Bus relay. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - ServiceResponse> * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteUsagesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + public Observable> updateHybridConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteUsagesSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = updateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -14869,117 +15206,102 @@ public Observable>> call(Response> getSiteUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse updateHybridConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metrics for web app. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<ResourceMetricInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the Object object if successful. */ - public PagedList getSiteMetrics(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object listHybridConnectionKeysSlot(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).toBlocking().single().getBody(); } /** - * Gets metrics for web app. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall listHybridConnectionKeysSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot), serviceCallback); } /** - * Gets metrics for web app. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable> getSiteMetricsAsync(final String resourceGroupName, final String name) { - return getSiteMetricsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable listHybridConnectionKeysSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return listHybridConnectionKeysSlotWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metrics for web app. + * Gets the send key name and value for a Hybrid Connection. + * Gets the send key name and value for a Hybrid Connection. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param namespaceName The namespace for this hybrid connection + * @param relayName The relay name for this hybrid connection + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable>> getSiteMetricsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteMetricsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets metrics for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSiteMetricsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> listHybridConnectionKeysSlotWithServiceResponseAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (relayName == null) { + throw new IllegalArgumentException("Parameter relayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getSiteMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listHybridConnectionKeysSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listHybridConnectionKeysSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -14987,118 +15309,88 @@ public Observable>> call(Response getSiteMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { - ServiceResponse> response = getSiteMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + private ServiceResponse listHybridConnectionKeysSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Gets metrics for web app. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the HybridConnectionInner object if successful. */ - public ServiceCall> getSiteMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricsSinglePageAsync(resourceGroupName, name, details, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public HybridConnectionInner listHybridConnectionsSlot(String resourceGroupName, String name, String slot) { + return listHybridConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets metrics for web app. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public Observable> getSiteMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getSiteMetricsWithServiceResponseAsync(resourceGroupName, name, details, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall listHybridConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listHybridConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets metrics for web app. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { - return getSiteMetricsSinglePageAsync(resourceGroupName, name, details, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricsNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable listHybridConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + return listHybridConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, HybridConnectionInner>() { + @Override + public HybridConnectionInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metrics for web app. + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Retrieves all Service Bus Hybrid Connections used by this Web App. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param details If true, metric details are included in response - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the observable to the HybridConnectionInner object */ - public Observable>> getSiteMetricsSinglePageAsync(final String resourceGroupName, final String name, final Boolean details, final String filter) { + public Observable> listHybridConnectionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteMetrics(resourceGroupName, name, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listHybridConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listHybridConnectionsSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -15106,101 +15398,68 @@ public Observable>> call(Response> getSiteMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listHybridConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metrics for web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<ResourceMetricInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the RelayServiceConnectionEntityInner object if successful. */ - public PagedList getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public RelayServiceConnectionEntityInner listRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) { + return listRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Gets metrics for web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets metrics for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable> getSiteMetricsSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteMetricsSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall listRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Gets metrics for web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable listRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + return listRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metrics for web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Retrieves all Biztalk Hybrid Connections associated with this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for the web app. + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> listRelayServiceConnectionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -15213,18 +15472,14 @@ public Observable>> getSiteMetricsSlot if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean details = null; - final String filter = null; - return service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.listRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = listRelayServiceConnectionsSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -15232,126 +15487,95 @@ public Observable>> call(Response listRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Gets metrics for web app. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the RelayServiceConnectionEntityInner object if successful. */ - public PagedList getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { - ServiceResponse> response = getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public RelayServiceConnectionEntityInner getRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { + return getRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); } /** - * Gets metrics for web app. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall getRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); } /** - * Gets metrics for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object - */ - public Observable> getSiteMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { - return getSiteMetricsSlotWithServiceResponseAsync(resourceGroupName, name, slot, details, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); - } - - /** - * Gets metrics for web app. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @param details If true, metric details are included in response - * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the observable to the PagedList<ResourceMetricInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { - return getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable getRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { + return getRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metrics for web app. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Retrieves a Biztalk Hybrid Connection identified by its entity name. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - ServiceResponse> * @param details If true, metric details are included in response - ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { + public Observable> getRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), details, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.getRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = getRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -15359,123 +15583,103 @@ public Observable>> call(Response> getSiteMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metric definitions for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<MetricDefinitionInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the RelayServiceConnectionEntityInner object if successful. */ - public PagedList getSiteMetricDefinitionsSlot(final String resourceGroupName, final String name, final String slot) { - ServiceResponse> response = getSiteMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); } /** - * Gets metric definitions for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricDefinitionsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets metric definitions for web app. - * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<MetricDefinitionInner> object - */ - public Observable> getSiteMetricDefinitionsSlotAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteMetricDefinitionsSlotWithServiceResponseAsync(resourceGroupName, name, slot) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public ServiceCall createOrUpdateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); } /** - * Gets metric definitions for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricDefinitionsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { - return getSiteMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); - } - }); + public Observable createOrUpdateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + @Override + public RelayServiceConnectionEntityInner call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metric definitions for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable>> getSiteMetricDefinitionsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + public Observable> createOrUpdateRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - return service.getSiteMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricDefinitionsSlotDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -15483,115 +15687,95 @@ public Observable>> call(Response> getSiteMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse createOrUpdateRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metric definitions for web app. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the PagedList<MetricDefinitionInner> object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the Object object if successful. */ - public PagedList getSiteMetricDefinitions(final String resourceGroupName, final String name) { - ServiceResponse> response = getSiteMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); - return new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); - } - }; + public Object deleteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { + return deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); } /** - * Gets metric definitions for web app. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricDefinitionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { - return AzureServiceCall.create( - getSiteMetricDefinitionsSinglePageAsync(resourceGroupName, name), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceCall deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); } /** - * Gets metric definitions for web app. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable> getSiteMetricDefinitionsAsync(final String resourceGroupName, final String name) { - return getSiteMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { + return deleteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } /** - * Gets metric definitions for web app. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the PagedList<MetricDefinitionInner> object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @return the observable to the Object object */ - public Observable>> getSiteMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name) { - return getSiteMetricDefinitionsSinglePageAsync(resourceGroupName, name) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.getBody().getNextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(getSiteMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets metric definitions for web app. - * - ServiceResponse> * @param resourceGroupName Name of resource group - ServiceResponse> * @param name Name of web app - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> getSiteMetricDefinitionsSinglePageAsync(final String resourceGroupName, final String name) { + public Observable> deleteRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.deleteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getSiteMetricDefinitionsDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse clientResponse = deleteRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -15599,81 +15783,102 @@ public Observable>> call(Response> getSiteMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse deleteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the publishing profile for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the InputStream object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the RelayServiceConnectionEntityInner object if successful. */ - public InputStream listSitePublishingProfileXml(String resourceGroupName, String name) { - return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public RelayServiceConnectionEntityInner updateRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); } /** - * Gets the publishing profile for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingProfileXmlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall updateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); } /** - * Gets the publishing profile for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the InputStream object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable listSitePublishingProfileXmlAsync(String resourceGroupName, String name) { - return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, InputStream>() { + public Observable updateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { @Override - public InputStream call(ServiceResponse response) { + public RelayServiceConnectionEntityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the publishing profile for web app. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the InputStream object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param entityName The name by which the Hybrid Connection is identified + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the Hybrid Connection + * @return the observable to the RelayServiceConnectionEntityInner object */ - public Observable> listSitePublishingProfileXmlWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> updateRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (entityName == null) { + throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); } - final String format = null; - CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.withFormat(null); - return service.listSitePublishingProfileXml(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), options, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSitePublishingProfileXmlDelegate(response); + ServiceResponse clientResponse = updateRelayServiceConnectionSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -15682,90 +15887,126 @@ public Observable> call(Response resp }); } + private ServiceResponse updateRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Gets the publishing profile for web app. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the InputStream object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<SiteInstanceInner> object if successful. */ - public InputStream listSitePublishingProfileXml(String resourceGroupName, String name, String format) { - return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name, format).toBlocking().single().getBody(); + public PagedList listInstanceIdentifiersSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets the publishing profile for web app. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingProfileXmlAsync(String resourceGroupName, String name, String format, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name, format), serviceCallback); + public ServiceCall> listInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets the publishing profile for web app. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the observable to the InputStream object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable listSitePublishingProfileXmlAsync(String resourceGroupName, String name, String format) { - return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name, format).map(new Func1, InputStream>() { - @Override - public InputStream call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listInstanceIdentifiersSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the publishing profile for web app. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the observable to the InputStream object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<SiteInstanceInner> object + */ + public Observable>> listInstanceIdentifiersSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all instance of a web app. + * Gets all instance of a web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listSitePublishingProfileXmlWithServiceResponseAsync(String resourceGroupName, String name, String format) { + public Observable>> listInstanceIdentifiersSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.withFormat(format); - return service.listSitePublishingProfileXml(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), options, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listInstanceIdentifiersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listSitePublishingProfileXmlDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listInstanceIdentifiersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -15773,89 +16014,134 @@ public Observable> call(Response resp }); } - private ServiceResponse listSitePublishingProfileXmlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listInstanceIdentifiersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the publishing profile for web app. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the InputStream object if successful. + * @param instanceId Id of web app instance + * @return the PagedList<DeploymentInner> object if successful. */ - public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot) { - return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public PagedList listInstanceDeploymentsSlot(final String resourceGroupName, final String name, final String slot, final String instanceId) { + ServiceResponse> response = listInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Gets the publishing profile for web app. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingProfileXmlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall> listInstanceDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gets the publishing profile for web app. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the InputStream object + * @param instanceId Id of web app instance + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable listSitePublishingProfileXmlSlotAsync(String resourceGroupName, String name, String slot) { - return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, InputStream>() { - @Override - public InputStream call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listInstanceDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + return listInstanceDeploymentsSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the publishing profile for web app. + * List deployments. + * List deployments. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the InputStream object + * @param instanceId Id of web app instance + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> listSitePublishingProfileXmlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String format = null; - CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.withFormat(null); - return service.listSitePublishingProfileXmlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), options, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + public Observable>> listInstanceDeploymentsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + return listInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSitePublishingProfileXmlSlotDelegate(response); - return Observable.just(clientResponse); + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listInstanceDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List deployments. + * List deployments. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + ServiceResponse> * @param instanceId Id of web app instance + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listInstanceDeploymentsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listInstanceDeploymentsSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceDeploymentsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -15863,96 +16149,101 @@ public Observable> call(Response resp }); } + private ServiceResponse> listInstanceDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Gets the publishing profile for web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the InputStream object if successful. + * @param instanceId Id of web app instance + * @return the DeploymentInner object if successful. */ - public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot, String format) { - return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).toBlocking().single().getBody(); + public DeploymentInner getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) { + return getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).toBlocking().single().getBody(); } /** - * Gets the publishing profile for web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSitePublishingProfileXmlSlotAsync(String resourceGroupName, String name, String slot, String format, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot, format), serviceCallback); + public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceCall.create(getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId), serviceCallback); } /** - * Gets the publishing profile for web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the observable to the InputStream object + * @param instanceId Id of web app instance + * @return the observable to the DeploymentInner object */ - public Observable listSitePublishingProfileXmlSlotAsync(String resourceGroupName, String name, String slot, String format) { - return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).map(new Func1, InputStream>() { + public Observable getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { + return getInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).map(new Func1, DeploymentInner>() { @Override - public InputStream call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Gets the publishing profile for web app. + * Get the deployment. + * Get the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param format Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp - * @return the observable to the InputStream object + * @param instanceId Id of web app instance + * @return the observable to the DeploymentInner object */ - public Observable> listSitePublishingProfileXmlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String format) { + public Observable> getInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.withFormat(format); - return service.listSitePublishingProfileXmlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), options, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSitePublishingProfileXmlSlotDelegate(response); + ServiceResponse clientResponse = getInstanceDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -15961,87 +16252,109 @@ public Observable> call(Response resp }); } - private ServiceResponse listSitePublishingProfileXmlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Restarts web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param instanceId Id of web app instance + * @param deployment Details of deployment + * @return the DeploymentInner object if successful. */ - public Object restartSiteSlot(String resourceGroupName, String name, String slot) { - return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public DeploymentInner createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { + return createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment).toBlocking().single().getBody(); } /** - * Restarts web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId Id of web app instance + * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restartSiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment, final ServiceCallback serviceCallback) { + return ServiceCall.create(createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment), serviceCallback); } /** - * Restarts web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param instanceId Id of web app instance + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable restartSiteSlotAsync(String resourceGroupName, String name, String slot) { - return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { + return createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment).map(new Func1, DeploymentInner>() { @Override - public Object call(ServiceResponse response) { + public DeploymentInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Restarts web app. + * Create a deployment. + * Create a deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param instanceId Id of web app instance + * @param deployment Details of deployment + * @return the observable to the DeploymentInner object */ - public Observable> restartSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> createInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (deployment == null) { + throw new IllegalArgumentException("Parameter deployment is required and cannot be null."); } - final Boolean softRestart = null; - final Boolean synchronous = null; - return service.restartSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(deployment); + final String apiVersion = "2016-08-01"; + return service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), deployment, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = restartSiteSlotDelegate(response); + ServiceResponse clientResponse = createInstanceDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16050,47 +16363,57 @@ public Observable> call(Response response) }); } + private ServiceResponse createInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Restarts web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted + * @param instanceId Id of web app instance * @return the Object object if successful. */ - public Object restartSiteSlot(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { - return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).toBlocking().single().getBody(); + public Object deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) { + return deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).toBlocking().single().getBody(); } /** - * Restarts web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restartSiteSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous), serviceCallback); + public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId), serviceCallback); } /** - * Restarts web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted + * @param instanceId Id of web app instance * @return the observable to the Object object */ - public Observable restartSiteSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { - return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).map(new Func1, Object>() { + public Observable deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { + return deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -16099,37 +16422,42 @@ public Object call(ServiceResponse response) { } /** - * Restarts web app. + * Delete the deployment. + * Delete the deployment. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted + * @param instanceId Id of web app instance * @return the observable to the Object object */ - public Observable> restartSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + public Observable> deleteInstanceDeploymentSlotWithServiceResponseAsync(String resourceGroupName, String name, String id, String slot, String instanceId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (id == null) { + throw new IllegalArgumentException("Parameter id is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.restartSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = restartSiteSlotDelegate(response); + ServiceResponse clientResponse = deleteInstanceDeploymentSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16138,7 +16466,7 @@ public Observable> call(Response response) }); } - private ServiceResponse restartSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -16146,72 +16474,79 @@ private ServiceResponse restartSiteSlotDelegate(Response r } /** - * Restarts web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the Object object if successful. + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the SiteCloneabilityInner object if successful. */ - public Object restartSite(String resourceGroupName, String name) { - return restartSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public SiteCloneabilityInner isCloneableSlot(String resourceGroupName, String name, String slot) { + return isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Restarts web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restartSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall isCloneableSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Restarts web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteCloneabilityInner object */ - public Observable restartSiteAsync(String resourceGroupName, String name) { - return restartSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable isCloneableSlotAsync(String resourceGroupName, String name, String slot) { + return isCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteCloneabilityInner>() { @Override - public Object call(ServiceResponse response) { + public SiteCloneabilityInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Restarts web app. + * Creates a new web app or modifies an existing web app. + * Creates a new web app or modifies an existing web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the Object object + * @param resourceGroupName Name of the resource group + * @param name Name of the web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteCloneabilityInner object */ - public Observable> restartSiteWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> isCloneableSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Boolean softRestart = null; - final Boolean synchronous = null; - return service.restartSite(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.isCloneableSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = restartSiteDelegate(response); + ServiceResponse clientResponse = isCloneableSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16220,80 +16555,126 @@ public Observable> call(Response response) }); } + private ServiceResponse isCloneableSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Restarts web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted - * @return the Object object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public Object restartSite(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { - return restartSiteWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).toBlocking().single().getBody(); + public PagedList listMetricDefinitionsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Restarts web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall restartSiteAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { - return ServiceCall.create(restartSiteWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous), serviceCallback); + public ServiceCall> listMetricDefinitionsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Restarts web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted - * @return the observable to the Object object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable restartSiteAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { - return restartSiteWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listMetricDefinitionsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listMetricDefinitionsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Restarts web app. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app - * @param synchronous If true then the API will block until the app has been restarted - * @return the observable to the Object object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<MetricDefinitionInner> object + */ + public Observable>> listMetricDefinitionsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets metric definitions for web app. + * Gets metric definitions for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> restartSiteWithServiceResponseAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + public Observable>> listMetricDefinitionsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.restartSite(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = restartSiteDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listMetricDefinitionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -16301,79 +16682,128 @@ public Observable> call(Response response) }); } - private ServiceResponse restartSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the Object object if successful. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public Object startSite(String resourceGroupName, String name) { - return startSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public PagedList listMetricsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listMetricsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall startSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(startSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets metrics for web app. + * Gets metrics for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<ResourceMetricInner> object + */ + public Observable> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listMetricsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable startSiteAsync(String resourceGroupName, String name) { - return startSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable>> listMetricsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listMetricsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @return the observable to the Object object + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> startSiteWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable>> listMetricsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.startSite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Boolean details = null; + final String filter = null; + return service.listMetricsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = startSiteDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listMetricsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -16381,86 +16811,129 @@ public Observable> call(Response response) }); } - private ServiceResponse startSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public Object startSiteSlot(String resourceGroupName, String name, String slot) { - return startSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public PagedList listMetricsSlot(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { + ServiceResponse> response = listMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall startSiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(startSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable startSiteSlotAsync(String resourceGroupName, String name, String slot) { - return startSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { - @Override - public Object call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listMetricsSlotAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { + return listMetricsSlotWithServiceResponseAsync(resourceGroupName, name, slot, details, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Starts web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param details If true, metric details are included in response + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> startSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.startSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + public Observable>> listMetricsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { + return listMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets metrics for web app. + * Gets metrics for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + ServiceResponse> * @param details If true, metric details are included in response + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listMetricsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), details, filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = startSiteSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listMetricsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -16468,78 +16941,94 @@ public Observable> call(Response response) }); } - private ServiceResponse startSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Stops web app. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot The name of the slot for this web app. + * @return the NetworkFeaturesInner object if successful. */ - public Object stopSite(String resourceGroupName, String name) { - return stopSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public NetworkFeaturesInner listNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).toBlocking().single().getBody(); } /** - * Stops web app. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall stopSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(stopSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot), serviceCallback); } /** - * Stops web app. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot The name of the slot for this web app. + * @return the observable to the NetworkFeaturesInner object */ - public Observable stopSiteAsync(String resourceGroupName, String name) { - return stopSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).map(new Func1, NetworkFeaturesInner>() { @Override - public Object call(ServiceResponse response) { + public NetworkFeaturesInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Stops web app. + * Retrieves a view of all network features in use on this web app. + * Retrieves a view of all network features in use on this web app. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param view The type of view. This can either be "summary" or "detailed". + * @param slot The name of the slot for this web app. + * @return the observable to the NetworkFeaturesInner object */ - public Observable> stopSiteWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> listNetworkFeaturesSlotWithServiceResponseAsync(String resourceGroupName, String name, String view, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (view == null) { + throw new IllegalArgumentException("Parameter view is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.stopSite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listNetworkFeaturesSlot(resourceGroupName, name, view, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = stopSiteDelegate(response); + ServiceResponse clientResponse = listNetworkFeaturesSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16548,64 +17037,69 @@ public Observable> call(Response response) }); } - private ServiceResponse stopSiteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listNetworkFeaturesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Stops web app. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the String object if successful. */ - public Object stopSiteSlot(String resourceGroupName, String name, String slot) { - return stopSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Stops web app. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall stopSiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(stopSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Stops web app. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the String object */ - public Observable stopSiteSlotAsync(String resourceGroupName, String name, String slot) { - return stopSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, String>() { @Override - public Object call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** - * Stops web app. + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName Name of resource group - * @param name Name of web app - * @param slot Name of web app slot. If not specified then will default to production slot. - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the String object */ - public Observable> stopSiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> startWebSiteNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -16618,15 +17112,14 @@ public Observable> stopSiteSlotWithServiceResponseAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.stopSiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Integer durationInSeconds = null; + return service.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = stopSiteSlotDelegate(response); + ServiceResponse clientResponse = startWebSiteNetworkTraceSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16635,74 +17128,84 @@ public Observable> call(Response response) }); } - private ServiceResponse stopSiteSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds + * @return the String object if successful. */ - public Object syncSiteRepository(String resourceGroupName, String name) { - return syncSiteRepositoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds).toBlocking().single().getBody(); } /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(syncSiteRepositoryWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, final ServiceCallback serviceCallback) { + return ServiceCall.create(startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds), serviceCallback); } /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds + * @return the observable to the String object */ - public Observable syncSiteRepositoryAsync(String resourceGroupName, String name) { - return syncSiteRepositoryWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds) { + return startWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds).map(new Func1, String>() { @Override - public Object call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** + * Start capturing network packets for the site. + * Start capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds + * @return the observable to the String object */ - public Observable> syncSiteRepositoryWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> startWebSiteNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.syncSiteRepository(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = syncSiteRepositoryDelegate(response); + ServiceResponse clientResponse = startWebSiteNetworkTraceSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16711,60 +17214,68 @@ public Observable> call(Response response) }); } - private ServiceResponse syncSiteRepositoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse startWebSiteNetworkTraceSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the Object object if successful. + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the String object if successful. */ - public Object syncSiteRepositorySlot(String resourceGroupName, String name, String slot) { - return syncSiteRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public String stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(syncSiteRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the String object */ - public Observable syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot) { - return syncSiteRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + public Observable stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, String>() { @Override - public Object call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.getBody(); } }); } /** + * Stop ongoing capturing network packets for the site. + * Stop ongoing capturing network packets for the site. * - * @param resourceGroupName the String value - * @param name the String value - * @param slot the String value - * @return the observable to the Object object + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the String object */ - public Observable> syncSiteRepositorySlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> stopWebSiteNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -16777,15 +17288,13 @@ public Observable> syncSiteRepositorySlotWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.syncSiteRepositorySlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = syncSiteRepositorySlotDelegate(response); + ServiceResponse clientResponse = stopWebSiteNetworkTraceSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16794,14 +17303,15 @@ public Observable> call(Response response) }); } - private ServiceResponse syncSiteRepositorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse stopWebSiteNetworkTraceSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Generates new random app publishing password. * Generates new random app publishing password. * * @param resourceGroupName Name of resource group @@ -16814,6 +17324,7 @@ public Object generateNewSitePublishingPasswordSlot(String resourceGroupName, St } /** + * Generates new random app publishing password. * Generates new random app publishing password. * * @param resourceGroupName Name of resource group @@ -16827,6 +17338,7 @@ public ServiceCall generateNewSitePublishingPasswordSlotAsync(String res } /** + * Generates new random app publishing password. * Generates new random app publishing password. * * @param resourceGroupName Name of resource group @@ -16844,6 +17356,7 @@ public Object call(ServiceResponse response) { } /** + * Generates new random app publishing password. * Generates new random app publishing password. * * @param resourceGroupName Name of resource group @@ -16864,10 +17377,8 @@ public Observable> generateNewSitePublishingPasswordSlot if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -16889,37 +17400,46 @@ private ServiceResponse generateNewSitePublishingPasswordSlotDelegate(Re } /** - * Generates new random app publishing password. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param operationId Id of an operation + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the Object object if successful. */ - public Object generateNewSitePublishingPassword(String resourceGroupName, String name) { - return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public Object getOperationSlot(String resourceGroupName, String name, String operationId, String slot) { + return getOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().getBody(); } /** - * Generates new random app publishing password. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param operationId Id of an operation + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall generateNewSitePublishingPasswordAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall getOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); } /** - * Generates new random app publishing password. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param operationId Id of an operation + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the observable to the Object object */ - public Observable generateNewSitePublishingPasswordAsync(String resourceGroupName, String name) { - return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + public Observable getOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot) { + return getOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -16928,31 +17448,38 @@ public Object call(ServiceResponse response) { } /** - * Generates new random app publishing password. + * Gets the operation for a web app. + * Gets the operation for a web app. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param operationId Id of an operation + * @param slot Name of web app slot. If not specified then will default to production slot. * @return the observable to the Object object */ - public Observable> generateNewSitePublishingPasswordWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.generateNewSitePublishingPassword(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.getOperationSlot(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = generateNewSitePublishingPasswordDelegate(response); + ServiceResponse clientResponse = getOperationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -16961,7 +17488,7 @@ public Observable> call(Response response) }); } - private ServiceResponse generateNewSitePublishingPasswordDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getOperationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -16969,78 +17496,119 @@ private ServiceResponse generateNewSitePublishingPasswordDelegate(Respon } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public RelayServiceConnectionEntityInner getSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) { - return getSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); + public PagedList listPerfMonCountersSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); + public ServiceCall> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the observable to the RelayServiceConnectionEntityInner object - */ - public Observable getSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { - return getSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, RelayServiceConnectionEntityInner>() { - @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { - return response.getBody(); - } - }); + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listPerfMonCountersSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @return the observable to the PagedList<PerfMonResponseInner> object + */ + public Observable>> listPerfMonCountersSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> getSiteRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName) { + public Observable>> listPerfMonCountersSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String filter = null; + return service.listPerfMonCountersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getSiteRelayServiceConnectionDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -17048,94 +17616,124 @@ public Observable> call(Respo }); } - private ServiceResponse getSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { - return createOrUpdateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); + public PagedList listPerfMonCountersSlot(final String resourceGroupName, final String name, final String slot, final String filter) { + ServiceResponse> response = listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); + public ServiceCall> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable createOrUpdateSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { - return createOrUpdateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { - @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + return listPerfMonCountersSlotWithServiceResponseAsync(resourceGroupName, name, slot, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable> createOrUpdateSiteRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + public Observable>> listPerfMonCountersSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + return listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. **** CURRENTLY UNUSED ***** + ServiceResponse> * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPerfMonCountersSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listPerfMonCountersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteRelayServiceConnectionDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -17143,85 +17741,87 @@ public Observable> call(Respo }); } - private ServiceResponse createOrUpdateSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listPerfMonCountersSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Gets sites's event logs. + * Gets sites's event logs. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the List<Object> object if successful. */ - public Object deleteSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) { - return deleteSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); + public List getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Gets sites's event logs. + * Gets sites's event logs. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName), serviceCallback); + public ServiceCall> getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceCall.create(getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Gets sites's event logs. + * Gets sites's event logs. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the List<Object> object */ - public Observable deleteSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { - return deleteSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).map(new Func1, Object>() { + public Observable> getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { @Override - public Object call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Gets sites's event logs. + * Gets sites's event logs. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the List<Object> object */ - public Observable> deleteSiteRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName) { + public Observable>> getSitePhpErrorLogFlagSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteSiteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteRelayServiceConnectionDelegate(response); + ServiceResponse> clientResponse = getSitePhpErrorLogFlagSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17230,93 +17830,87 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getSitePhpErrorLogFlagSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Resource group + * @param name web app name + * @param slot web app slot name + * @return the Object object if successful. */ - public RelayServiceConnectionEntityInner updateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { - return updateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); + public Object listPremierAddOnsSlot(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection + * @param resourceGroupName Resource group + * @param name web app name + * @param slot web app slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope), serviceCallback); + public ServiceCall listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param slot web app slot name + * @return the observable to the Object object */ - public Observable updateSiteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { - return updateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * List premier add ons for web app. + * List premier add ons for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param slot web app slot name + * @return the observable to the Object object */ - public Observable> updateSiteRelayServiceConnectionWithServiceResponseAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + public Observable> listPremierAddOnsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.updateSiteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.listPremierAddOnsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteRelayServiceConnectionDelegate(response); + ServiceResponse clientResponse = listPremierAddOnsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17325,76 +17919,80 @@ public Observable> call(Respo }); } - private ServiceResponse updateSiteRelayServiceConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listPremierAddOnsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @return the Object object if successful. */ - public RelayServiceConnectionEntityInner getSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { - return getSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); + public Object getPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().getBody(); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); + public ServiceCall getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @return the observable to the Object object */ - public Observable getSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { - return getSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, Object>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves a Biztalk Hybrid Connection identified by its entity name. + * Gets a specific premier add on. + * Gets a specific premier add on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @return the observable to the Object object */ - public Observable> getSiteRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot) { + public Observable> getPremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -17402,15 +18000,13 @@ public Observable> getSiteRel if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteRelayServiceConnectionSlotDelegate(response); + ServiceResponse clientResponse = getPremierAddOnSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17419,80 +18015,84 @@ public Observable> call(Respo }); } - private ServiceResponse getSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getPremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @param premierAddOn Premier add on request + * @return the Object object if successful. */ - public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { - return createOrUpdateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); + public Object addPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn) { + return addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).toBlocking().single().getBody(); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @param premierAddOn Premier add on request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); + public ServiceCall addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn, final ServiceCallback serviceCallback) { + return ServiceCall.create(addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn), serviceCallback); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @param premierAddOn Premier add on request + * @return the observable to the Object object */ - public Observable createOrUpdateSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { - return createOrUpdateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn) { + return addPremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).map(new Func1, Object>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Add premier add-on. + * Add premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name + * @param premierAddOn Premier add on request + * @return the observable to the Object object */ - public Observable> createOrUpdateSiteRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + public Observable> addPremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnRequestInner premierAddOn) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -17500,19 +18100,17 @@ public Observable> createOrUp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope 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 (premierAddOn == null) { + throw new IllegalArgumentException("Parameter premierAddOn is required and cannot be null."); } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(premierAddOn); + final String apiVersion = "2016-08-01"; + return service.addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), premierAddOn, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteRelayServiceConnectionSlotDelegate(response); + ServiceResponse clientResponse = addPremierAddOnSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17521,51 +18119,54 @@ public Observable> call(Respo }); } - private ServiceResponse createOrUpdateSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse addPremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name * @return the Object object if successful. */ - public Object deleteSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { - return deleteSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); + public Object deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + return deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).toBlocking().single().getBody(); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall deleteSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(deleteSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot), serviceCallback); + public ServiceCall deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot), serviceCallback); } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name * @return the observable to the Object object */ - public Observable deleteSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { - return deleteSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).map(new Func1, Object>() { + public Observable deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + return deletePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -17574,23 +18175,24 @@ public Object call(ServiceResponse response) { } /** - * Removes the association to a Biztalk Hybrid Connection, identified by its entity name. + * Delete premier add-on. + * Delete premier add-on. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. + * @param resourceGroupName Resource group + * @param name web app name + * @param premierAddOnName Premier add on + * @param slot web app slot name * @return the observable to the Object object */ - public Observable> deleteSiteRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot) { + public Observable> deletePremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); + if (premierAddOnName == null) { + throw new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); @@ -17598,15 +18200,13 @@ public Observable> deleteSiteRelayServiceConnectionSlotW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.deleteSiteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = deleteSiteRelayServiceConnectionSlotDelegate(response); + ServiceResponse clientResponse = deletePremierAddOnSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17615,7 +18215,7 @@ public Observable> call(Response response) }); } - private ServiceResponse deleteSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deletePremierAddOnSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -17623,92 +18223,82 @@ private ServiceResponse deleteSiteRelayServiceConnectionSlotDelegate(Res } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the InputStream object if successful. */ - public RelayServiceConnectionEntityInner updateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { - return updateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); + public InputStream listPublishingProfileXmlWithSecretsSlot(String resourceGroupName, String name, String slot) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope), serviceCallback); + public ServiceCall listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the InputStream object */ - public Observable updateSiteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { - return updateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, InputStream>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public InputStream call(ServiceResponse response) { return response.getBody(); } }); } /** - * Creates a new association to a Biztalk Hybrid Connection, or updates an existing one. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param entityName The name by which the Hybrid Connection is identified - * @param slot The name of the slot for the web app. - * @param connectionEnvelope The details of the Hybrid Connection - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the InputStream object */ - public Observable> updateSiteRelayServiceConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + public Observable> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (entityName == null) { - throw new IllegalArgumentException("Parameter entityName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.updateSiteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final String format = null; + CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); + options.withFormat(null); + return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), options, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteRelayServiceConnectionSlotDelegate(response); + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17717,64 +18307,77 @@ public Observable> call(Respo }); } - private ServiceResponse updateSiteRelayServiceConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for the web app. - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the InputStream object if successful. */ - public RelayServiceConnectionEntityInner listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) { - return listSiteRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public InputStream listPublishingProfileXmlWithSecretsSlot(String resourceGroupName, String name, String slot, String format) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).toBlocking().single().getBody(); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for the web app. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public ServiceCall listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, String format, final ServiceCallback serviceCallback) { + return ServiceCall.create(listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format), serviceCallback); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for the web app. - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the observable to the InputStream object */ - public Observable listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot) { - return listSiteRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, String format) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).map(new Func1, InputStream>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public InputStream call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Gets the publishing profile for web app. + * Gets the publishing profile for web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for the web app. - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param format Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp + * @return the observable to the InputStream object */ - public Observable> listSiteRelayServiceConnectionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + public Observable> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, String format) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -17787,15 +18390,15 @@ public Observable> listSiteRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listSiteRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); + options.withFormat(format); + return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), options, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listSiteRelayServiceConnectionsSlotDelegate(response); + ServiceResponse clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17804,179 +18407,175 @@ public Observable> call(Respo }); } - private ServiceResponse listSiteRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listPublishingProfileXmlWithSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the RelayServiceConnectionEntityInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the RecoverResponseInner object if successful. */ - public RelayServiceConnectionEntityInner listSiteRelayServiceConnections(String resourceGroupName, String name) { - return listSiteRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public RecoverResponseInner recoverSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + return recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().last().getBody(); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { - return ServiceCall.create(listSiteRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall recoverSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable for the request */ - public Observable listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name) { - return listSiteRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, RelayServiceConnectionEntityInner>() { + public Observable recoverSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + return recoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, RecoverResponseInner>() { @Override - public RelayServiceConnectionEntityInner call(ServiceResponse response) { + public RecoverResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves all Biztalk Hybrid Connections associated with this web app. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the observable to the RelayServiceConnectionEntityInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable for the request */ - public Observable> listSiteRelayServiceConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> recoverSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (this.client.subscriptionId() == null) { + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); } - return service.listSiteRelayServiceConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listSiteRelayServiceConnectionsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse listSiteRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); + Validator.validate(recoveryEntity); + final String apiVersion = "2016-08-01"; + Observable> observable = service.recoverSlot(resourceGroupName, name, slot, this.client.subscriptionId(), recoveryEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @return the Object object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the RecoverResponseInner object if successful. */ - public Object getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { - return getSiteVnetGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).toBlocking().single().getBody(); + public RecoverResponseInner beginRecoverSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + return beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().single().getBody(); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteVnetGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot), serviceCallback); + public ServiceCall beginRecoverSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity), serviceCallback); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable to the RecoverResponseInner object */ - public Observable getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { - return getSiteVnetGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).map(new Func1, Object>() { + public Observable beginRecoverSlotAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { + return beginRecoverSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).map(new Func1, RecoverResponseInner>() { @Override - public Object call(ServiceResponse response) { + public RecoverResponseInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Recovers a deleted web app. + * Recovers a deleted web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @return the observable to the Object object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @return the observable to the RecoverResponseInner object */ - public Observable> getSiteVnetGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + public Observable> beginRecoverSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (recoveryEntity == null) { + throw new IllegalArgumentException("Parameter recoveryEntity is required and cannot be null."); } - return service.getSiteVnetGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(recoveryEntity); + final String apiVersion = "2016-08-01"; + return service.beginRecoverSlot(resourceGroupName, name, slot, this.client.subscriptionId(), recoveryEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteVnetGatewaySlotDelegate(response); + ServiceResponse clientResponse = beginRecoverSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -17985,108 +18584,87 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteVnetGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) + private ServiceResponse beginRecoverSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the Virtual Network Gateway. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the VnetGatewayInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. */ - public VnetGatewayInner createOrUpdateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).toBlocking().single().getBody(); + public Object resetSlotConfigurationSlot(String resourceGroupName, String name, String slot) { + return resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Updates the Virtual Network Gateway. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + public ServiceCall resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Updates the Virtual Network Gateway. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + public Observable resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return resetSlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { @Override - public VnetGatewayInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the Virtual Network Gateway. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable> createOrUpdateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + public Observable> resetSlotConfigurationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + return service.resetSlotConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteVNETConnectionGatewaySlotDelegate(response); + ServiceResponse clientResponse = resetSlotConfigurationSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -18095,107 +18673,89 @@ public Observable> call(Response }); } - private ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse resetSlotConfigurationSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the Virtual Network Gateway. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the VnetGatewayInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. */ - public VnetGatewayInner updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { - return updateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).toBlocking().single().getBody(); + public Object restartSlot(String resourceGroupName, String name, String slot) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } /** - * Updates the Virtual Network Gateway. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + public ServiceCall restartSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); } /** - * Updates the Virtual Network Gateway. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { - return updateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + public Observable restartSlotAsync(String resourceGroupName, String name, String slot) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { @Override - public VnetGatewayInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the Virtual Network Gateway. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object */ - public Observable> updateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + public Observable> restartSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - return service.updateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2016-08-01"; + final Boolean softRestart = null; + final Boolean synchronous = null; + return service.restartSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteVNETConnectionGatewaySlotDelegate(response); + ServiceResponse clientResponse = restartSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -18204,51 +18764,50 @@ public Observable> call(Response }); } - private ServiceResponse updateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted * @return the Object object if successful. */ - public Object getSiteVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { - return getSiteVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().getBody(); + public Object restartSlot(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).toBlocking().single().getBody(); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall getSiteVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { - return ServiceCall.create(getSiteVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); + public ServiceCall restartSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, final ServiceCallback serviceCallback) { + return ServiceCall.create(restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous), serviceCallback); } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted * @return the observable to the Object object */ - public Observable getSiteVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { - return getSiteVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1, Object>() { + public Observable restartSlotAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + return restartSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).map(new Func1, Object>() { @Override public Object call(ServiceResponse response) { return response.getBody(); @@ -18257,39 +18816,36 @@ public Object call(ServiceResponse response) { } /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Restarts web app. + * Restarts web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app + * @param synchronous If true then the API will block until the app has been restarted * @return the observable to the Object object */ - public Observable> getSiteVnetGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + public Observable> restartSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2016-08-01"; + return service.restartSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getSiteVnetGatewayDelegate(response); + ServiceResponse clientResponse = restartSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -18298,102 +18854,135 @@ public Observable> call(Response response) }); } - private ServiceResponse getSiteVnetGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse restartSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.mapperAdapter()) .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the Virtual Network Gateway. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the VnetGatewayInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of the source slot + * @param slotSwapEntity Request body that contains the target slot name + * @return the PagedList<SlotDifferenceInner> object if successful. */ - public VnetGatewayInner createOrUpdateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); + public PagedList getSlotsDifferencesSlot(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + ServiceResponse> response = getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Updates the Virtual Network Gateway. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of the source slot + * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall createOrUpdateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(createOrUpdateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + public ServiceCall> getSlotsDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates the Virtual Network Gateway. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of the source slot + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the PagedList<SlotDifferenceInner> object */ - public Observable createOrUpdateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return createOrUpdateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { - @Override - public VnetGatewayInner call(ServiceResponse response) { - return response.getBody(); - } - }); + public Observable> getSlotsDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + return getSlotsDifferencesSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Updates the Virtual Network Gateway. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of the source slot + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> getSlotsDifferencesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { + return getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of the source slot + ServiceResponse> * @param slotSwapEntity Request body that contains the target slot name + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> createOrUpdateSiteVNETConnectionGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + public Observable>> getSlotsDifferencesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope 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 (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); } - Validator.validate(connectionEnvelope); - return service.createOrUpdateSiteVNETConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + return service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = createOrUpdateSiteVNETConnectionGatewayDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = getSlotsDifferencesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -18401,100 +18990,175 @@ public Observable> call(Response }); } - private ServiceResponse createOrUpdateSiteVNETConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getSlotsDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the Virtual Network Gateway. + * Swaps web app slots. + * Swaps web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the VnetGatewayInner object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the Object object if successful. */ - public VnetGatewayInner updateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return updateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); + public Object swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().last().getBody(); } /** - * Updates the Virtual Network Gateway. + * Swaps web app slots. + * Swaps web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall updateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { - return ServiceCall.create(updateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); } /** - * Updates the Virtual Network Gateway. + * Swaps web app slots. + * Swaps web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable for the request */ - public Observable updateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { - return updateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + public Observable swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return swapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { @Override - public VnetGatewayInner call(ServiceResponse response) { + public Object call(ServiceResponse response) { return response.getBody(); } }); } /** - * Updates the Virtual Network Gateway. + * Swaps web app slots. + * Swaps web app slots. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @param connectionEnvelope The properties to update this gateway with. - * @return the observable to the VnetGatewayInner object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable for the request */ - public Observable> updateSiteVNETConnectionGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + public Observable> swapSlotsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope 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 (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); } - Validator.validate(connectionEnvelope); - return service.updateSiteVNETConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + Observable> observable = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the Object object if successful. + */ + public Object beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().getBody(); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the Object object + */ + public Observable beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of source slot for the swap + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the Object object + */ + public Observable> beginSwapSlotsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + return service.beginSwapSlotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateSiteVNETConnectionGatewayDelegate(response); + ServiceResponse clientResponse = beginSwapSlotsSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -18503,78 +19167,215 @@ public Observable> call(Response }); } - private ServiceResponse updateSiteVNETConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.mapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginSwapSlotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the List<VnetInfoInner> object if successful. + * @param resourceGroupName Resource group + * @param name Website Name + * @param slot Website Slot + * @return the PagedList<SnapshotInner> object if successful. */ - public List getSiteVNETConnections(String resourceGroupName, String name) { - return getSiteVNETConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + public PagedList listSnapshotsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * - * @param resourceGroupName The resource group name - * @param name The name of the web app + * @param resourceGroupName Resource group + * @param name Website Name + * @param slot Website Slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteVNETConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getSiteVNETConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + public ServiceCall> listSnapshotsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the observable to the List<VnetInfoInner> object + * @param resourceGroupName Resource group + * @param name Website Name + * @param slot Website Slot + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable> listSnapshotsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listSnapshotsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Resource group + * @param name Website Name + * @param slot Website Slot + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable>> listSnapshotsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSnapshotsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + ServiceResponse> * @param resourceGroupName Resource group + ServiceResponse> * @param name Website Name + ServiceResponse> * @param slot Website Slot + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSnapshotsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listSnapshotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner getSourceControlSlot(String resourceGroupName, String name, String slot) { + return getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteSourceControlInner object */ - public Observable> getSiteVNETConnectionsAsync(String resourceGroupName, String name) { - return getSiteVNETConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + public Observable getSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + return getSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SiteSourceControlInner>() { @Override - public List call(ServiceResponse> response) { + public SiteSourceControlInner call(ServiceResponse response) { return response.getBody(); } }); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Get the source control configuration of web app. + * Get the source control configuration of web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @return the observable to the List<VnetInfoInner> object + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the SiteSourceControlInner object */ - public Observable>> getSiteVNETConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { + public Observable> getSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSiteVNETConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2016-08-01"; + return service.getSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> clientResponse = getSiteVNETConnectionsDelegate(response); + ServiceResponse clientResponse = getSourceControlSlotDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -18583,86 +19384,4154 @@ public Observable>> call(Response> getSiteVNETConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Update the source control configuration of web app. + * Update the source control configuration of web app. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for this web app. - * @return the List<VnetInfoInner> object if successful. + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner createOrUpdateSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().getBody(); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public List getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) { - return getSiteVNETConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + public ServiceCall createOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable createOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable> createOrUpdateSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (siteSourceControl == null) { + throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); + } + Validator.validate(siteSourceControl); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. + */ + public Object deleteSourceControlSlot(String resourceGroupName, String name, String slot) { + return deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable> deleteSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.deleteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner updateSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return updateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().getBody(); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl), serviceCallback); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable updateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return updateSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable> updateSourceControlSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (siteSourceControl == null) { + throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); + } + Validator.validate(siteSourceControl); + final String apiVersion = "2016-08-01"; + return service.updateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. + */ + public Object startSlot(String resourceGroupName, String name, String slot) { + return startSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall startSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(startSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable startSlotAsync(String resourceGroupName, String name, String slot) { + return startSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable> startSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.startSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. + */ + public Object stopSlot(String resourceGroupName, String name, String slot) { + return stopSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall stopSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(stopSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable stopSlotAsync(String resourceGroupName, String name, String slot) { + return stopSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable> stopSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.stopSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the Object object if successful. + */ + public Object syncRepositorySlot(String resourceGroupName, String name, String slot) { + return syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall syncRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable syncRepositorySlotAsync(String resourceGroupName, String name, String slot) { + return syncRepositorySlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the Object object + */ + public Observable> syncRepositorySlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.syncRepositorySlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncRepositorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncRepositorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listUsagesSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listUsagesSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listUsagesSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + final String filter = null; + return service.listUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsagesSlot(final String resourceGroupName, final String name, final String slot, final String filter) { + ServiceResponse> response = listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + return listUsagesSlotWithServiceResponseAsync(resourceGroupName, name, slot, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + return listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slot Name of web app slot. If not specified then will default to production slot. + ServiceResponse> * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnetConnectionsSlot(String resourceGroupName, String name, String slot) { + return listVnetConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listVnetConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listVnetConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the List<VnetInfoInner> object + */ + public Observable> listVnetConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + return listVnetConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param slot The name of the slot for this web app. + * @return the observable to the List<VnetInfoInner> object + */ + public Observable>> listVnetConnectionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listVnetConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + return getVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the observable to the VnetInfoInner object + */ + public Observable getVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { + return getVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the observable to the VnetInfoInner object + */ + public Observable> getVnetConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.getVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner createOrUpdateVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + return createOrUpdateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable createOrUpdateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + return createOrUpdateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable> createOrUpdateVnetConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the Object object if successful. + */ + public Object deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + return deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot), serviceCallback); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the observable to the Object object + */ + public Observable deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { + return deleteVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @return the observable to the Object object + */ + public Observable> deleteVnetConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.deleteVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner updateVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + return updateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable updateVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + return updateVnetConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable> updateVnetConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @return the Object object if successful. + */ + public Object getVnetConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).toBlocking().single().getBody(); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot), serviceCallback); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @return the observable to the Object object + */ + public Observable getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @return the observable to the Object object + */ + public Observable> getVnetConnectionGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.getVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner createOrUpdateVnetConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable createOrUpdateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable> createOrUpdateVnetConnectionGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner updateVnetConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope), serviceCallback); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable updateVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable> updateVnetConnectionGatewaySlotWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the PagedList<SlotDifferenceInner> object if successful. + */ + public PagedList getSlotsDifferencesFromProduction(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + ServiceResponse> response = getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> getSlotsDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable> getSlotsDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + return getSlotsDifferencesFromProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the PagedList<SlotDifferenceInner> object + */ + public Observable>> getSlotsDifferencesFromProductionWithServiceResponseAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + return getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param slotSwapEntity Request body that contains the target slot name + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSlotsDifferencesFromProductionSinglePageAsync(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + return service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSlotsDifferencesFromProductionDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSlotsDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the Object object if successful. + */ + public Object swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().last().getBody(); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable for the request + */ + public Observable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable for the request + */ + public Observable> swapSlotWithProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + Observable> observable = service.swapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the Object object if successful. + */ + public Object beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceCall.create(beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the Object object + */ + public Observable beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Swaps web app slots. + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @return the observable to the Object object + */ + public Observable> beginSwapSlotWithProductionWithServiceResponseAsync(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + final String apiVersion = "2016-08-01"; + return service.beginSwapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSwapSlotWithProductionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSwapSlotWithProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Resource group + * @param name Website Name + * @return the PagedList<SnapshotInner> object if successful. + */ + public PagedList listSnapshots(final String resourceGroupName, final String name) { + ServiceResponse> response = listSnapshotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Resource group + * @param name Website Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listSnapshotsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSnapshotsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Resource group + * @param name Website Name + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable> listSnapshotsAsync(final String resourceGroupName, final String name) { + return listSnapshotsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + * @param resourceGroupName Resource group + * @param name Website Name + * @return the observable to the PagedList<SnapshotInner> object + */ + public Observable>> listSnapshotsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSnapshotsSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSnapshotsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. + * + ServiceResponse> * @param resourceGroupName Resource group + ServiceResponse> * @param name Website Name + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSnapshotsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listSnapshots(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner getSourceControl(String resourceGroupName, String name) { + return getSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(getSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteSourceControlInner object + */ + public Observable getSourceControlAsync(String resourceGroupName, String name) { + return getSourceControlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Get the source control configuration of web app. + * Get the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the SiteSourceControlInner object + */ + public Observable> getSourceControlWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.getSourceControl(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner createOrUpdateSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().getBody(); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable createOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable> createOrUpdateSourceControlWithServiceResponseAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (siteSourceControl == null) { + throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); + } + Validator.validate(siteSourceControl); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the Object object if successful. + */ + public Object deleteSourceControl(String resourceGroupName, String name) { + return deleteSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteSourceControlWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable deleteSourceControlAsync(String resourceGroupName, String name) { + return deleteSourceControlWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Delete source control configuration of web app. + * Delete source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable> deleteSourceControlWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.deleteSourceControl(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the SiteSourceControlInner object if successful. + */ + public SiteSourceControlInner updateSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return updateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().getBody(); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl), serviceCallback); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable updateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return updateSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).map(new Func1, SiteSourceControlInner>() { + @Override + public SiteSourceControlInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Update the source control configuration of web app. + * Update the source control configuration of web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param siteSourceControl Request body that contains the source control parameters + * @return the observable to the SiteSourceControlInner object + */ + public Observable> updateSourceControlWithServiceResponseAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (siteSourceControl == null) { + throw new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null."); + } + Validator.validate(siteSourceControl); + final String apiVersion = "2016-08-01"; + return service.updateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the Object object if successful. + */ + public Object start(String resourceGroupName, String name) { + return startWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall startAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(startWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable startAsync(String resourceGroupName, String name) { + return startWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Starts web app. + * Starts web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.start(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the Object object if successful. + */ + public Object stop(String resourceGroupName, String name) { + return stopWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall stopAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(stopWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable stopAsync(String resourceGroupName, String name) { + return stopWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Stops web app. + * Stops web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable> stopWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.stop(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the Object object if successful. + */ + public Object syncRepository(String resourceGroupName, String name) { + return syncRepositoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall syncRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(syncRepositoryWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable syncRepositoryAsync(String resourceGroupName, String name) { + return syncRepositoryWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Sync web app repository. + * Sync web app repository. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the Object object + */ + public Observable> syncRepositoryWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.syncRepository(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncRepositoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncRepositoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsages(final String resourceGroupName, final String name) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listUsagesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesAsync(final String resourceGroupName, final String name) { + return listUsagesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listUsagesSinglePageAsync(resourceGroupName, name) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + final String filter = null; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object if successful. + */ + public PagedList listUsages(final String resourceGroupName, final String name, final String filter) { + ServiceResponse> response = listUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listUsagesAsync(final String resourceGroupName, final String name, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listUsagesSinglePageAsync(resourceGroupName, name, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable> listUsagesAsync(final String resourceGroupName, final String name, final String filter) { + return listUsagesWithServiceResponseAsync(resourceGroupName, name, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the observable to the PagedList<CsmUsageQuotaInner> object + */ + public Observable>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { + return listUsagesSinglePageAsync(resourceGroupName, name, filter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. + * + ServiceResponse> * @param resourceGroupName Name of resource group + ServiceResponse> * @param name Name of web app + ServiceResponse> * @param filter Return only usages specified in the filter. Filter is specified by using OData syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the List<VnetInfoInner> object if successful. + */ + public List listVnetConnections(String resourceGroupName, String name) { + return listVnetConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listVnetConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceCall.create(listVnetConnectionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the List<VnetInfoInner> object + */ + public Observable> listVnetConnectionsAsync(String resourceGroupName, String name) { + return listVnetConnectionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @return the observable to the List<VnetInfoInner> object + */ + public Observable>> listVnetConnectionsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.listVnetConnections(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner getVnetConnection(String resourceGroupName, String name, String vnetName) { + return getVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the observable to the VnetInfoInner object + */ + public Observable getVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + return getVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the observable to the VnetInfoInner object + */ + public Observable> getVnetConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.getVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner createOrUpdateVnetConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return createOrUpdateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable createOrUpdateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return createOrUpdateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable> createOrUpdateVnetConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the Object object if successful. + */ + public Object deleteVnetConnection(String resourceGroupName, String name, String vnetName) { + return deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) { + return ServiceCall.create(deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName), serviceCallback); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the observable to the Object object + */ + public Observable deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + return deleteVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Removes the specified Virtual Network Connection association from this web app. + * Removes the specified Virtual Network Connection association from this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @return the observable to the Object object + */ + public Observable> deleteVnetConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.deleteVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the VnetInfoInner object if successful. + */ + public VnetInfoInner updateVnetConnection(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return updateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope), serviceCallback); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable updateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + return updateVnetConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope).map(new Func1, VnetInfoInner>() { + @Override + public VnetInfoInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @return the observable to the VnetInfoInner object + */ + public Observable> updateVnetConnectionWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @return the Object object if successful. + */ + public Object getVnetConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().getBody(); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) { + return ServiceCall.create(getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName), serviceCallback); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @return the observable to the Object object + */ + public Observable getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @return the observable to the Object object + */ + public Observable> getVnetConnectionGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-08-01"; + return service.getVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner createOrUpdateVnetConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall createOrUpdateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(createOrUpdateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable createOrUpdateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable> createOrUpdateVnetConnectionGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.createOrUpdateVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the VnetGatewayInner object if successful. + */ + public VnetGatewayInner updateVnetConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(updateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope), serviceCallback); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable updateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1, VnetGatewayInner>() { + @Override + public VnetGatewayInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates the Virtual Network Gateway. + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" + * @param connectionEnvelope The properties to update this gateway with. + * @return the observable to the VnetGatewayInner object + */ + public Observable> updateVnetConnectionGatewayWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + final String apiVersion = "2016-08-01"; + return service.updateVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionGatewayDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all Web Apps for a subscription. + * Gets all Web Apps for a subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeletedSiteInner> object if successful. + */ + public PagedList listDeletedNext(final String nextPageLink) { + ServiceResponse> response = listDeletedNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listDeletedNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeletedNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listDeletedNextAsync(final String nextPageLink) { + return listDeletedNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listDeletedNextWithServiceResponseAsync(final String nextPageLink) { + return listDeletedNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeletedNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets deleted web apps in subscription. + * Gets deleted web apps in subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listDeletedNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listDeletedNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDeletedNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeletedNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listByResourceGroupNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the web apps for a subscription in the specified resource group. + * Gets the web apps for a subscription in the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listByResourceGroupNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<BackupItemInner> object if successful. + */ + public PagedList listBackupsNext(final String nextPageLink) { + ServiceResponse> response = listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listBackupsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listBackupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable> listBackupsNextAsync(final String nextPageLink) { + return listBackupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<BackupItemInner> object + */ + public Observable>> listBackupsNextWithServiceResponseAsync(final String nextPageLink) { + return listBackupsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBackupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all available backups for web app. + * Lists all available backups for web app. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBackupsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listBackupsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBackupsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List deployments. + * List deployments. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeploymentInner> object if successful. + */ + public PagedList listDeploymentsNext(final String nextPageLink) { + ServiceResponse> response = listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * List deployments. + * List deployments. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listDeploymentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listDeploymentsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * List deployments. + * List deployments. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for this web app. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @return the {@link ServiceCall} object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DeploymentInner> object */ - public ServiceCall> getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { - return ServiceCall.create(getSiteVNETConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + public Observable> listDeploymentsNextAsync(final String nextPageLink) { + return listDeploymentsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * List deployments. + * List deployments. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for this web app. - * @return the observable to the List<VnetInfoInner> object + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot) { - return getSiteVNETConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.getBody(); - } - }); + public Observable>> listDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { + return listDeploymentsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listDeploymentsNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * List deployments. + * List deployments. * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param slot The name of the slot for this web app. - * @return the observable to the List<VnetInfoInner> object + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteVNETConnectionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + public Observable>> listDeploymentsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteVNETConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listDeploymentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> clientResponse = getSiteVNETConnectionsSlotDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDeploymentsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -18670,102 +23539,107 @@ public Observable>> call(Response> getSiteVNETConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listDeploymentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the difference in configuration settings between two web app slots. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SlotDifferenceInner> object if successful. + * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSlotsDifferencesFromProductionNext(final String nextPageLink) { - ServiceResponse> response = getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listHostNameBindingsNext(final String nextPageLink) { + ServiceResponse> response = listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get the difference in configuration settings between two web app slots. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSlotsDifferencesFromProductionNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listHostNameBindingsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listHostNameBindingsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get the difference in configuration settings between two web app slots. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable> getSlotsDifferencesFromProductionNextAsync(final String nextPageLink) { - return getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listHostNameBindingsNextAsync(final String nextPageLink) { + return listHostNameBindingsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable>> getSlotsDifferencesFromProductionNextWithServiceResponseAsync(final String nextPageLink) { - return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listHostNameBindingsNextWithServiceResponseAsync(final String nextPageLink) { + return listHostNameBindingsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Get web app hostname bindings. + * Get web app hostname bindings. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSlotsDifferencesFromProductionNextSinglePageAsync(final String nextPageLink) { + public Observable>> listHostNameBindingsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSlotsDifferencesFromProductionNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listHostNameBindingsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSlotsDifferencesFromProductionNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listHostNameBindingsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -18773,102 +23647,107 @@ public Observable>> call(Response> getSlotsDifferencesFromProductionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listHostNameBindingsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the difference in configuration settings between two web app slots. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SlotDifferenceInner> object if successful. + * @return the PagedList<SiteInstanceInner> object if successful. */ - public PagedList getSlotsDifferencesSlotNext(final String nextPageLink) { - ServiceResponse> response = getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listInstanceIdentifiersNext(final String nextPageLink) { + ServiceResponse> response = listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get the difference in configuration settings between two web app slots. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSlotsDifferencesSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listInstanceIdentifiersNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listInstanceIdentifiersNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get the difference in configuration settings between two web app slots. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable> getSlotsDifferencesSlotNextAsync(final String nextPageLink) { - return getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listInstanceIdentifiersNextAsync(final String nextPageLink) { + return listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Gets all instance of a web app. + * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SlotDifferenceInner> object + * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable>> getSlotsDifferencesSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listInstanceIdentifiersNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceIdentifiersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get the difference in configuration settings between two web app slots. + * Gets all instance of a web app. + * Gets all instance of a web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSlotsDifferencesSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listInstanceIdentifiersNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSlotsDifferencesSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listInstanceIdentifiersNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSlotsDifferencesSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listInstanceIdentifiersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -18876,102 +23755,107 @@ public Observable>> call(Response> getSlotsDifferencesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listInstanceIdentifiersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all the slots for a web apps. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getSiteSlotsNext(final String nextPageLink) { - ServiceResponse> response = getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listInstanceDeploymentsNext(final String nextPageLink) { + ServiceResponse> response = listInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets all the slots for a web apps. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteSlotsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listInstanceDeploymentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteSlotsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listInstanceDeploymentsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listInstanceDeploymentsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all the slots for a web apps. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> getSiteSlotsNextAsync(final String nextPageLink) { - return getSiteSlotsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listInstanceDeploymentsNextAsync(final String nextPageLink) { + return listInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets all the slots for a web apps. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable>> getSiteSlotsNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteSlotsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listInstanceDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceDeploymentsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteSlotsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all the slots for a web apps. + * List deployments. + * List deployments. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteSlotsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listInstanceDeploymentsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteSlotsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listInstanceDeploymentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteSlotsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listInstanceDeploymentsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -18979,102 +23863,107 @@ public Observable>> call(Response }); } - private ServiceResponse> getSiteSlotsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listInstanceDeploymentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object if successful. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSitesNext(final String nextPageLink) { - ServiceResponse> response = getSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricDefinitionsNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSitesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMetricDefinitionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> getSitesNextAsync(final String nextPageLink) { - return getSitesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMetricDefinitionsNextAsync(final String nextPageLink) { + return listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> getSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getSitesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefinitionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSitesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets the web apps for a subscription in the specified resource group. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSitesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSitesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricDefinitionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19082,102 +23971,107 @@ public Observable>> call(Response }); } - private ServiceResponse> getSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets deleted web apps in subscription. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeletedSiteInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getDeletedSitesNext(final String nextPageLink) { - ServiceResponse> response = getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricsNext(final String nextPageLink) { + ServiceResponse> response = listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets deleted web apps in subscription. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeletedSitesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getDeletedSitesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMetricsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets deleted web apps in subscription. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeletedSiteInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> getDeletedSitesNextAsync(final String nextPageLink) { - return getDeletedSitesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMetricsNextAsync(final String nextPageLink) { + return listMetricsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets deleted web apps in subscription. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeletedSiteInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> getDeletedSitesNextWithServiceResponseAsync(final String nextPageLink) { - return getDeletedSitesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricsNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getDeletedSitesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets deleted web apps in subscription. + * Gets metrics for web app. + * Gets metrics for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getDeletedSitesNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMetricsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getDeletedSitesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getDeletedSitesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19185,102 +24079,107 @@ public Observable>> call(Response> getDeletedSitesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object if successful. + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public PagedList getDeploymentsNext(final String nextPageLink) { - ServiceResponse> response = getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listPerfMonCountersNext(final String nextPageLink) { + ServiceResponse> response = listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * List deployments. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeploymentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listPerfMonCountersNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getDeploymentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listPerfMonCountersNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getDeploymentsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * List deployments. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable> getDeploymentsNextAsync(final String nextPageLink) { - return getDeploymentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listPerfMonCountersNextAsync(final String nextPageLink) { + return listPerfMonCountersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * List deployments. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable>> getDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { - return getDeploymentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listPerfMonCountersNextWithServiceResponseAsync(final String nextPageLink) { + return listPerfMonCountersNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getDeploymentsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listPerfMonCountersNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * List deployments. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getDeploymentsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listPerfMonCountersNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getDeploymentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listPerfMonCountersNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getDeploymentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listPerfMonCountersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19288,102 +24187,107 @@ public Observable>> call(Response> getDeploymentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listPerfMonCountersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object if successful. + * @return the PagedList<SiteInner> object if successful. */ - public PagedList getDeploymentsSlotNext(final String nextPageLink) { - ServiceResponse> response = getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listSlotsNext(final String nextPageLink) { + ServiceResponse> response = listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * List deployments. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getDeploymentsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listSlotsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getDeploymentsSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listSlotsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getDeploymentsSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * List deployments. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable> getDeploymentsSlotNextAsync(final String nextPageLink) { - return getDeploymentsSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listSlotsNextAsync(final String nextPageLink) { + return listSlotsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * List deployments. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<SiteInner> object */ - public Observable>> getDeploymentsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getDeploymentsSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listSlotsNextWithServiceResponseAsync(final String nextPageLink) { + return listSlotsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listSlotsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * List deployments. + * Gets all the slots for a web apps. + * Gets all the slots for a web apps. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getDeploymentsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listSlotsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getDeploymentsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listSlotsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getDeploymentsSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listSlotsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19391,102 +24295,107 @@ public Observable>> call(Response> getDeploymentsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listSlotsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * List deployments. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object if successful. + * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList getInstanceDeploymentsNext(final String nextPageLink) { - ServiceResponse> response = getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listBackupsSlotNext(final String nextPageLink) { + ServiceResponse> response = listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * List deployments. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getInstanceDeploymentsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listBackupsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getInstanceDeploymentsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listBackupsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getInstanceDeploymentsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * List deployments. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<BackupItemInner> object */ - public Observable> getInstanceDeploymentsNextAsync(final String nextPageLink) { - return getInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listBackupsSlotNextAsync(final String nextPageLink) { + return listBackupsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * List deployments. + * Lists all available backups for web app. + * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<DeploymentInner> object + * @return the observable to the PagedList<BackupItemInner> object */ - public Observable>> getInstanceDeploymentsNextWithServiceResponseAsync(final String nextPageLink) { - return getInstanceDeploymentsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listBackupsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listBackupsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getInstanceDeploymentsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listBackupsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * List deployments. + * Lists all available backups for web app. + * Lists all available backups for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getInstanceDeploymentsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listBackupsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getInstanceDeploymentsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listBackupsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getInstanceDeploymentsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listBackupsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19494,30 +24403,32 @@ public Observable>> call(Response> getInstanceDeploymentsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listBackupsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * List deployments. * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getInstanceDeploymentsSlotNext(final String nextPageLink) { - ServiceResponse> response = getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listDeploymentsSlotNext(final String nextPageLink) { + ServiceResponse> response = listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * List deployments. * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -19525,26 +24436,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getInstanceDeploymentsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listDeploymentsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink), + listDeploymentsSlotNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink); + return listDeploymentsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * List deployments. * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> getInstanceDeploymentsSlotNextAsync(final String nextPageLink) { - return getInstanceDeploymentsSlotNextWithServiceResponseAsync(nextPageLink) + public Observable> listDeploymentsSlotNextAsync(final String nextPageLink) { + return listDeploymentsSlotNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -19554,13 +24466,14 @@ public Page call(ServiceResponse> respons } /** + * List deployments. * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<DeploymentInner> object */ - public Observable>> getInstanceDeploymentsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink) + public Observable>> listDeploymentsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listDeploymentsSlotNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -19568,27 +24481,28 @@ public Observable>> call(ServiceResponse

> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getInstanceDeploymentsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listDeploymentsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getInstanceDeploymentsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listDeploymentsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getInstanceDeploymentsSlotNextDelegate(response); + ServiceResponse> result = listDeploymentsSlotNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -19597,7 +24511,7 @@ public Observable>> call(Response> getInstanceDeploymentsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDeploymentsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -19605,94 +24519,99 @@ private ServiceResponse> getInstanceDeploymentsSlotNex } /** - * Gets all instance of a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInstanceInner> object if successful. + * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersNext(final String nextPageLink) { - ServiceResponse> response = getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listHostNameBindingsSlotNext(final String nextPageLink) { + ServiceResponse> response = listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets all instance of a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteInstanceIdentifiersNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listHostNameBindingsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listHostNameBindingsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all instance of a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable> getSiteInstanceIdentifiersNextAsync(final String nextPageLink) { - return getSiteInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listHostNameBindingsSlotNextAsync(final String nextPageLink) { + return listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets all instance of a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<SiteInstanceInner> object + * @return the observable to the PagedList<HostNameBindingInner> object */ - public Observable>> getSiteInstanceIdentifiersNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listHostNameBindingsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listHostNameBindingsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteInstanceIdentifiersNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all instance of a web app. + * Get web app hostname bindings. + * Get web app hostname bindings. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteInstanceIdentifiersNextSinglePageAsync(final String nextPageLink) { + public Observable>> listHostNameBindingsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteInstanceIdentifiersNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listHostNameBindingsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteInstanceIdentifiersNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listHostNameBindingsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19700,30 +24619,32 @@ public Observable>> call(Response> getSiteInstanceIdentifiersNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listHostNameBindingsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** + * Gets all instance of a web app. * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<SiteInstanceInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersSlotNext(final String nextPageLink) { - ServiceResponse> response = getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listInstanceIdentifiersSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override public Page nextPage(String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** + * Gets all instance of a web app. * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -19731,26 +24652,27 @@ public Page nextPage(String nextPageLink) { * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteInstanceIdentifiersSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listInstanceIdentifiersSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink), + listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** + * Gets all instance of a web app. * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable> getSiteInstanceIdentifiersSlotNextAsync(final String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink) + public Observable> listInstanceIdentifiersSlotNextAsync(final String nextPageLink) { + return listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -19760,13 +24682,14 @@ public Page call(ServiceResponse> res } /** + * Gets all instance of a web app. * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList<SiteInstanceInner> object */ - public Observable>> getSiteInstanceIdentifiersSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink) + public Observable>> listInstanceIdentifiersSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -19774,27 +24697,28 @@ public Observable>> call(ServiceResponse if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listInstanceIdentifiersSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** + * Gets all instance of a web app. * Gets all instance of a web app. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList<SiteInstanceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteInstanceIdentifiersSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listInstanceIdentifiersSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteInstanceIdentifiersSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + return service.listInstanceIdentifiersSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteInstanceIdentifiersSlotNextDelegate(response); + ServiceResponse> result = listInstanceIdentifiersSlotNextDelegate(response); return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); @@ -19803,7 +24727,7 @@ public Observable>> call(Response> getSiteInstanceIdentifiersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listInstanceIdentifiersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -19811,94 +24735,99 @@ private ServiceResponse> getSiteInstanceIdentifiersS } /** - * Get web app hostname bindings. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostNameBindingInner> object if successful. + * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getSiteHostNameBindingsNext(final String nextPageLink) { - ServiceResponse> response = getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listInstanceDeploymentsSlotNext(final String nextPageLink) { + ServiceResponse> response = listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get web app hostname bindings. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteHostNameBindingsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listInstanceDeploymentsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteHostNameBindingsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get web app hostname bindings. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostNameBindingInner> object + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable> getSiteHostNameBindingsNextAsync(final String nextPageLink) { - return getSiteHostNameBindingsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listInstanceDeploymentsSlotNextAsync(final String nextPageLink) { + return listInstanceDeploymentsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get web app hostname bindings. + * List deployments. + * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostNameBindingInner> object + * @return the observable to the PagedList<DeploymentInner> object */ - public Observable>> getSiteHostNameBindingsNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listInstanceDeploymentsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteHostNameBindingsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listInstanceDeploymentsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get web app hostname bindings. + * List deployments. + * List deployments. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<DeploymentInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteHostNameBindingsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listInstanceDeploymentsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteHostNameBindingsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listInstanceDeploymentsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteHostNameBindingsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listInstanceDeploymentsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -19906,102 +24835,107 @@ public Observable>> call(Response> getSiteHostNameBindingsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listInstanceDeploymentsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get web app hostname bindings. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostNameBindingInner> object if successful. + * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteHostNameBindingsSlotNext(final String nextPageLink) { - ServiceResponse> response = getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricDefinitionsSlotNext(final String nextPageLink) { + ServiceResponse> response = listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Get web app hostname bindings. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteHostNameBindingsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricDefinitionsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get web app hostname bindings. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostNameBindingInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable> getSiteHostNameBindingsSlotNextAsync(final String nextPageLink) { - return getSiteHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMetricDefinitionsSlotNextAsync(final String nextPageLink) { + return listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Get web app hostname bindings. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<HostNameBindingInner> object + * @return the observable to the PagedList<MetricDefinitionInner> object */ - public Observable>> getSiteHostNameBindingsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricDefinitionsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricDefinitionsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteHostNameBindingsSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get web app hostname bindings. + * Gets metric definitions for web app. + * Gets metric definitions for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<HostNameBindingInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteHostNameBindingsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMetricDefinitionsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteHostNameBindingsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMetricDefinitionsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteHostNameBindingsSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricDefinitionsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20009,102 +24943,107 @@ public Observable>> call(Response> getSiteHostNameBindingsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricDefinitionsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Lists all available backups for web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<BackupItemInner> object if successful. + * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList listSiteBackupsNext(final String nextPageLink) { - ServiceResponse> response = listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listMetricsSlotNext(final String nextPageLink) { + ServiceResponse> response = listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Lists all available backups for web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listSiteBackupsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listMetricsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - listSiteBackupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listMetricsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listSiteBackupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Lists all available backups for web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<BackupItemInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable> listSiteBackupsNextAsync(final String nextPageLink) { - return listSiteBackupsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listMetricsSlotNextAsync(final String nextPageLink) { + return listMetricsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Lists all available backups for web app. + * Gets metrics for web app. + * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<BackupItemInner> object + * @return the observable to the PagedList<ResourceMetricInner> object */ - public Observable>> listSiteBackupsNextWithServiceResponseAsync(final String nextPageLink) { - return listSiteBackupsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listMetricsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listSiteBackupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listMetricsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Lists all available backups for web app. + * Gets metrics for web app. + * Gets metrics for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSiteBackupsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listMetricsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.listSiteBackupsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listMetricsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listSiteBackupsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listMetricsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20112,102 +25051,107 @@ public Observable>> call(Response> listSiteBackupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listMetricsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Lists all available backups for web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<BackupItemInner> object if successful. + * @return the PagedList<PerfMonResponseInner> object if successful. */ - public PagedList listSiteBackupsSlotNext(final String nextPageLink) { - ServiceResponse> response = listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listPerfMonCountersSlotNext(final String nextPageLink) { + ServiceResponse> response = listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Lists all available backups for web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> listSiteBackupsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listPerfMonCountersSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - listSiteBackupsSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listPerfMonCountersSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listSiteBackupsSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Lists all available backups for web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<BackupItemInner> object + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable> listSiteBackupsSlotNextAsync(final String nextPageLink) { - return listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listPerfMonCountersSlotNextAsync(final String nextPageLink) { + return listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Lists all available backups for web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<BackupItemInner> object + * @return the observable to the PagedList<PerfMonResponseInner> object */ - public Observable>> listSiteBackupsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return listSiteBackupsSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listPerfMonCountersSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listPerfMonCountersSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listPerfMonCountersSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Lists all available backups for web app. + * Gets perfmon counters for web app. + * Gets perfmon counters for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<BackupItemInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<PerfMonResponseInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSiteBackupsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listPerfMonCountersSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.listSiteBackupsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listPerfMonCountersSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listSiteBackupsSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listPerfMonCountersSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20215,102 +25159,107 @@ public Observable>> call(Response> listSiteBackupsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listPerfMonCountersSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the quota usage numbers for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @return the PagedList<SlotDifferenceInner> object if successful. */ - public PagedList getSiteUsagesNext(final String nextPageLink) { - ServiceResponse> response = getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList getSlotsDifferencesSlotNext(final String nextPageLink) { + ServiceResponse> response = getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets the quota usage numbers for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> getSlotsDifferencesSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteUsagesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<SlotDifferenceInner> object */ - public Observable> getSiteUsagesNextAsync(final String nextPageLink) { - return getSiteUsagesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> getSlotsDifferencesSlotNextAsync(final String nextPageLink) { + return getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets the quota usage numbers for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<SlotDifferenceInner> object */ - public Observable>> getSiteUsagesNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteUsagesNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> getSlotsDifferencesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteUsagesNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(getSlotsDifferencesSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets the quota usage numbers for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteUsagesNextSinglePageAsync(final String nextPageLink) { + public Observable>> getSlotsDifferencesSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.getSlotsDifferencesSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteUsagesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = getSlotsDifferencesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20318,102 +25267,107 @@ public Observable>> call(Response> getSiteUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> getSlotsDifferencesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets the quota usage numbers for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object if successful. + * @return the PagedList<SnapshotInner> object if successful. */ - public PagedList getSiteUsagesSlotNext(final String nextPageLink) { - ServiceResponse> response = getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listSnapshotsSlotNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets the quota usage numbers for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteUsagesSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listSnapshotsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteUsagesSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listSnapshotsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets the quota usage numbers for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<SnapshotInner> object */ - public Observable> getSiteUsagesSlotNextAsync(final String nextPageLink) { - return getSiteUsagesSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listSnapshotsSlotNextAsync(final String nextPageLink) { + return listSnapshotsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets the quota usage numbers for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<CsmUsageQuotaInner> object + * @return the observable to the PagedList<SnapshotInner> object */ - public Observable>> getSiteUsagesSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteUsagesSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listSnapshotsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteUsagesSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listSnapshotsSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets the quota usage numbers for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteUsagesSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listSnapshotsSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteUsagesSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listSnapshotsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteUsagesSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listSnapshotsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20421,102 +25375,107 @@ public Observable>> call(Response> getSiteUsagesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listSnapshotsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metrics for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. + * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteMetricsNext(final String nextPageLink) { - ServiceResponse> response = getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listUsagesSlotNext(final String nextPageLink) { + ServiceResponse> response = listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets metrics for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listUsagesSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteMetricsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listUsagesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets metrics for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable> getSiteMetricsNextAsync(final String nextPageLink) { - return getSiteMetricsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listUsagesSlotNextAsync(final String nextPageLink) { + return listUsagesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets metrics for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable>> getSiteMetricsNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteMetricsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listUsagesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesSlotNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteMetricsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listUsagesSlotNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets metrics for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteMetricsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listUsagesSlotNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteMetricsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listUsagesSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteMetricsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listUsagesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20524,102 +25483,107 @@ public Observable>> call(Response> getSiteMetricsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listUsagesSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metrics for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object if successful. + * @return the PagedList<SlotDifferenceInner> object if successful. */ - public PagedList getSiteMetricsSlotNext(final String nextPageLink) { - ServiceResponse> response = getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList getSlotsDifferencesFromProductionNext(final String nextPageLink) { + ServiceResponse> response = getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets metrics for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> getSlotsDifferencesFromProductionNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteMetricsSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets metrics for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<SlotDifferenceInner> object */ - public Observable> getSiteMetricsSlotNextAsync(final String nextPageLink) { - return getSiteMetricsSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> getSlotsDifferencesFromProductionNextAsync(final String nextPageLink) { + return getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets metrics for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<ResourceMetricInner> object + * @return the observable to the PagedList<SlotDifferenceInner> object */ - public Observable>> getSiteMetricsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteMetricsSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> getSlotsDifferencesFromProductionNextWithServiceResponseAsync(final String nextPageLink) { + return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteMetricsSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(getSlotsDifferencesFromProductionNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets metrics for web app. + * Get the difference in configuration settings between two web app slots. + * Get the difference in configuration settings between two web app slots. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<ResourceMetricInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SlotDifferenceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteMetricsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> getSlotsDifferencesFromProductionNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteMetricsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.getSlotsDifferencesFromProductionNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteMetricsSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = getSlotsDifferencesFromProductionNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20627,102 +25591,107 @@ public Observable>> call(Response> getSiteMetricsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> getSlotsDifferencesFromProductionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metric definitions for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object if successful. + * @return the PagedList<SnapshotInner> object if successful. */ - public PagedList getSiteMetricDefinitionsSlotNext(final String nextPageLink) { - ServiceResponse> response = getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listSnapshotsNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets metric definitions for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricDefinitionsSlotNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listSnapshotsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listSnapshotsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets metric definitions for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<SnapshotInner> object */ - public Observable> getSiteMetricDefinitionsSlotNextAsync(final String nextPageLink) { - return getSiteMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listSnapshotsNextAsync(final String nextPageLink) { + return listSnapshotsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets metric definitions for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<SnapshotInner> object */ - public Observable>> getSiteMetricDefinitionsSlotNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listSnapshotsNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteMetricDefinitionsSlotNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listSnapshotsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets metric definitions for web app. + * Returns all Snapshots to the user. + * Returns all Snapshots to the user. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteMetricDefinitionsSlotNextSinglePageAsync(final String nextPageLink) { + public Observable>> listSnapshotsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteMetricDefinitionsSlotNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listSnapshotsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteMetricDefinitionsSlotNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listSnapshotsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20730,102 +25699,107 @@ public Observable>> call(Response> getSiteMetricDefinitionsSlotNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listSnapshotsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets metric definitions for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object if successful. + * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteMetricDefinitionsNext(final String nextPageLink) { - ServiceResponse> response = getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.getBody()) { + public PagedList listUsagesNext(final String nextPageLink) { + ServiceResponse> response = listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) { - return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + public Page nextPage(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; } /** - * Gets metric definitions for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceCall the ServiceCall object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */ - public ServiceCall> getSiteMetricDefinitionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + public ServiceCall> listUsagesNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { return AzureServiceCall.create( - getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listUsagesNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets metric definitions for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable> getSiteMetricDefinitionsNextAsync(final String nextPageLink) { - return getSiteMetricDefinitionsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listUsagesNextAsync(final String nextPageLink) { + return listUsagesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.getBody(); } }); } /** - * Gets metric definitions for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the observable to the PagedList<MetricDefinitionInner> object + * @return the observable to the PagedList<CsmUsageQuotaInner> object */ - public Observable>> getSiteMetricDefinitionsNextWithServiceResponseAsync(final String nextPageLink) { - return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listUsagesNextWithServiceResponseAsync(final String nextPageLink) { + return listUsagesNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.getBody().getNextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(getSiteMetricDefinitionsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listUsagesNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets metric definitions for web app. + * Gets the quota usage numbers for web app. + * Gets the quota usage numbers for web app. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @return the PagedList<MetricDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<CsmUsageQuotaInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> getSiteMetricDefinitionsNextSinglePageAsync(final String nextPageLink) { + public Observable>> listUsagesNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - return service.getSiteMetricDefinitionsNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listUsagesNext(nextPageLink, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = getSiteMetricDefinitionsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + ServiceResponse> result = listUsagesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); } catch (Throwable t) { return Observable.error(t); } @@ -20833,9 +25807,9 @@ public Observable>> call(Response> getSiteMetricDefinitionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listUsagesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebSiteManagementClientImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebSiteManagementClientImpl.java index d09da7bb63f0..1a2229d5e5d4 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebSiteManagementClientImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/WebSiteManagementClientImpl.java @@ -8,15 +8,42 @@ package com.microsoft.azure.management.website.implementation; +import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceCall; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.AzureServiceResponseBuilder; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.azure.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.ServiceCall; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; /** * Initializes a new instance of the WebSiteManagementClientImpl class. */ public final class WebSiteManagementClientImpl extends AzureServiceClient { + /** The Retrofit service to perform REST calls. */ + private WebSiteManagementClientService service; /** the {@link AzureClient} used for long running operations. */ private AzureClient azureClient; @@ -51,18 +78,6 @@ public WebSiteManagementClientImpl withSubscriptionId(String subscriptionId) { return this; } - /** API Version. */ - private String apiVersion; - - /** - * Gets API Version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - /** Gets or sets the preferred language for the response. */ private String acceptLanguage; @@ -133,42 +148,55 @@ public WebSiteManagementClientImpl withGenerateClientRequestId(boolean generateC } /** - * The CertificateOrdersInner object to access its operations. + * The AppServiceCertificateOrdersInner object to access its operations. */ - private CertificateOrdersInner certificateOrders; + private AppServiceCertificateOrdersInner appServiceCertificateOrders; /** - * Gets the CertificateOrdersInner object to access its operations. - * @return the CertificateOrdersInner object. + * Gets the AppServiceCertificateOrdersInner object to access its operations. + * @return the AppServiceCertificateOrdersInner object. */ - public CertificateOrdersInner certificateOrders() { - return this.certificateOrders; + public AppServiceCertificateOrdersInner appServiceCertificateOrders() { + return this.appServiceCertificateOrders; } /** - * The CertificatesInner object to access its operations. + * The AppServiceEnvironmentsInner object to access its operations. */ - private CertificatesInner certificates; + private AppServiceEnvironmentsInner appServiceEnvironments; /** - * Gets the CertificatesInner object to access its operations. - * @return the CertificatesInner object. + * Gets the AppServiceEnvironmentsInner object to access its operations. + * @return the AppServiceEnvironmentsInner object. */ - public CertificatesInner certificates() { - return this.certificates; + public AppServiceEnvironmentsInner appServiceEnvironments() { + return this.appServiceEnvironments; } /** - * The ClassicMobileServicesInner object to access its operations. + * The AppServicePlansInner object to access its operations. */ - private ClassicMobileServicesInner classicMobileServices; + private AppServicePlansInner appServicePlans; /** - * Gets the ClassicMobileServicesInner object to access its operations. - * @return the ClassicMobileServicesInner object. + * Gets the AppServicePlansInner object to access its operations. + * @return the AppServicePlansInner object. */ - public ClassicMobileServicesInner classicMobileServices() { - return this.classicMobileServices; + public AppServicePlansInner appServicePlans() { + return this.appServicePlans; + } + + /** + * The CertificatesInner object to access its operations. + */ + private CertificatesInner certificates; + + /** + * Gets the CertificatesInner object to access its operations. + * @return the CertificatesInner object. + */ + public CertificatesInner certificates() { + return this.certificates; } /** @@ -185,226 +213,1445 @@ public DomainsInner domains() { } /** - * The GlobalsInner object to access its operations. + * The RecommendationsInner object to access its operations. */ - private GlobalsInner globals; + private RecommendationsInner recommendations; /** - * Gets the GlobalsInner object to access its operations. - * @return the GlobalsInner object. + * Gets the RecommendationsInner object to access its operations. + * @return the RecommendationsInner object. */ - public GlobalsInner globals() { - return this.globals; + public RecommendationsInner recommendations() { + return this.recommendations; } /** - * The GlobalCertificateOrdersInner object to access its operations. + * The TopLevelDomainsInner object to access its operations. */ - private GlobalCertificateOrdersInner globalCertificateOrders; + private TopLevelDomainsInner topLevelDomains; /** - * Gets the GlobalCertificateOrdersInner object to access its operations. - * @return the GlobalCertificateOrdersInner object. + * Gets the TopLevelDomainsInner object to access its operations. + * @return the TopLevelDomainsInner object. */ - public GlobalCertificateOrdersInner globalCertificateOrders() { - return this.globalCertificateOrders; + public TopLevelDomainsInner topLevelDomains() { + return this.topLevelDomains; } /** - * The GlobalDomainRegistrationsInner object to access its operations. + * The WebAppsInner object to access its operations. */ - private GlobalDomainRegistrationsInner globalDomainRegistrations; + private WebAppsInner webApps; /** - * Gets the GlobalDomainRegistrationsInner object to access its operations. - * @return the GlobalDomainRegistrationsInner object. + * Gets the WebAppsInner object to access its operations. + * @return the WebAppsInner object. */ - public GlobalDomainRegistrationsInner globalDomainRegistrations() { - return this.globalDomainRegistrations; + public WebAppsInner webApps() { + return this.webApps; } /** - * The GlobalResourceGroupsInner object to access its operations. + * Initializes an instance of WebSiteManagementClient client. + * + * @param credentials the management credentials for Azure */ - private GlobalResourceGroupsInner globalResourceGroups; + public WebSiteManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } /** - * Gets the GlobalResourceGroupsInner object to access its operations. - * @return the GlobalResourceGroupsInner object. + * Initializes an instance of WebSiteManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure */ - public GlobalResourceGroupsInner globalResourceGroups() { - return this.globalResourceGroups; + public WebSiteManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + this(new RestClient.Builder() + .withBaseUrl(baseUrl) + .withCredentials(credentials) + .build()); } /** - * The HostingEnvironmentsInner object to access its operations. + * Initializes an instance of WebSiteManagementClient client. + * + * @param restClient the REST client to connect to Azure. */ - private HostingEnvironmentsInner hostingEnvironments; + public WebSiteManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.appServiceCertificateOrders = new AppServiceCertificateOrdersInner(restClient().retrofit(), this); + this.appServiceEnvironments = new AppServiceEnvironmentsInner(restClient().retrofit(), this); + this.appServicePlans = new AppServicePlansInner(restClient().retrofit(), this); + this.certificates = new CertificatesInner(restClient().retrofit(), this); + this.domains = new DomainsInner(restClient().retrofit(), this); + this.recommendations = new RecommendationsInner(restClient().retrofit(), this); + this.topLevelDomains = new TopLevelDomainsInner(restClient().retrofit(), this); + this.webApps = new WebAppsInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + initializeService(); + } /** - * Gets the HostingEnvironmentsInner object to access its operations. - * @return the HostingEnvironmentsInner object. + * Gets the User-Agent header for the client. + * + * @return the user agent string. */ - public HostingEnvironmentsInner hostingEnvironments() { - return this.hostingEnvironments; + @Override + public String userAgent() { + return String.format("Azure-SDK-For-Java/%s (%s)", + getClass().getPackage().getImplementationVersion(), + "WebSiteManagementClient, "); + } + + private void initializeService() { + service = restClient().retrofit().create(WebSiteManagementClientService.class); } /** - * The ManagedHostingEnvironmentsInner object to access its operations. + * The interface defining all the services for WebSiteManagementClient to be + * used by Retrofit to perform actually REST calls. */ - private ManagedHostingEnvironmentsInner managedHostingEnvironments; + interface WebSiteManagementClientService { + @Headers("Content-Type: application/json; charset=utf-8") + @GET("providers/Microsoft.Web/sourcecontrols") + Observable> listSourceControls(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Body ResourceNameAvailabilityRequestInner request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") + Observable> getSubscriptionGeoRegions(@Path("subscriptionId") String subscriptionId, @Query("sku") String sku, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable") + Observable> isHostingEnvironmentNameAvailable(@Path("subscriptionId") String subscriptionId, @Query("name") String name, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable/{name}") + Observable> isHostingEnvironmentWithLegacyNameAvailable(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") + Observable> listPremierAddOnOffers(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials") + Observable> getPublishingCredentials(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials") + Observable> updatePublishingCredentials(@Path("subscriptionId") String subscriptionId, @Body UserInner requestMessage, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") + Observable> listSkus(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") + Observable> moveResources(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelopeInner moveResourceEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") + Observable> validate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ValidateRequestInner validateRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") + Observable> validateMoveResources(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelopeInner moveResourceEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> listSourceControlsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers("Content-Type: application/json; charset=utf-8") + @GET("{nextLink}") + Observable> getSubscriptionGeoRegionsNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } /** - * Gets the ManagedHostingEnvironmentsInner object to access its operations. - * @return the ManagedHostingEnvironmentsInner object. + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @return the PagedList<SourceControlInner> object if successful. */ - public ManagedHostingEnvironmentsInner managedHostingEnvironments() { - return this.managedHostingEnvironments; + public PagedList listSourceControls() { + ServiceResponse> response = listSourceControlsSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * The ProvidersInner object to access its operations. + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - private ProvidersInner providers; + public ServiceCall> listSourceControlsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSourceControlsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } /** - * Gets the ProvidersInner object to access its operations. - * @return the ProvidersInner object. + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @return the observable to the PagedList<SourceControlInner> object */ - public ProvidersInner providers() { - return this.providers; + public Observable> listSourceControlsAsync() { + return listSourceControlsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * The RecommendationsInner object to access its operations. + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @return the observable to the PagedList<SourceControlInner> object */ - private RecommendationsInner recommendations; + public Observable>> listSourceControlsWithServiceResponseAsync() { + return listSourceControlsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSourceControlsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } /** - * Gets the RecommendationsInner object to access its operations. - * @return the RecommendationsInner object. + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @return the PagedList<SourceControlInner> object wrapped in {@link ServiceResponse} if successful. */ - public RecommendationsInner recommendations() { - return this.recommendations; + public Observable>> listSourceControlsSinglePageAsync() { + final String apiVersion = "2016-03-01"; + return service.listSourceControls(apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSourceControlsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSourceControlsDelegate(Response response) throws CloudException, IOException { + return new AzureServiceResponseBuilder, CloudException>(this.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * The ServerFarmsInner object to access its operations. + * Check if resource name is available. + * Check if resource name is available. + * + * @param request Name availability request + * @return the ResourceNameAvailabilityInner object if successful. */ - private ServerFarmsInner serverFarms; + public ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequestInner request) { + return checkNameAvailabilityWithServiceResponseAsync(request).toBlocking().single().getBody(); + } /** - * Gets the ServerFarmsInner object to access its operations. - * @return the ServerFarmsInner object. + * Check if resource name is available. + * Check if resource name is available. + * + * @param request Name availability request + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public ServerFarmsInner serverFarms() { - return this.serverFarms; + public ServiceCall checkNameAvailabilityAsync(ResourceNameAvailabilityRequestInner request, final ServiceCallback serviceCallback) { + return ServiceCall.create(checkNameAvailabilityWithServiceResponseAsync(request), serviceCallback); } /** - * The SitesInner object to access its operations. + * Check if resource name is available. + * Check if resource name is available. + * + * @param request Name availability request + * @return the observable to the ResourceNameAvailabilityInner object */ - private SitesInner sites; + public Observable checkNameAvailabilityAsync(ResourceNameAvailabilityRequestInner request) { + return checkNameAvailabilityWithServiceResponseAsync(request).map(new Func1, ResourceNameAvailabilityInner>() { + @Override + public ResourceNameAvailabilityInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } /** - * Gets the SitesInner object to access its operations. - * @return the SitesInner object. + * Check if resource name is available. + * Check if resource name is available. + * + * @param request Name availability request + * @return the observable to the ResourceNameAvailabilityInner object */ - public SitesInner sites() { - return this.sites; + public Observable> checkNameAvailabilityWithServiceResponseAsync(ResourceNameAvailabilityRequestInner request) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (request == null) { + throw new IllegalArgumentException("Parameter request is required and cannot be null."); + } + Validator.validate(request); + final String apiVersion = "2016-03-01"; + return service.checkNameAvailability(this.subscriptionId(), request, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * The TopLevelDomainsInner object to access its operations. + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @return the PagedList<GeoRegionInner> object if successful. */ - private TopLevelDomainsInner topLevelDomains; + public PagedList getSubscriptionGeoRegions() { + ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync().toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } /** - * Gets the TopLevelDomainsInner object to access its operations. - * @return the TopLevelDomainsInner object. + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public TopLevelDomainsInner topLevelDomains() { - return this.topLevelDomains; + public ServiceCall> getSubscriptionGeoRegionsAsync(final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + getSubscriptionGeoRegionsSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * The UsagesInner object to access its operations. + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @return the observable to the PagedList<GeoRegionInner> object */ - private UsagesInner usages; + public Observable> getSubscriptionGeoRegionsAsync() { + return getSubscriptionGeoRegionsWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } /** - * Gets the UsagesInner object to access its operations. - * @return the UsagesInner object. + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @return the observable to the PagedList<GeoRegionInner> object */ - public UsagesInner usages() { - return this.usages; + public Observable>> getSubscriptionGeoRegionsWithServiceResponseAsync() { + return getSubscriptionGeoRegionsSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** - * Initializes an instance of WebSiteManagementClient client. + * Gets list of available geo regions. + * Gets list of available geo regions. * - * @param credentials the management credentials for Azure + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. */ - public WebSiteManagementClientImpl(ServiceClientCredentials credentials) { - this("https://management.azure.com", credentials); + public Observable>> getSubscriptionGeoRegionsSinglePageAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + final String sku = null; + return service.getSubscriptionGeoRegions(this.subscriptionId(), sku, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSubscriptionGeoRegionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } /** - * Initializes an instance of WebSiteManagementClient client. + * Gets list of available geo regions. + * Gets list of available geo regions. * - * @param baseUrl the base URL of the host - * @param credentials the management credentials for Azure + * @param sku Filter only to regions that support this sku + * @return the PagedList<GeoRegionInner> object if successful. */ - public WebSiteManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { - this(new RestClient.Builder() - .withBaseUrl(baseUrl) - .withCredentials(credentials) - .build()); + public PagedList getSubscriptionGeoRegions(final String sku) { + ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync(sku).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; } /** - * Initializes an instance of WebSiteManagementClient client. + * Gets list of available geo regions. + * Gets list of available geo regions. * - * @param restClient the REST client to connect to Azure. + * @param sku Filter only to regions that support this sku + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object */ - public WebSiteManagementClientImpl(RestClient restClient) { - super(restClient); - initialize(); + public ServiceCall> getSubscriptionGeoRegionsAsync(final String sku, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + getSubscriptionGeoRegionsSinglePageAsync(sku), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } - protected void initialize() { - this.apiVersion = "2015-08-01"; - this.acceptLanguage = "en-US"; - this.longRunningOperationRetryTimeout = 30; - this.generateClientRequestId = true; - this.certificateOrders = new CertificateOrdersInner(restClient().retrofit(), this); - this.certificates = new CertificatesInner(restClient().retrofit(), this); - this.classicMobileServices = new ClassicMobileServicesInner(restClient().retrofit(), this); - this.domains = new DomainsInner(restClient().retrofit(), this); - this.globals = new GlobalsInner(restClient().retrofit(), this); - this.globalCertificateOrders = new GlobalCertificateOrdersInner(restClient().retrofit(), this); - this.globalDomainRegistrations = new GlobalDomainRegistrationsInner(restClient().retrofit(), this); - this.globalResourceGroups = new GlobalResourceGroupsInner(restClient().retrofit(), this); - this.hostingEnvironments = new HostingEnvironmentsInner(restClient().retrofit(), this); - this.managedHostingEnvironments = new ManagedHostingEnvironmentsInner(restClient().retrofit(), this); - this.providers = new ProvidersInner(restClient().retrofit(), this); - this.recommendations = new RecommendationsInner(restClient().retrofit(), this); - this.serverFarms = new ServerFarmsInner(restClient().retrofit(), this); - this.sites = new SitesInner(restClient().retrofit(), this); - this.topLevelDomains = new TopLevelDomainsInner(restClient().retrofit(), this); - this.usages = new UsagesInner(restClient().retrofit(), this); - this.azureClient = new AzureClient(this); + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param sku Filter only to regions that support this sku + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable> getSubscriptionGeoRegionsAsync(final String sku) { + return getSubscriptionGeoRegionsWithServiceResponseAsync(sku) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); } /** - * Gets the User-Agent header for the client. + * Gets list of available geo regions. + * Gets list of available geo regions. * - * @return the user agent string. + * @param sku Filter only to regions that support this sku + * @return the observable to the PagedList<GeoRegionInner> object */ - @Override - public String userAgent() { - return String.format("Azure-SDK-For-Java/%s (%s)", - getClass().getPackage().getImplementationVersion(), - "WebSiteManagementClient, 2015-08-01"); + public Observable>> getSubscriptionGeoRegionsWithServiceResponseAsync(final String sku) { + return getSubscriptionGeoRegionsSinglePageAsync(sku) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + ServiceResponse> * @param sku Filter only to regions that support this sku + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSubscriptionGeoRegionsSinglePageAsync(final String sku) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.getSubscriptionGeoRegions(this.subscriptionId(), sku, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSubscriptionGeoRegionsDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSubscriptionGeoRegionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the Object object if successful. + */ + public Object isHostingEnvironmentNameAvailable(String name) { + return isHostingEnvironmentNameAvailableWithServiceResponseAsync(name).toBlocking().single().getBody(); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall isHostingEnvironmentNameAvailableAsync(String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(isHostingEnvironmentNameAvailableWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the observable to the Object object + */ + public Observable isHostingEnvironmentNameAvailableAsync(String name) { + return isHostingEnvironmentNameAvailableWithServiceResponseAsync(name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the observable to the Object object + */ + public Observable> isHostingEnvironmentNameAvailableWithServiceResponseAsync(String name) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.isHostingEnvironmentNameAvailable(this.subscriptionId(), name, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = isHostingEnvironmentNameAvailableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isHostingEnvironmentNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the Object object if successful. + */ + public Object isHostingEnvironmentWithLegacyNameAvailable(String name) { + return isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name).toBlocking().single().getBody(); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall isHostingEnvironmentWithLegacyNameAvailableAsync(String name, final ServiceCallback serviceCallback) { + return ServiceCall.create(isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name), serviceCallback); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the observable to the Object object + */ + public Observable isHostingEnvironmentWithLegacyNameAvailableAsync(String name) { + return isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Whether hosting environment name is available. + * Whether hosting environment name is available. + * + * @param name Hosting environment name + * @return the observable to the Object object + */ + public Observable> isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(String name) { + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.isHostingEnvironmentWithLegacyNameAvailable(name, this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = isHostingEnvironmentWithLegacyNameAvailableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isHostingEnvironmentWithLegacyNameAvailableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * List premier add on offers. + * List premier add on offers. + * + * @return the Object object if successful. + */ + public Object listPremierAddOnOffers() { + return listPremierAddOnOffersWithServiceResponseAsync().toBlocking().single().getBody(); + } + + /** + * List premier add on offers. + * List premier add on offers. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listPremierAddOnOffersAsync(final ServiceCallback serviceCallback) { + return ServiceCall.create(listPremierAddOnOffersWithServiceResponseAsync(), serviceCallback); + } + + /** + * List premier add on offers. + * List premier add on offers. + * + * @return the observable to the Object object + */ + public Observable listPremierAddOnOffersAsync() { + return listPremierAddOnOffersWithServiceResponseAsync().map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * List premier add on offers. + * List premier add on offers. + * + * @return the observable to the Object object + */ + public Observable> listPremierAddOnOffersWithServiceResponseAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.listPremierAddOnOffers(this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPremierAddOnOffersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPremierAddOnOffersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets publishing credentials for the subscription owner. + * Gets publishing credentials for the subscription owner. + * + * @return the UserInner object if successful. + */ + public UserInner getPublishingCredentials() { + return getPublishingCredentialsWithServiceResponseAsync().toBlocking().single().getBody(); + } + + /** + * Gets publishing credentials for the subscription owner. + * Gets publishing credentials for the subscription owner. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall getPublishingCredentialsAsync(final ServiceCallback serviceCallback) { + return ServiceCall.create(getPublishingCredentialsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets publishing credentials for the subscription owner. + * Gets publishing credentials for the subscription owner. + * + * @return the observable to the UserInner object + */ + public Observable getPublishingCredentialsAsync() { + return getPublishingCredentialsWithServiceResponseAsync().map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Gets publishing credentials for the subscription owner. + * Gets publishing credentials for the subscription owner. + * + * @return the observable to the UserInner object + */ + public Observable> getPublishingCredentialsWithServiceResponseAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.getPublishingCredentials(this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPublishingCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates publishing credentials for the subscription owner. + * Updates publishing credentials for the subscription owner. + * + * @param requestMessage requestMessage with new publishing credentials + * @return the UserInner object if successful. + */ + public UserInner updatePublishingCredentials(UserInner requestMessage) { + return updatePublishingCredentialsWithServiceResponseAsync(requestMessage).toBlocking().single().getBody(); + } + + /** + * Updates publishing credentials for the subscription owner. + * Updates publishing credentials for the subscription owner. + * + * @param requestMessage requestMessage with new publishing credentials + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall updatePublishingCredentialsAsync(UserInner requestMessage, final ServiceCallback serviceCallback) { + return ServiceCall.create(updatePublishingCredentialsWithServiceResponseAsync(requestMessage), serviceCallback); + } + + /** + * Updates publishing credentials for the subscription owner. + * Updates publishing credentials for the subscription owner. + * + * @param requestMessage requestMessage with new publishing credentials + * @return the observable to the UserInner object + */ + public Observable updatePublishingCredentialsAsync(UserInner requestMessage) { + return updatePublishingCredentialsWithServiceResponseAsync(requestMessage).map(new Func1, UserInner>() { + @Override + public UserInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Updates publishing credentials for the subscription owner. + * Updates publishing credentials for the subscription owner. + * + * @param requestMessage requestMessage with new publishing credentials + * @return the observable to the UserInner object + */ + public Observable> updatePublishingCredentialsWithServiceResponseAsync(UserInner requestMessage) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (requestMessage == null) { + throw new IllegalArgumentException("Parameter requestMessage is required and cannot be null."); + } + Validator.validate(requestMessage); + final String apiVersion = "2016-03-01"; + return service.updatePublishingCredentials(this.subscriptionId(), requestMessage, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updatePublishingCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updatePublishingCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get skus. + * Get skus. + * + * @return the Object object if successful. + */ + public Object listSkus() { + return listSkusWithServiceResponseAsync().toBlocking().single().getBody(); + } + + /** + * Get skus. + * Get skus. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall listSkusAsync(final ServiceCallback serviceCallback) { + return ServiceCall.create(listSkusWithServiceResponseAsync(), serviceCallback); + } + + /** + * Get skus. + * Get skus. + * + * @return the observable to the Object object + */ + public Observable listSkusAsync() { + return listSkusWithServiceResponseAsync().map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Get skus. + * Get skus. + * + * @return the observable to the Object object + */ + public Observable> listSkusWithServiceResponseAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2016-03-01"; + return service.listSkus(this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSkusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSkusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the Object object if successful. + */ + public Object moveResources(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().getBody(); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall moveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the observable to the Object object + */ + public Observable moveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); } + + /** + * Move resources between resource groups. + * Move resources between resource groups. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the observable to the Object object + */ + public Observable> moveResourcesWithServiceResponseAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (moveResourceEnvelope == null) { + throw new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null."); + } + Validator.validate(moveResourceEnvelope); + final String apiVersion = "2016-03-01"; + return service.moveResources(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = moveResourcesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse moveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validates if a resource can be created. + * Validates if a resource can be created. + * + * @param resourceGroupName Resource group + * @param validateRequest Object representing resources to validate + * @return the ValidateResponseInner object if successful. + */ + public ValidateResponseInner validate(String resourceGroupName, ValidateRequestInner validateRequest) { + return validateWithServiceResponseAsync(resourceGroupName, validateRequest).toBlocking().single().getBody(); + } + + /** + * Validates if a resource can be created. + * Validates if a resource can be created. + * + * @param resourceGroupName Resource group + * @param validateRequest Object representing resources to validate + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall validateAsync(String resourceGroupName, ValidateRequestInner validateRequest, final ServiceCallback serviceCallback) { + return ServiceCall.create(validateWithServiceResponseAsync(resourceGroupName, validateRequest), serviceCallback); + } + + /** + * Validates if a resource can be created. + * Validates if a resource can be created. + * + * @param resourceGroupName Resource group + * @param validateRequest Object representing resources to validate + * @return the observable to the ValidateResponseInner object + */ + public Observable validateAsync(String resourceGroupName, ValidateRequestInner validateRequest) { + return validateWithServiceResponseAsync(resourceGroupName, validateRequest).map(new Func1, ValidateResponseInner>() { + @Override + public ValidateResponseInner call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Validates if a resource can be created. + * Validates if a resource can be created. + * + * @param resourceGroupName Resource group + * @param validateRequest Object representing resources to validate + * @return the observable to the ValidateResponseInner object + */ + public Observable> validateWithServiceResponseAsync(String resourceGroupName, ValidateRequestInner validateRequest) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (validateRequest == null) { + throw new IllegalArgumentException("Parameter validateRequest is required and cannot be null."); + } + Validator.validate(validateRequest); + final String apiVersion = "2016-03-01"; + return service.validate(resourceGroupName, this.subscriptionId(), validateRequest, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Validate specified resources can be moved. + * Validate specified resources can be moved. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the Object object if successful. + */ + public Object validateMoveResources(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return validateMoveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().getBody(); + } + + /** + * Validate specified resources can be moved. + * Validate specified resources can be moved. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall validateMoveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceCall.create(validateMoveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Validate specified resources can be moved. + * Validate specified resources can be moved. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the observable to the Object object + */ + public Observable validateMoveResourcesAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + return validateMoveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.getBody(); + } + }); + } + + /** + * Validate specified resources can be moved. + * Validate specified resources can be moved. + * + * @param resourceGroupName Resource group + * @param moveResourceEnvelope Object representing resource to move + * @return the observable to the Object object + */ + public Observable> validateMoveResourcesWithServiceResponseAsync(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (moveResourceEnvelope == null) { + throw new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null."); + } + Validator.validate(moveResourceEnvelope); + final String apiVersion = "2016-03-01"; + return service.validateMoveResources(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateMoveResourcesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateMoveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.mapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SourceControlInner> object if successful. + */ + public PagedList listSourceControlsNext(final String nextPageLink) { + ServiceResponse> response = listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> listSourceControlsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + listSourceControlsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SourceControlInner> object + */ + public Observable> listSourceControlsNextAsync(final String nextPageLink) { + return listSourceControlsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<SourceControlInner> object + */ + public Observable>> listSourceControlsNextWithServiceResponseAsync(final String nextPageLink) { + return listSourceControlsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSourceControlsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the source controls available for Azure websites. + * Gets the source controls available for Azure websites. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<SourceControlInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSourceControlsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.listSourceControlsNext(nextPageLink, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSourceControlsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSourceControlsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<GeoRegionInner> object if successful. + */ + public PagedList getSubscriptionGeoRegionsNext(final String nextPageLink) { + ServiceResponse> response = getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.getBody()) { + @Override + public Page nextPage(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); + } + }; + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceCall the ServiceCall object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @return the {@link ServiceCall} object + */ + public ServiceCall> getSubscriptionGeoRegionsNextAsync(final String nextPageLink, final ServiceCall> serviceCall, final ListOperationCallback serviceCallback) { + return AzureServiceCall.create( + getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable> getSubscriptionGeoRegionsNextAsync(final String nextPageLink) { + return getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.getBody(); + } + }); + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the observable to the PagedList<GeoRegionInner> object + */ + public Observable>> getSubscriptionGeoRegionsNextWithServiceResponseAsync(final String nextPageLink) { + return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.getBody().getNextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getSubscriptionGeoRegionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of available geo regions. + * Gets list of available geo regions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @return the PagedList<GeoRegionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getSubscriptionGeoRegionsNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + return service.getSubscriptionGeoRegionsNext(nextPageLink, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getSubscriptionGeoRegionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.getBody(), result.getResponse())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getSubscriptionGeoRegionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.mapperAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/package-info.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/package-info.java index c9c48aa6e912..0630537affdb 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/package-info.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/package-info.java @@ -6,6 +6,6 @@ /** * This package contains the implementation classes for WebSiteManagementClient. - * Use these APIs to manage Azure Websites resources through the Azure Resource Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests made to these resources are secure. For more information, see Authenticating Azure Resource Manager requests.. + * Composite Swagger for WebSite Management Client. */ package com.microsoft.azure.management.website.implementation; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/package-info.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/package-info.java index 457b0b257763..d3a75daacba1 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/package-info.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/package-info.java @@ -6,6 +6,6 @@ /** * This package contains the classes for WebSiteManagementClient. - * Use these APIs to manage Azure Websites resources through the Azure Resource Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests made to these resources are secure. For more information, see Authenticating Azure Resource Manager requests.. + * Composite Swagger for WebSite Management Client. */ package com.microsoft.azure.management.website; diff --git a/gulpfile.js b/gulpfile.js index 2ecf5685ad9a..c30c607cc08d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -52,7 +52,7 @@ var mappings = { }, 'website': { 'dir': 'azure-mgmt-website', - 'source': 'arm-web/2015-08-01/swagger/service.json', + 'source': 'arm-web/compositeWebAppClient.json', 'package': 'com.microsoft.azure.management.website', 'args': '-FT 1' },